NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::name_tree::Entry Class Reference

an entry in the name tree More...

#include <name-tree-entry.hpp>

Inheritance diagram for nfd::name_tree::Entry:
Collaboration diagram for nfd::name_tree::Entry:

Public Member Functions

 Entry (const Name &prefix, Node *node)
 
const NamegetName () const
 
EntrygetParent () const
 
void setParent (Entry &entry)
 set parent of this entry More...
 
void unsetParent ()
 unset parent of this entry More...
 
bool hasChildren () const
 
const std::vector< Entry * > & getChildren () const
 
bool isEmpty () const
 
bool hasTableEntries () const
 
fib::EntrygetFibEntry () const
 
void setFibEntry (unique_ptr< fib::Entry > fibEntry)
 
bool hasPitEntries () const
 
const std::vector< shared_ptr< pit::Entry > > & getPitEntries () const
 
void insertPitEntry (shared_ptr< pit::Entry > pitEntry)
 
void erasePitEntry (pit::Entry *pitEntry)
 
measurements::EntrygetMeasurementsEntry () const
 
void setMeasurementsEntry (unique_ptr< measurements::Entry > measurementsEntry)
 
strategy_choice::EntrygetStrategyChoiceEntry () const
 
void setStrategyChoiceEntry (unique_ptr< strategy_choice::Entry > strategyChoiceEntry)
 

Static Public Member Functions

template<typename ENTRY >
static Entryget (const ENTRY &tableEntry)
 

Friends

NodegetNode (const Entry &entry)
 

Detailed Description

an entry in the name tree

Definition at line 41 of file name-tree-entry.hpp.

Constructor & Destructor Documentation

◆ Entry()

nfd::name_tree::Entry::Entry ( const Name prefix,
Node node 
)

Definition at line 31 of file name-tree-entry.cpp.

Member Function Documentation

◆ getName()

◆ getParent()

◆ setParent()

void nfd::name_tree::Entry::setParent ( Entry entry)

set parent of this entry

Parameters
entryentry of getName().getPrefix(-1)
Precondition
getParent() == nullptr
Postcondition
getParent() == &entry
entry.getChildren() contains this

Definition at line 40 of file name-tree-entry.cpp.

References getName(), getParent(), and ndn::Name::getPrefix().

Referenced by getParent(), and nfd::name_tree::NameTree::lookup().

◆ unsetParent()

void nfd::name_tree::Entry::unsetParent ( )

unset parent of this entry

Postcondition
getParent() == nullptr
parent.getChildren() does not contain this

Definition at line 52 of file name-tree-entry.cpp.

References getParent().

Referenced by nfd::name_tree::NameTree::eraseIfEmpty(), and getParent().

◆ hasChildren()

bool nfd::name_tree::Entry::hasChildren ( ) const
inline
Return values
truethis entry has at least one child
falsethis entry has no children

Definition at line 81 of file name-tree-entry.hpp.

References getChildren().

Referenced by nfd::name_tree::PartialEnumerationImpl::advance(), and isEmpty().

◆ getChildren()

const std::vector<Entry*>& nfd::name_tree::Entry::getChildren ( ) const
inline
Returns
children of this entry

Definition at line 89 of file name-tree-entry.hpp.

Referenced by nfd::name_tree::PartialEnumerationImpl::advance(), and hasChildren().

◆ isEmpty()

bool nfd::name_tree::Entry::isEmpty ( ) const
inline
Return values
truethis entry has no children and no table entries
falsethis entry has child or attached table entry

Definition at line 98 of file name-tree-entry.hpp.

References hasChildren(), and hasTableEntries().

Referenced by nfd::name_tree::NameTree::eraseIfEmpty(), and nfd::pit::Pit::Pit().

◆ hasTableEntries()

bool nfd::name_tree::Entry::hasTableEntries ( ) const
Return values
trueat least one table entries is attached
falseno table entry is attached

Definition at line 64 of file name-tree-entry.cpp.

Referenced by isEmpty().

◆ getFibEntry()

◆ setFibEntry()

void nfd::name_tree::Entry::setFibEntry ( unique_ptr< fib::Entry fibEntry)

Definition at line 73 of file name-tree-entry.cpp.

Referenced by getFibEntry(), and nfd::fib::Fib::insert().

◆ hasPitEntries()

bool nfd::name_tree::Entry::hasPitEntries ( ) const
inline

Definition at line 120 of file name-tree-entry.hpp.

References getPitEntries().

Referenced by nfd::pit::nteHasPitEntries(), and nfd::pit::Iterator::operator++().

◆ getPitEntries()

const std::vector<shared_ptr<pit::Entry> >& nfd::name_tree::Entry::getPitEntries ( ) const
inline

◆ insertPitEntry()

void nfd::name_tree::Entry::insertPitEntry ( shared_ptr< pit::Entry pitEntry)

Definition at line 88 of file name-tree-entry.cpp.

Referenced by getPitEntries(), and nfd::pit::Pit::Pit().

◆ erasePitEntry()

void nfd::name_tree::Entry::erasePitEntry ( pit::Entry pitEntry)

Definition at line 98 of file name-tree-entry.cpp.

Referenced by nfd::pit::Pit::findAllDataMatches(), and getPitEntries().

◆ getMeasurementsEntry()

◆ setMeasurementsEntry()

void nfd::name_tree::Entry::setMeasurementsEntry ( unique_ptr< measurements::Entry measurementsEntry)

◆ getStrategyChoiceEntry()

◆ setStrategyChoiceEntry()

void nfd::name_tree::Entry::setStrategyChoiceEntry ( unique_ptr< strategy_choice::Entry strategyChoiceEntry)

◆ get()

template<typename ENTRY >
static Entry* nfd::name_tree::Entry::get ( const ENTRY &  tableEntry)
inlinestatic
Returns
name tree entry on which a table entry is attached, or nullptr if the table entry is detached
Note
This function is for NameTree internal use. Other components should use NameTree::getEntry(tableEntry) instead.

Definition at line 162 of file name-tree-entry.hpp.

References getNode.

Referenced by nfd::name_tree::NameTree::getEntry().

Friends And Related Function Documentation

◆ getNode

Node* getNode ( const Entry entry)
friend
Returns
node associated with entry
Note
This function is for NameTree internal use.

Definition at line 105 of file name-tree-hashtable.cpp.

Referenced by get().


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