NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nfd::Pit Class Reference

represents the Interest Table More...

#include <pit.hpp>

Inheritance diagram for nfd::Pit:
Collaboration diagram for nfd::Pit:

Classes

class  const_iterator
 

Public Member Functions

 Pit (NameTree &nameTree)
 
 ~Pit ()
 
size_t size () const
 
std::pair< shared_ptr
< pit::Entry >, bool > 
insert (const Interest &interest)
 inserts a PIT entry for Interest More...
 
pit::DataMatchResult findAllDataMatches (const Data &data) const
 performs a Data match More...
 
void erase (shared_ptr< pit::Entry > pitEntry)
 erases a PIT Entry More...
 
const_iterator begin () const
 returns an iterator pointing to the first PIT entry More...
 
const_iterator end () const
 returns an iterator referring to the past-the-end PIT entry More...
 

Detailed Description

represents the Interest Table

Definition at line 48 of file pit.hpp.

Constructor & Destructor Documentation

nfd::Pit::Pit ( NameTree nameTree)
explicit

Definition at line 54 of file pit.cpp.

nfd::Pit::~Pit ( )

Definition at line 60 of file pit.cpp.

Member Function Documentation

Pit::const_iterator nfd::Pit::begin ( ) const

returns an iterator pointing to the first PIT entry

Note
Iteration order is implementation-specific and is undefined
The returned iterator may get invalidated if PIT or another NameTree-based table is modified

Definition at line 120 of file pit.cpp.

References nfd::NameTree::fullEnumerate().

Pit::const_iterator nfd::Pit::end ( ) const
inline

returns an iterator referring to the past-the-end PIT entry

Note
The returned iterator may get invalidated if PIT or another NameTree-based table is modified

Definition at line 149 of file pit.hpp.

References nfd::NameTree::end().

void nfd::Pit::erase ( shared_ptr< pit::Entry pitEntry)

erases a PIT Entry

Definition at line 108 of file pit.cpp.

References nfd::NameTree::eraseEntryIfEmpty(), and nfd::NameTree::get().

pit::DataMatchResult nfd::Pit::findAllDataMatches ( const Data &  data) const

performs a Data match

Returns
an iterable of all PIT entries matching data

Definition at line 91 of file pit.cpp.

References nfd::NameTree::findAllMatches().

std::pair< shared_ptr< pit::Entry >, bool > nfd::Pit::insert ( const Interest &  interest)

inserts a PIT entry for Interest

If an entry for exact same name and selectors exists, that entry is returned.

Returns
the entry, and true for new entry, false for existing entry

Definition at line 65 of file pit.cpp.

References nfd::NameTree::lookup().

size_t nfd::Pit::size ( ) const
inline
Returns
number of entries

Definition at line 143 of file pit.hpp.

Referenced by nfd::Pit::const_iterator::operator++().


The documentation for this class was generated from the following files: