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
 
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 32 of file name-tree-entry.cpp.

References nfd::name_tree::NameTree::getMaxDepth().

Member Function Documentation

◆ getName()

◆ getParent()

Entry* nfd::name_tree::Entry::getParent ( ) const
inline

◆ 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 42 of file name-tree-entry.cpp.

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

Referenced by 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 54 of file name-tree-entry.cpp.

References getParent().

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

◆ 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().

◆ 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 66 of file name-tree-entry.cpp.

Referenced by isEmpty().

◆ getFibEntry()

fib::Entry* nfd::name_tree::Entry::getFibEntry ( ) const
inline

◆ setFibEntry()

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

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

Referenced by 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 90 of file name-tree-entry.cpp.

◆ erasePitEntry()

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

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

◆ getMeasurementsEntry()

measurements::Entry* nfd::name_tree::Entry::getMeasurementsEntry ( ) const
inline

◆ setMeasurementsEntry()

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

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

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

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.


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