routing-table-entry.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NLSR_ROUTING_TABLE_ENTRY_HPP
23 #define NLSR_ROUTING_TABLE_ENTRY_HPP
24 
25 #include "nexthop-list.hpp"
26 
27 #include <iostream>
28 #include <ndn-cxx/name.hpp>
29 
30 namespace nlsr {
31 
33 {
34 public:
36  {
37  }
38 
40  {
41  }
42 
43  RoutingTableEntry(const ndn::Name& dest)
44  {
45  m_destination = dest;
46  }
47 
48  const ndn::Name&
50  {
51  return m_destination;
52  }
53 
56  {
57  return m_nexthopList;
58  }
59 
60  const NexthopList&
62  {
63  return m_nexthopList;
64  }
65 
66  inline bool
68  {
69  return ((*this).getDestination() == rhs.getDestination()
70  &&
71  (*this).getNexthopList() == rhs.getNexthopList());
72  }
73 
74 protected:
75  ndn::Name m_destination;
77 };
78 
79 std::ostream&
80 operator<<(std::ostream& os, const RoutingTableEntry& rte);
81 
82 } // namespace nlsr
83 
84 #endif // NLSR_ROUTING_TABLE_ENTRY_HPP
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
Definition: adjacent.cpp:83
const ndn::Name & getDestination() const
RoutingTableEntry(const ndn::Name &dest)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
const NexthopList & getNexthopList() const
bool operator==(RoutingTableEntry &rhs)