NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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
 Check whether this entry has any children. More...
 
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 
)

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 41 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

Check whether this entry has any children.

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

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 88 of file name-tree-entry.hpp.

Referenced by nfd::name_tree::PartialEnumerationImpl::advance().

◆ 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 97 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.

References nonstd::optional_lite::std11::move().

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

◆ hasPitEntries()

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

◆ getPitEntries()

◆ 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 161 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 107 of file name-tree-hashtable.cpp.

Referenced by get().


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