routing-table-pool-entry.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
23 
24 namespace nlsr {
25 
26 std::ostream&
27 operator<<(std::ostream& os, RoutingTablePoolEntry& rtpe)
28 {
29  os << "RoutingTablePoolEntry("
30  << "Destination router: " << rtpe.getDestination()
31  << "Next hop list: ";
32  for (const auto& nh : rtpe.getNexthopList()) {
33  os << nh;
34  }
35  os << "NamePrefixTableEntries using this entry:";
36  for (const auto& entryPtr : rtpe.namePrefixTableEntries) {
37  os << entryPtr.first << ":";
38  }
39 
40  return os;
41 }
42 
43 bool
45 {
46  return (lhs.getDestination() == rhs.getDestination()
47  &&
48  lhs.getNexthopList() == rhs.getNexthopList());
49 }
50 
51 } // namespace nlsr
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
Definition: adjacent.cpp:99
bool operator==(const NamePrefixTableEntry &lhs, const NamePrefixTableEntry &rhs)
const ndn::Name & getDestination() const
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
std::unordered_map< ndn::Name, std::weak_ptr< NamePrefixTableEntry > > namePrefixTableEntries