akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 1 | #ifndef NLSR_NHL_HPP |
2 | #define NLSR_NHL_HPP | ||||
3 | |||||
4 | #include <ndn-cpp-dev/face.hpp> | ||||
5 | #include "nlsr_adjacent.hpp" | ||||
6 | #include <list> | ||||
7 | #include <iostream> | ||||
8 | |||||
9 | #include "nlsr_nexthop.hpp" | ||||
10 | |||||
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 11 | namespace nlsr |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 12 | { |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 13 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 14 | using namespace std; |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 15 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 16 | class Nhl |
17 | { | ||||
18 | public: | ||||
19 | Nhl() | ||||
20 | { | ||||
21 | } | ||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 22 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 23 | ~Nhl() |
24 | { | ||||
25 | } | ||||
26 | void addNextHop(NextHop &nh); | ||||
27 | void removeNextHop(NextHop &nh); | ||||
28 | void sortNhl(); | ||||
29 | int getNhlSize() | ||||
30 | { | ||||
31 | return nexthopList.size(); | ||||
32 | } | ||||
33 | void resetNhl() | ||||
34 | { | ||||
35 | if (nexthopList.size() > 0 ) | ||||
36 | { | ||||
37 | nexthopList.clear(); | ||||
38 | } | ||||
39 | } | ||||
40 | std::list< NextHop >& getNextHopList() | ||||
41 | { | ||||
42 | return nexthopList; | ||||
43 | } | ||||
44 | |||||
45 | private: | ||||
46 | std::list< NextHop > nexthopList; | ||||
47 | }; | ||||
48 | |||||
49 | ostream& | ||||
50 | operator<<(ostream& os, Nhl& nhl); | ||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 51 | |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame] | 52 | }//namespace nlsr |
53 | |||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 54 | #endif |