54 for (
struct {std::set<NextHop>::iterator lItr;
55 std::set<NextHop>::iterator rItr;} pair = {slhs.
begin(), srhs.
begin()};
56 (pair.lItr != slhs.
end() || pair.rItr != srhs.
end());
57 pair.rItr++, pair.lItr++) {
58 if (!((*pair.lItr) == (*pair.rItr))) {
75 os <<
"NexthopList(\nNext hops: ";
86 std::set<NextHop, NextHopComparator>::iterator it = std::find_if(m_nexthopList.begin(),
89 if (it == m_nexthopList.end()) {
90 m_nexthopList.insert(nh);
94 m_nexthopList.insert(nh);
101 std::set<NextHop, NextHopComparator>::iterator it = std::find_if(m_nexthopList.begin(),
104 if (it != m_nexthopList.end()) {
105 m_nexthopList.erase(it);
114 for (std::set<NextHop, NextHopComparator>::iterator it = m_nexthopList.begin();
115 it != m_nexthopList.end() ; it++, i++) {
116 NLSR_LOG_DEBUG(
"Nexthop " << i <<
": " << (*it).getConnectingFaceUri()
117 <<
" Route Cost: " << (*it).getRouteCost());
const std::set< NextHop, NextHopComparator > & getNextHops() const
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
bool operator==(const NamePrefixTableEntry &lhs, const NamePrefixTableEntry &rhs)
#define NLSR_LOG_DEBUG(x)
bool operator!=(const NexthopList &lhs, const NexthopList &rhs)
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California.
#define INIT_LOGGER(name)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.
const std::string & getConnectingFaceUri() const
static bool nexthopRemoveCompare(const NextHop &nh1, const NextHop &nh2)
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
static bool nexthopAddCompare(const NextHop &nh1, const NextHop &nh2)
void addNextHop(const NextHop &nh)
Adds a next hop to the list.
uint64_t getRouteCostAsAdjustedInteger() const
double getRouteCost() const
void removeNextHop(const NextHop &nh)
Remove a next hop from the Next Hop list.