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> |
| 5 | |
| 6 | namespace nlsr { |
| 7 | class NextHop |
| 8 | { |
| 9 | public: |
| 10 | NextHop() |
| 11 | : m_connectingFace(0) |
| 12 | , m_routeCost(0) |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | NextHop(int cf, double rc) |
| 17 | { |
| 18 | m_connectingFace = cf; |
| 19 | m_routeCost = rc; |
| 20 | } |
| 21 | |
| 22 | int |
| 23 | getConnectingFace() const |
| 24 | { |
| 25 | return m_connectingFace; |
| 26 | } |
| 27 | |
| 28 | void |
| 29 | setConnectingFace(int cf) |
| 30 | { |
| 31 | m_connectingFace = cf; |
| 32 | } |
| 33 | |
| 34 | double |
| 35 | getRouteCost() const |
| 36 | { |
| 37 | return m_routeCost; |
| 38 | } |
| 39 | |
| 40 | void |
| 41 | setRouteCost(double rc) |
| 42 | { |
| 43 | m_routeCost = rc; |
| 44 | } |
| 45 | |
| 46 | private: |
| 47 | int m_connectingFace; |
| 48 | double m_routeCost; |
| 49 | }; |
| 50 | |
| 51 | |
| 52 | std::ostream& |
| 53 | operator<<(std::ostream& os, NextHop& nh); |
| 54 | |
| 55 | }//namespace nlsr |
| 56 | |
| 57 | #endif //NLSR_NEXTHOP_HPP |