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