26#ifndef NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP
27#define NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP
83 return !m_children.empty();
89 const std::vector<Entry*>&
114 return m_fibEntry.get();
126 const std::vector<shared_ptr<pit::Entry>>&
141 return m_measurementsEntry.get();
150 return m_strategyChoiceEntry.get();
161 template<
typename ENTRY>
163 get(
const ENTRY& tableEntry)
165 return tableEntry.m_nameTreeEntry;
171 Entry* m_parent =
nullptr;
172 std::vector<Entry*> m_children;
174 unique_ptr<fib::Entry> m_fibEntry;
175 std::vector<shared_ptr<pit::Entry>> m_pitEntries;
176 unique_ptr<measurements::Entry> m_measurementsEntry;
177 unique_ptr<strategy_choice::Entry> m_strategyChoiceEntry;
185template<
typename ENTRY>
205 return *(nte.*m_getter)();
Represents an entry in the FIB.
Represents an entry in the Measurements table.
An entry in the name tree.
bool hasPitEntries() const
void unsetParent()
Unset parent of this entry.
void insertPitEntry(shared_ptr< pit::Entry > pitEntry)
void setMeasurementsEntry(unique_ptr< measurements::Entry > measurementsEntry)
void erasePitEntry(pit::Entry *pitEntry)
const Name & getName() const noexcept
void setParent(Entry &entry)
Set parent of this entry.
measurements::Entry * getMeasurementsEntry() const
fib::Entry * getFibEntry() const
Entry * getParent() const noexcept
friend Node * getNode(const Entry &entry)
strategy_choice::Entry * getStrategyChoiceEntry() const
void setStrategyChoiceEntry(unique_ptr< strategy_choice::Entry > strategyChoiceEntry)
void setFibEntry(unique_ptr< fib::Entry > fibEntry)
static Entry * get(const ENTRY &tableEntry)
bool hasChildren() const
Check whether this entry has any children.
const std::vector< shared_ptr< pit::Entry > > & getPitEntries() const
const std::vector< Entry * > & getChildren() const noexcept
Returns the children of this entry.
bool hasTableEntries() const
A functor to get a table entry from a name tree entry.
const ENTRY & operator()(const Entry &nte) const
ENTRY *(Entry::*)() const Getter
A function pointer to the getter on Entry class that returns ENTRY.
GetTableEntry(Getter getter=nullptr)
Represents an entry in the Interest table (PIT).
Represents an entry in the Strategy Choice table.