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