blob: ef43373a2c785fb391340bf0734bc00fb1bff72f [file] [log] [blame]
akmhoque53353462014-04-22 08:43:45 -05001#ifndef NLSR_NHL_HPP
2#define NLSR_NHL_HPP
3
4#include <ndn-cpp-dev/face.hpp>
5#include <list>
6#include <iostream>
7
8#include "nexthop.hpp"
9#include "adjacent.hpp"
10
11namespace nlsr {
12
13class Nhl
14{
15public:
16 Nhl()
17 : m_nexthopList()
18 {
19 }
20
21 ~Nhl()
22 {
23 }
24 void
25 addNextHop(NextHop& nh);
26
27 void
28 removeNextHop(NextHop& nh);
29
30 void
31 sort();
32
33 int
34 getSize()
35 {
36 return m_nexthopList.size();
37 }
38
39 void
40 reset()
41 {
42 if (m_nexthopList.size() > 0)
43 {
44 m_nexthopList.clear();
45 }
46 }
47
48 std::list<NextHop>&
49 getNextHopList()
50 {
51 return m_nexthopList;
52 }
53
54private:
55 std::list<NextHop> m_nexthopList;
56};
57
58std::ostream&
59operator<<(std::ostream& os, Nhl& nhl);
60
61}//namespace nlsr
62
63#endif //NLSR_NLH_HPP