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