nfd::name_tree::Entry Class Reference

An entry in the name tree. More...

#include <daemon/table/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)
void erasePitEntry (pit::Entry *pitEntry)
const std::vector< Entry * > & getChildren () const
fib::EntrygetFibEntry () const
measurements::EntrygetMeasurementsEntry () const
const Name & getName () const
EntrygetParent () const
const std::vector< shared_ptr< pit::Entry > > & getPitEntries () const
strategy_choice::EntrygetStrategyChoiceEntry () const
bool hasChildren () const
 Check whether this entry has any children. More...
bool hasPitEntries () const
bool hasTableEntries () const
void insertPitEntry (shared_ptr< pit::Entry > pitEntry)
bool isEmpty () const
void setFibEntry (unique_ptr< fib::Entry > fibEntry)
void setMeasurementsEntry (unique_ptr< measurements::Entry > measurementsEntry)
void setParent (Entry &entry)
 Set parent of this entry. More...
void setStrategyChoiceEntry (unique_ptr< strategy_choice::Entry > strategyChoiceEntry)
void unsetParent ()
 Unset parent of this entry. More...

Static Public Member Functions

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


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.

Member Function Documentation

◆ erasePitEntry()

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

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

◆ get()

template<typename ENTRY >
static Entry* nfd::name_tree::Entry::get ( const ENTRY &  tableEntry)
name tree entry on which a table entry is attached, or nullptr if the table entry is detached
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.

◆ getChildren()

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

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

◆ getFibEntry()

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

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

◆ getMeasurementsEntry()

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

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

◆ getName()

const Name& nfd::name_tree::Entry::getName ( ) const

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

◆ getParent()

Entry* nfd::name_tree::Entry::getParent ( ) const
entry of getName().getPrefix(-1)
Return values
nullptrthis entry is the root entry, i.e. getName() == Name()

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

◆ getPitEntries()

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

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

◆ getStrategyChoiceEntry()

strategy_choice::Entry* nfd::name_tree::Entry::getStrategyChoiceEntry ( ) const

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

◆ hasChildren()

bool nfd::name_tree::Entry::hasChildren ( ) const

Check whether this entry has any children.

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

◆ hasPitEntries()

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

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

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

◆ insertPitEntry()

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

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

◆ isEmpty()

bool nfd::name_tree::Entry::isEmpty ( ) const
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.

◆ setFibEntry()

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

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

◆ setMeasurementsEntry()

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

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

◆ setParent()

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

Set parent of this entry.

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

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

◆ setStrategyChoiceEntry()

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

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

◆ unsetParent()

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

Unset parent of this entry.

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

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

Friends And Related Function Documentation

◆ getNode

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

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