nlsr::NexthopList Class Reference

#include <nexthop-list.hpp>

Public Types

typedef std::set< NextHop, NextHopComparator >::const_iterator const_iterator
 
typedef std::set< NextHop, NextHopComparator >::iterator iterator
 
typedef std::set< NextHop, NextHopComparator >::reverse_iterator reverse_iterator
 

Public Member Functions

 NexthopList ()=default
 
void addNextHop (const NextHop &nh)
 Adds a next hop to the list. More...
 
iterator begin ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
iterator end ()
 
const std::set< NextHop, NextHopComparator > & getNextHops () const
 
reverse_iterator rbegin () const
 
void removeNextHop (const NextHop &nh)
 Remove a next hop from the Next Hop list. More...
 
reverse_iterator rend () const
 
size_t size () const
 

Detailed Description

Definition at line 47 of file nexthop-list.hpp.

Member Typedef Documentation

◆ const_iterator

◆ iterator

Definition at line 88 of file nexthop-list.hpp.

◆ reverse_iterator

Constructor & Destructor Documentation

◆ NexthopList()

nlsr::NexthopList::NexthopList ( )
default

Member Function Documentation

◆ addNextHop()

void nlsr::NexthopList::addNextHop ( const NextHop nh)

Adds a next hop to the list.

Parameters
nhThe next hop.

Adds a next hop to this object. If the next hop is new it is added. If the next hop already exists in the list then that next hop's route cost is updated.

Definition at line 79 of file nexthop-list.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ begin()

iterator nlsr::NexthopList::begin ( )
inline

Definition at line 93 of file nexthop-list.hpp.

+ Here is the caller graph for this function:

◆ cbegin()

const_iterator nlsr::NexthopList::cbegin ( ) const
inline

Definition at line 105 of file nexthop-list.hpp.

+ Here is the caller graph for this function:

◆ cend()

const_iterator nlsr::NexthopList::cend ( ) const
inline

Definition at line 111 of file nexthop-list.hpp.

+ Here is the caller graph for this function:

◆ clear()

void nlsr::NexthopList::clear ( )
inline

Definition at line 77 of file nexthop-list.hpp.

+ Here is the caller graph for this function:

◆ end()

iterator nlsr::NexthopList::end ( )
inline

Definition at line 99 of file nexthop-list.hpp.

+ Here is the caller graph for this function:

◆ getNextHops()

const std::set<NextHop, NextHopComparator>& nlsr::NexthopList::getNextHops ( ) const
inline

Definition at line 83 of file nexthop-list.hpp.

+ Here is the caller graph for this function:

◆ rbegin()

reverse_iterator nlsr::NexthopList::rbegin ( ) const
inline

Definition at line 117 of file nexthop-list.hpp.

+ Here is the caller graph for this function:

◆ removeNextHop()

void nlsr::NexthopList::removeNextHop ( const NextHop nh)

Remove a next hop from the Next Hop list.

Parameters
nhThe NextHop we want to remove.

The next hop gets removed only if both next hop face and route cost are same.

Definition at line 93 of file nexthop-list.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rend()

reverse_iterator nlsr::NexthopList::rend ( ) const
inline

Definition at line 123 of file nexthop-list.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

size_t nlsr::NexthopList::size ( ) const
inline

Definition at line 71 of file nexthop-list.hpp.

+ Here is the caller graph for this function: