akmhoque | ba09474 | 2014-02-28 11:47:21 -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 | |||||
11 | namespace nlsr | ||||
12 | { | ||||
13 | |||||
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame^] | 14 | using namespace std; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 15 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame^] | 16 | class Nhl |
17 | { | ||||
18 | public: | ||||
19 | Nhl() | ||||
20 | : nexthopList() | ||||
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 21 | { |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame^] | 22 | } |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 23 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame^] | 24 | ~Nhl() |
25 | { | ||||
26 | } | ||||
27 | void addNextHop(NextHop &nh); | ||||
28 | void removeNextHop(NextHop &nh); | ||||
29 | void sortNhl(); | ||||
30 | int getNhlSize() | ||||
31 | { | ||||
32 | return nexthopList.size(); | ||||
33 | } | ||||
34 | void resetNhl() | ||||
35 | { | ||||
36 | if (nexthopList.size() > 0 ) | ||||
37 | { | ||||
38 | nexthopList.clear(); | ||||
39 | } | ||||
40 | } | ||||
41 | std::list< NextHop >& getNextHopList() | ||||
42 | { | ||||
43 | return nexthopList; | ||||
44 | } | ||||
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 45 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame^] | 46 | private: |
47 | std::list< NextHop > nexthopList; | ||||
48 | }; | ||||
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 49 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame^] | 50 | ostream& |
51 | operator<<(ostream& os, Nhl& nhl); | ||||
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 52 | |
53 | }//namespace nlsr | ||||
54 | |||||
55 | #endif |