Loading...
Searching...
No Matches
nlsr::NamePrefixList Class Reference

#include <name-prefix-list.hpp>

+ Inheritance diagram for nlsr::NamePrefixList:
+ Collaboration diagram for nlsr::NamePrefixList:

Public Member Functions

 NamePrefixList ()
 
 NamePrefixList (std::initializer_list< ndn::Name > names)
 
void clear ()
 
bool erase (const ndn::Name &name, const std::string &source="")
 Deletes name and source combination.
 
std::list< ndn::Name > getNames () const
 
std::list< PrefixInfogetPrefixInfo () const
 
const PrefixInfogetPrefixInfoForName (const ndn::Name &name) const
 
bool insert (const ndn::Name &name, const std::string &source="", double cost=0)
 Inserts name and source combination.
 
bool insert (const PrefixInfo &nameCost)
 
size_t size () const
 

Friends

std::ostream & operator<< (std::ostream &os, const NamePrefixList &list)
 
bool operator== (const NamePrefixList &lhs, const NamePrefixList &rhs)
 

Detailed Description

Definition at line 102 of file name-prefix-list.hpp.

Constructor & Destructor Documentation

◆ NamePrefixList() [1/2]

nlsr::NamePrefixList::NamePrefixList ( )
default

◆ NamePrefixList() [2/2]

nlsr::NamePrefixList::NamePrefixList ( std::initializer_list< ndn::Name >  names)
explicit

Definition at line 30 of file name-prefix-list.cpp.

Member Function Documentation

◆ clear()

void nlsr::NamePrefixList::clear ( )
inline

Definition at line 151 of file name-prefix-list.hpp.

◆ erase()

bool nlsr::NamePrefixList::erase ( const ndn::Name &  name,
const std::string &  source = "" 
)

Deletes name and source combination.

Return values
trueName and source combination is deleted.
falseName and source combination does not exist.

Definition at line 54 of file name-prefix-list.cpp.

◆ getNames()

std::list< ndn::Name > nlsr::NamePrefixList::getNames ( ) const

Definition at line 77 of file name-prefix-list.cpp.

◆ getPrefixInfo()

std::list< PrefixInfo > nlsr::NamePrefixList::getPrefixInfo ( ) const

Definition at line 87 of file name-prefix-list.cpp.

◆ getPrefixInfoForName()

const PrefixInfo & nlsr::NamePrefixList::getPrefixInfoForName ( const ndn::Name &  name) const

Definition at line 69 of file name-prefix-list.cpp.

◆ insert() [1/2]

bool nlsr::NamePrefixList::insert ( const ndn::Name &  name,
const std::string &  source = "",
double  cost = 0 
)

Inserts name and source combination.

Return values
trueName and source combination is inserted.
falseName and source combination already exists.

Definition at line 38 of file name-prefix-list.cpp.

◆ insert() [2/2]

bool nlsr::NamePrefixList::insert ( const PrefixInfo nameCost)

Definition at line 46 of file name-prefix-list.cpp.

◆ size()

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

Definition at line 128 of file name-prefix-list.hpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const NamePrefixList list 
)
friend

Definition at line 109 of file name-prefix-list.cpp.

◆ operator==

bool operator== ( const NamePrefixList lhs,
const NamePrefixList rhs 
)
friend

Definition at line 162 of file name-prefix-list.hpp.