blob: 8d97db61b68b2199d44001804a7600c0fba8e718 [file] [log] [blame]
#ifndef ADJACENT_HPP
#define ADJACENT_HPP
namespace nlsr
{
using namespace std;
class Adjacent
{
public:
Adjacent()
:adjacentName()
,connectingFace(0)
,linkCost(10.0)
,status(0)
,interestTimedOutNo(0)
{
}
Adjacent(const string& an)
:connectingFace(0)
,linkCost(0.0)
,status(0)
,interestTimedOutNo(0)
{
adjacentName=an;
}
Adjacent(const string& an, int cf, double lc, int s, int iton);
string getAdjacentName()
{
return adjacentName;
}
void setAdjacentName(const string& an)
{
adjacentName=an;
}
int getConnectingFace()
{
return connectingFace;
}
void setConnectingFace(int cf)
{
connectingFace=cf;
}
double getLinkCost()
{
return linkCost;
}
void setLinkCost(double lc)
{
linkCost=lc;
}
int getStatus()
{
return status;
}
void setStatus(int s)
{
status=s;
}
int getInterestTimedOutNo()
{
return interestTimedOutNo;
}
void setInterestTimedOutNo(int iton)
{
interestTimedOutNo=iton;
}
bool isAdjacentEqual(Adjacent& adj);
private:
string adjacentName;
int connectingFace;
double linkCost;
int status;
int interestTimedOutNo;
};
std::ostream&
operator << (std::ostream &os, Adjacent &adj);
} // namespace nlsr
#endif