26 #ifndef NFD_RIB_RIB_ENTRY_HPP
27 #define NFD_RIB_RIB_ENTRY_HPP
36 class RibEntry :
public enable_shared_from_this<RibEntry>
44 : m_nRoutesWithCaptureSet(0)
61 addChild(shared_ptr<RibEntry> child);
66 const std::list<shared_ptr<RibEntry>>&
127 RouteList::const_iterator
177 setParent(shared_ptr<RibEntry> parent);
181 std::list<shared_ptr<RibEntry>> m_children;
182 shared_ptr<RibEntry> m_parent;
184 RouteList m_inheritedRoutes;
192 uint64_t m_nRoutesWithCaptureSet;
208 RibEntry::setParent(shared_ptr<RibEntry> parent)
213 inline shared_ptr<RibEntry>
219 inline const std::list<shared_ptr<RibEntry> >&
234 return m_inheritedRoutes;
240 return m_routes.begin();
246 return m_routes.end();
252 return m_routes.begin();
258 return m_routes.end();
267 #endif // NFD_RIB_RIB_ENTRY_HPP
void removeInheritedRoute(const Route &route)
void eraseRoute(const Route &route)
erases a Route with the same faceId and origin
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)
const Route * getRouteWithSecondLowestCostByFaceId(uint64_t faceId) const
bool insertRoute(const Route &route)
inserts a new route into the entry's route list If another route already exists with the same faceId ...
std::list< Route > RouteList
void setName(const Name &prefix)
void removeChild(shared_ptr< RibEntry > child)
Table::const_iterator iterator
const_iterator begin() const
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
const_iterator end() const
const Name & getName() const
const std::list< shared_ptr< RibEntry > > & getChildren() const
RouteList::iterator iterator
represents a route for a name prefix
RouteList::const_iterator const_iterator
bool hasInheritedRoute(const Route &route) const
Determines if the entry has an inherited route with a matching face ID.
shared_ptr< RibEntry > getParent() const
void addInheritedRoute(const Route &route)
bool hasChildInheritOnFaceId(uint64_t faceId) const
Determines if the entry has an inherited route with the passed face ID and its child inherit flag set...
void addChild(shared_ptr< RibEntry > child)
represents a RIB entry, which contains one or more Routes with the same prefix
size_t getNRoutes() const
RouteList::const_iterator findInheritedRoute(const Route &route) const
Finds an inherited route with a matching face ID.
const Route * getRouteWithLowestCostAndChildInheritByFaceId(uint64_t faceId) const
Returns the route with the lowest cost that has the passed face ID and its child inherit flag set...
iterator findRoute(const Route &route)
bool hasFaceId(const uint64_t faceId) const
const Route * getRouteWithLowestCostByFaceId(uint64_t faceId) const
Returns the route with the lowest cost that has the passed face ID.
const RouteList & getInheritedRoutes() const
Returns the routes this namespace has inherited.
bool hasRoute(const Route &route)