blob: 1361d52a370cb7f77add5d0893e4ccf99ab4bf87 [file] [log] [blame]
akmhoque298385a2014-02-13 14:13:09 -06001#ifndef NLSR_NEXTHOP_HPP
2#define NLSR_NEXTHOP_HPP
3
4#include<iostream>
5
akmhoque1fd8c1e2014-02-19 19:41:49 -06006namespace nlsr
akmhoque298385a2014-02-13 14:13:09 -06007{
akmhoque298385a2014-02-13 14:13:09 -06008
akmhoque1fd8c1e2014-02-19 19:41:49 -06009 using namespace std;
akmhoque298385a2014-02-13 14:13:09 -060010
akmhoque1fd8c1e2014-02-19 19:41:49 -060011 class NextHop
12 {
13 public:
14 NextHop()
15 : connectingFace(0)
16 , routeCost(0)
17 {
18 }
akmhoque298385a2014-02-13 14:13:09 -060019
akmhoque1fd8c1e2014-02-19 19:41:49 -060020 NextHop(int cf, double rc)
21 {
22 connectingFace=cf;
23 routeCost=rc;
24 }
akmhoque298385a2014-02-13 14:13:09 -060025
akmhoque1fd8c1e2014-02-19 19:41:49 -060026 int getConnectingFace()
27 {
28 return connectingFace;
29 }
akmhoque298385a2014-02-13 14:13:09 -060030
akmhoque1fd8c1e2014-02-19 19:41:49 -060031 void setConnectingFace(int cf)
32 {
33 connectingFace=cf;
34 }
35
36 double getRouteCost()
37 {
38 return routeCost;
39 }
40
41 void setRouteCost(double rc)
42 {
43 routeCost=rc;
44 }
45 private:
46 int connectingFace;
47 double routeCost;
48 };
akmhoque298385a2014-02-13 14:13:09 -060049
50
akmhoque1fd8c1e2014-02-19 19:41:49 -060051 ostream&
52 operator<<(ostream& os, NextHop& nh);
akmhoque298385a2014-02-13 14:13:09 -060053
akmhoqueb1710aa2014-02-19 17:13:36 -060054}//namespace nlsr
55
akmhoque298385a2014-02-13 14:13:09 -060056#endif