akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 1 | #ifndef NLSR_NEXTHOP_HPP |
2 | #define NLSR_NEXTHOP_HPP | ||||
3 | |||||
4 | #include <iostream> | ||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 5 | #include <boost/cstdint.hpp> |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 6 | |
7 | namespace nlsr { | ||||
8 | class NextHop | ||||
9 | { | ||||
10 | public: | ||||
11 | NextHop() | ||||
12 | : m_connectingFace(0) | ||||
13 | , m_routeCost(0) | ||||
14 | { | ||||
15 | } | ||||
16 | |||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 17 | NextHop(uint32_t cf, double rc) |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 18 | { |
19 | m_connectingFace = cf; | ||||
20 | m_routeCost = rc; | ||||
21 | } | ||||
22 | |||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 23 | uint32_t |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 24 | getConnectingFace() const |
25 | { | ||||
26 | return m_connectingFace; | ||||
27 | } | ||||
28 | |||||
29 | void | ||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 30 | setConnectingFace(uint32_t cf) |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 31 | { |
32 | m_connectingFace = cf; | ||||
33 | } | ||||
34 | |||||
35 | double | ||||
36 | getRouteCost() const | ||||
37 | { | ||||
38 | return m_routeCost; | ||||
39 | } | ||||
40 | |||||
41 | void | ||||
42 | setRouteCost(double rc) | ||||
43 | { | ||||
44 | m_routeCost = rc; | ||||
45 | } | ||||
46 | |||||
47 | private: | ||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 48 | uint32_t m_connectingFace; |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 49 | double m_routeCost; |
50 | }; | ||||
51 | |||||
52 | |||||
53 | std::ostream& | ||||
54 | operator<<(std::ostream& os, NextHop& nh); | ||||
55 | |||||
56 | }//namespace nlsr | ||||
57 | |||||
58 | #endif //NLSR_NEXTHOP_HPP |