nlsr::Map Class Reference

#include <map.hpp>

Public Member Functions

 Map ()
 
void addEntry (const ndn::Name &rtrName)
 Add a map entry to this map. More...
 
template<typename IteratorType >
void createFromAdjLsdb (IteratorType begin, IteratorType end)
 
template<typename IteratorType >
void createFromCoordinateLsdb (IteratorType begin, IteratorType end)
 
ndn::optional< ndn::Name > getRouterNameByMappingNo (int32_t mn) const
 
ndn::optional< int32_t > getMappingNoByRouterName (const ndn::Name &rName)
 
void reset ()
 
size_t getMapSize () const
 
void writeLog ()
 

Detailed Description

Definition at line 57 of file map.hpp.

Constructor & Destructor Documentation

◆ Map()

nlsr::Map::Map ( )
inline

Definition at line 60 of file map.hpp.

Member Function Documentation

◆ addEntry()

void nlsr::Map::addEntry ( const ndn::Name &  rtrName)

Add a map entry to this map.

Parameters
rtrNameThe name of the router.

Adds a router to this map. Each entry is also given an arbitrary, ascending mappingNo (mapping number).

Definition at line 33 of file map.cpp.

◆ createFromAdjLsdb()

template<typename IteratorType >
void nlsr::Map::createFromAdjLsdb ( IteratorType  begin,
IteratorType  end 
)
inline

Populates the Map with AdjacencyLsas.

Note
IteratorType must an iterator type, and begin to end must represent a valid range.

Definition at line 80 of file map.hpp.

Here is the caller graph for this function:

◆ createFromCoordinateLsdb()

template<typename IteratorType >
void nlsr::Map::createFromCoordinateLsdb ( IteratorType  begin,
IteratorType  end 
)
inline

Populates the Map with CoordinateLsas.

Note
IteratorType must an iterator type, and begin to end must represent a valid range.

Definition at line 97 of file map.hpp.

Here is the caller graph for this function:

◆ getMappingNoByRouterName()

ndn::optional< int32_t > nlsr::Map::getMappingNoByRouterName ( const ndn::Name &  rName)

Definition at line 61 of file map.cpp.

Here is the caller graph for this function:

◆ getMapSize()

size_t nlsr::Map::getMapSize ( ) const
inline

Definition at line 115 of file map.hpp.

Here is the caller graph for this function:

◆ getRouterNameByMappingNo()

ndn::optional< ndn::Name > nlsr::Map::getRouterNameByMappingNo ( int32_t  mn) const

Definition at line 48 of file map.cpp.

Here is the caller graph for this function:

◆ reset()

void nlsr::Map::reset ( )

Definition at line 74 of file map.cpp.

◆ writeLog()

void nlsr::Map::writeLog ( )

Definition at line 81 of file map.cpp.

Here is the caller graph for this function: