akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame^] | 1 | #ifndef ADJACENT_HPP |
| 2 | #define ADJACENT_HPP |
| 3 | |
| 4 | using namespace std; |
| 5 | |
| 6 | class Adjacent{ |
| 7 | |
| 8 | public: |
| 9 | Adjacent() |
| 10 | :adjacentName() |
| 11 | ,connectingFace(0) |
| 12 | ,linkCost(10.0) |
| 13 | ,status(0) |
| 14 | ,interestTimedOutNo(0) |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | Adjacent(const string& an) |
| 19 | :connectingFace(0) |
| 20 | ,linkCost(0.0) |
| 21 | ,status(0) |
| 22 | ,interestTimedOutNo(0) |
| 23 | { |
| 24 | adjacentName=an; |
| 25 | } |
| 26 | |
| 27 | Adjacent(const string& an, int cf, double lc, int s, int iton); |
| 28 | |
| 29 | string getAdjacentName(){ |
| 30 | return adjacentName; |
| 31 | } |
| 32 | |
| 33 | void setAdjacentName(const string& an){ |
| 34 | adjacentName=an; |
| 35 | } |
| 36 | |
| 37 | int getConnectingFace(){ |
| 38 | return connectingFace; |
| 39 | } |
| 40 | |
| 41 | void setConnectingFace(int cf){ |
| 42 | connectingFace=cf; |
| 43 | } |
| 44 | |
| 45 | double getLinkCost(){ |
| 46 | return linkCost; |
| 47 | } |
| 48 | |
| 49 | void setLinkCost(double lc){ |
| 50 | linkCost=lc; |
| 51 | } |
| 52 | |
| 53 | int getStatus(){ |
| 54 | return status; |
| 55 | } |
| 56 | |
| 57 | void setStatus(int s){ |
| 58 | status=s; |
| 59 | } |
| 60 | |
| 61 | int getInterestTimedOutNo(){ |
| 62 | return interestTimedOutNo; |
| 63 | } |
| 64 | |
| 65 | void setInterestTimedOutNo(int iton){ |
| 66 | interestTimedOutNo=iton; |
| 67 | } |
| 68 | |
| 69 | bool isAdjacentEqual(Adjacent& adj); |
| 70 | private: |
| 71 | string adjacentName; |
| 72 | int connectingFace; |
| 73 | double linkCost; |
| 74 | int status; |
| 75 | int interestTimedOutNo; |
| 76 | }; |
| 77 | |
| 78 | std::ostream& |
| 79 | operator << (std::ostream &os, Adjacent &adj); |
| 80 | |
| 81 | #endif |