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. More...
 
std::list< ndn::Name > getNames () const
 
bool insert (const ndn::Name &name, const std::string &source="")
 Inserts name and source combination. More...
 
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 39 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 29 of file name-prefix-list.cpp.

Member Function Documentation

◆ clear()

void nlsr::NamePrefixList::clear ( )
inline

Definition at line 79 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 44 of file name-prefix-list.cpp.

◆ getNames()

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

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

◆ insert()

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

Inserts name and source combination.

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

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

◆ size()

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

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

Friends And Related Function Documentation

◆ operator<<

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

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

◆ operator==

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

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