nlsr::NexthopListT< T > Class Template Reference

#include <nexthop-list.hpp>

+ Inheritance diagram for nlsr::NexthopListT< T >:

Public Types

typedef std::set< NextHop, T >::const_iterator const_iterator
 
typedef std::set< NextHop, T >::iterator iterator
 
typedef std::set< NextHop, T >::reverse_iterator reverse_iterator
 
typedef T value_type
 

Public Member Functions

 NexthopListT ()=default
 
void addNextHop (const NextHop &nh)
 Adds a next hop to the list. More...
 
iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
iterator end () const
 
const std::set< NextHop, T > & 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

template<typename T = NextHopComparator>
class nlsr::NexthopListT< T >

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

Member Typedef Documentation

◆ const_iterator

template<typename T = NextHopComparator>
typedef std::set<NextHop, T>::const_iterator nlsr::NexthopListT< T >::const_iterator

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

◆ iterator

template<typename T = NextHopComparator>
typedef std::set<NextHop, T>::iterator nlsr::NexthopListT< T >::iterator

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

◆ reverse_iterator

template<typename T = NextHopComparator>
typedef std::set<NextHop, T>::reverse_iterator nlsr::NexthopListT< T >::reverse_iterator

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

◆ value_type

template<typename T = NextHopComparator>
typedef T nlsr::NexthopListT< T >::value_type

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

Constructor & Destructor Documentation

◆ NexthopListT()

template<typename T = NextHopComparator>
nlsr::NexthopListT< T >::NexthopListT ( )
default

Member Function Documentation

◆ addNextHop()

template<typename T = NextHopComparator>
void nlsr::NexthopListT< T >::addNextHop ( const NextHop nh)
inline

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 83 of file nexthop-list.hpp.

◆ begin()

template<typename T = NextHopComparator>
iterator nlsr::NexthopListT< T >::begin ( ) const
inline

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

◆ cbegin()

template<typename T = NextHopComparator>
const_iterator nlsr::NexthopListT< T >::cbegin ( ) const
inline

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

◆ cend()

template<typename T = NextHopComparator>
const_iterator nlsr::NexthopListT< T >::cend ( ) const
inline

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

◆ clear()

template<typename T = NextHopComparator>
void nlsr::NexthopListT< T >::clear ( )
inline

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

◆ end()

template<typename T = NextHopComparator>
iterator nlsr::NexthopListT< T >::end ( ) const
inline

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

◆ getNextHops()

template<typename T = NextHopComparator>
const std::set<NextHop, T>& nlsr::NexthopListT< T >::getNextHops ( ) const
inline

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

◆ rbegin()

template<typename T = NextHopComparator>
reverse_iterator nlsr::NexthopListT< T >::rbegin ( ) const
inline

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

◆ removeNextHop()

template<typename T = NextHopComparator>
void nlsr::NexthopListT< T >::removeNextHop ( const NextHop nh)
inline

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 102 of file nexthop-list.hpp.

◆ rend()

template<typename T = NextHopComparator>
reverse_iterator nlsr::NexthopListT< T >::rend ( ) const
inline

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

◆ size()

template<typename T = NextHopComparator>
size_t nlsr::NexthopListT< T >::size ( ) const
inline

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