26 #include <ndn-cxx/util/ostream-joiner.hpp>
53 for (
struct {std::set<NextHop>::iterator lItr;
54 std::set<NextHop>::iterator rItr;} pair = {slhs.
begin(), srhs.
begin()};
55 (pair.lItr != slhs.
end() || pair.rItr != srhs.
end());
56 pair.rItr++, pair.lItr++) {
57 if (!((*pair.lItr) == (*pair.rItr))) {
74 std::copy(nhl.
cbegin(), nhl.
cend(), ndn::make_ostream_joiner(os,
"\n "));
81 auto it = std::find_if(m_nexthopList.begin(), m_nexthopList.end(),
83 if (it == m_nexthopList.end()) {
84 m_nexthopList.insert(nh);
88 m_nexthopList.insert(nh);
95 auto it = std::find_if(m_nexthopList.begin(), m_nexthopList.end(),
97 if (it != m_nexthopList.end()) {
98 m_nexthopList.erase(it);
Data abstraction for Nexthop.
const std::string & getConnectingFaceUri() const
double getRouteCost() const
uint64_t getRouteCostAsAdjustedInteger() const
void addNextHop(const NextHop &nh)
Adds a next hop to the list.
const_iterator cend() const
const_iterator cbegin() const
void removeNextHop(const NextHop &nh)
Remove a next hop from the Next Hop list.
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California,...
static bool nexthopAddCompare(const NextHop &nh1, const NextHop &nh2)
static bool nexthopRemoveCompare(const NextHop &nh1, const NextHop &nh2)
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
bool operator==(const NamePrefixTableEntry &lhs, const NamePrefixTableEntry &rhs)
bool operator!=(const NexthopList &lhs, const NexthopList &rhs)