blob: b8b6695c9dcc4044e95b6918277130d6020db4cb [file] [log] [blame]
#include <string>
#include <boost/cstdint.hpp>
#ifndef NLSR_ADJACENT_HPP
#define NLSR_ADJACENT_HPP
namespace nlsr {
class Adjacent
{
public:
Adjacent()
: m_name("")
, m_connectingFace(0)
, m_linkCost(10.0)
, m_status(0)
, m_interestTimedOutNo(0)
{
}
Adjacent(const std::string& an)
: m_connectingFace(0)
, m_linkCost(0.0)
, m_status(0)
, m_interestTimedOutNo(0)
{
m_name = an;
}
Adjacent(const std::string& an, uint32_t cf, double lc, uint32_t s, uint32_t iton);
std::string
getName() const
{
return m_name;
}
void
setName(const std::string& an)
{
m_name = an;
}
uint32_t
getConnectingFace() const
{
return m_connectingFace;
}
void
setConnectingFace(uint32_t cf)
{
m_connectingFace = cf;
}
double
getLinkCost() const
{
return m_linkCost;
}
void
setLinkCost(double lc)
{
m_linkCost = lc;
}
uint32_t
getStatus() const
{
return m_status;
}
void
setStatus(uint32_t s)
{
m_status = s;
}
uint32_t
getInterestTimedOutNo() const
{
return m_interestTimedOutNo;
}
void
setInterestTimedOutNo(uint32_t iton)
{
m_interestTimedOutNo = iton;
}
bool
operator==(const Adjacent& adjacent) const;
bool
compareName(const Adjacent& adjacent);
private:
std::string m_name;
uint32_t m_connectingFace;
double m_linkCost;
uint32_t m_status;
uint32_t m_interestTimedOutNo;
};
std::ostream&
operator<<(std::ostream& os, const Adjacent& adj);
} // namespace nlsr
#endif //NLSR_ADJACENT_HPP