| #ifndef NLSR_NHL_HPP |
| #define NLSR_NHL_HPP |
| |
| #include <ndn-cpp-dev/face.hpp> |
| #include "nlsr_adjacent.hpp" |
| #include <list> |
| #include <iostream> |
| |
| #include "nlsr_nexthop.hpp" |
| |
| namespace nlsr |
| { |
| |
| using namespace std; |
| |
| class Nhl |
| { |
| public: |
| Nhl() |
| { |
| } |
| |
| ~Nhl() |
| { |
| } |
| void addNextHop(NextHop &nh); |
| void removeNextHop(NextHop &nh); |
| void sortNhl(); |
| int getNhlSize() |
| { |
| return nexthopList.size(); |
| } |
| void resetNhl() |
| { |
| if (nexthopList.size() > 0 ) |
| { |
| nexthopList.clear(); |
| } |
| } |
| std::list< NextHop >& getNextHopList() |
| { |
| return nexthopList; |
| } |
| |
| private: |
| std::list< NextHop > nexthopList; |
| }; |
| |
| ostream& |
| operator<<(ostream& os, Nhl& nhl); |
| |
| }//namespace nlsr |
| |
| #endif |