blob: 9f6bd761b7f343005e5ea07d0351e0d4f0cb36ce [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
akmhoque1fd8c1e2014-02-19 19:41:49 -060011namespace nlsr
akmhoque298385a2014-02-13 14:13:09 -060012{
akmhoque298385a2014-02-13 14:13:09 -060013
akmhoque1fd8c1e2014-02-19 19:41:49 -060014 using namespace std;
akmhoque298385a2014-02-13 14:13:09 -060015
akmhoque1fd8c1e2014-02-19 19:41:49 -060016 class Nhl
17 {
18 public:
19 Nhl()
20 {
21 }
akmhoque298385a2014-02-13 14:13:09 -060022
akmhoque1fd8c1e2014-02-19 19:41:49 -060023 ~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);
akmhoque298385a2014-02-13 14:13:09 -060051
akmhoqueb1710aa2014-02-19 17:13:36 -060052}//namespace nlsr
53
akmhoque298385a2014-02-13 14:13:09 -060054#endif