blob: ed8d319d12947e9e7d0596884e50f18e096417ff [file] [log] [blame]
akmhoque53353462014-04-22 08:43:45 -05001#ifndef NLSR_NEXTHOP_HPP
2#define NLSR_NEXTHOP_HPP
3
4#include <iostream>
akmhoquefdbddb12014-05-02 18:35:19 -05005#include <boost/cstdint.hpp>
akmhoque53353462014-04-22 08:43:45 -05006
7namespace nlsr {
8class NextHop
9{
10public:
11 NextHop()
12 : m_connectingFace(0)
13 , m_routeCost(0)
14 {
15 }
16
akmhoquefdbddb12014-05-02 18:35:19 -050017 NextHop(uint32_t cf, double rc)
akmhoque53353462014-04-22 08:43:45 -050018 {
19 m_connectingFace = cf;
20 m_routeCost = rc;
21 }
22
akmhoquefdbddb12014-05-02 18:35:19 -050023 uint32_t
akmhoque53353462014-04-22 08:43:45 -050024 getConnectingFace() const
25 {
26 return m_connectingFace;
27 }
28
29 void
akmhoquefdbddb12014-05-02 18:35:19 -050030 setConnectingFace(uint32_t cf)
akmhoque53353462014-04-22 08:43:45 -050031 {
32 m_connectingFace = cf;
33 }
34
35 double
36 getRouteCost() const
37 {
38 return m_routeCost;
39 }
40
41 void
42 setRouteCost(double rc)
43 {
44 m_routeCost = rc;
45 }
46
47private:
akmhoquefdbddb12014-05-02 18:35:19 -050048 uint32_t m_connectingFace;
akmhoque53353462014-04-22 08:43:45 -050049 double m_routeCost;
50};
51
52
53std::ostream&
54operator<<(std::ostream& os, NextHop& nh);
55
56}//namespace nlsr
57
58#endif //NLSR_NEXTHOP_HPP