blob: 9055b506f5376a060f96fd2677286aef2ba2dee8 [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
akmhoqueb1710aa2014-02-19 17:13:36 -060011namespace nlsr {
12
akmhoque298385a2014-02-13 14:13:09 -060013using namespace std;
14
15class Nhl
16{
17public:
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
44private:
45 std::list< NextHop > nexthopList;
46};
47
48ostream&
49operator<<(ostream& os, Nhl& nhl);
50
akmhoqueb1710aa2014-02-19 17:13:36 -060051}//namespace nlsr
52
akmhoque298385a2014-02-13 14:13:09 -060053#endif