blob: 9f6bd761b7f343005e5ea07d0351e0d4f0cb36ce [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#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
11namespace nlsr
12{
13
14 using namespace std;
15
16 class Nhl
17 {
18 public:
19 Nhl()
20 {
21 }
22
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);
51
52}//namespace nlsr
53
54#endif