blob: b8a0af0f8871ac6cb0384074916472817c98d855 [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#ifndef NLSR_NEXTHOP_HPP
2#define NLSR_NEXTHOP_HPP
3
4#include<iostream>
5
6namespace nlsr
7{
8
akmhoque5a44dd42014-03-12 18:11:32 -05009 using namespace std;
akmhoqueba094742014-02-28 11:47:21 -060010
akmhoque5a44dd42014-03-12 18:11:32 -050011 class NextHop
12 {
13 public:
14 NextHop()
15 : connectingFace(0)
16 , routeCost(0)
akmhoqueba094742014-02-28 11:47:21 -060017 {
akmhoque5a44dd42014-03-12 18:11:32 -050018 }
akmhoqueba094742014-02-28 11:47:21 -060019
akmhoque5a44dd42014-03-12 18:11:32 -050020 NextHop(int cf, double rc)
21 {
22 connectingFace=cf;
23 routeCost=rc;
24 }
akmhoqueba094742014-02-28 11:47:21 -060025
akmhoque5a44dd42014-03-12 18:11:32 -050026 int getConnectingFace() const
27 {
28 return connectingFace;
29 }
akmhoqueba094742014-02-28 11:47:21 -060030
akmhoque5a44dd42014-03-12 18:11:32 -050031 void setConnectingFace(int cf)
32 {
33 connectingFace=cf;
34 }
akmhoqueba094742014-02-28 11:47:21 -060035
akmhoque5a44dd42014-03-12 18:11:32 -050036 double getRouteCost() const
37 {
38 return routeCost;
39 }
akmhoqueba094742014-02-28 11:47:21 -060040
akmhoque5a44dd42014-03-12 18:11:32 -050041 void setRouteCost(double rc)
42 {
43 routeCost=rc;
44 }
45 private:
46 int connectingFace;
47 double routeCost;
48 };
akmhoqueba094742014-02-28 11:47:21 -060049
50
akmhoque5a44dd42014-03-12 18:11:32 -050051 ostream&
52 operator<<(ostream& os, NextHop& nh);
akmhoqueba094742014-02-28 11:47:21 -060053
54}//namespace nlsr
55
56#endif