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