akmhoque | 87347a3 | 2014-01-31 11:00:44 -0600 | [diff] [blame^] | 1 | #include<iostream> |
| 2 | #include<string> |
| 3 | |
| 4 | #include "adjacent.hpp" |
| 5 | |
| 6 | using namespace std; |
| 7 | |
| 8 | Adjacent::Adjacent(const string& an, int cf, double lc, int s, int iton){ |
| 9 | adjacentName=an; |
| 10 | connectingFace=cf; |
| 11 | linkCost=lc; |
| 12 | status=s; |
| 13 | interestTimedOutNo=iton; |
| 14 | } |
| 15 | |
| 16 | std::ostream& |
| 17 | operator << (std::ostream &os, Adjacent &adj){ |
| 18 | cout<<"Adjacent : "<< adj.getAdjacentName() << endl; |
| 19 | cout<<"Connecting Face: "<<adj.getConnectingFace()<<endl; |
| 20 | cout<<"Link Cost: "<<adj.getLinkCost()<<endl; |
| 21 | cout<<"Status: "<<adj.getStatus()<<endl; |
| 22 | cout<<"Interest Timed out: "<<adj.getInterestTimedOutNo()<<endl; |
| 23 | return os; |
| 24 | } |