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;
185 template<
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.
friend Node * getNode(const Entry &entry)
bool hasPitEntries() const
void unsetParent()
Unset parent of this entry.
Entry(const Name &prefix, Node *node)
void insertPitEntry(shared_ptr< pit::Entry > pitEntry)
void setMeasurementsEntry(unique_ptr< measurements::Entry > measurementsEntry)
void erasePitEntry(pit::Entry *pitEntry)
fib::Entry * getFibEntry() const
measurements::Entry * getMeasurementsEntry() const
void setParent(Entry &entry)
Set parent of this entry.
const std::vector< shared_ptr< pit::Entry > > & getPitEntries() const
Entry * getParent() const noexcept
static Entry * get(const ENTRY &tableEntry)
void setStrategyChoiceEntry(unique_ptr< strategy_choice::Entry > strategyChoiceEntry)
void setFibEntry(unique_ptr< fib::Entry > fibEntry)
const std::vector< Entry * > & getChildren() const noexcept
Returns the children of this entry.
bool hasChildren() const
Check whether this entry has any children.
const Name & getName() const noexcept
strategy_choice::Entry * getStrategyChoiceEntry() const
bool hasTableEntries() const
A functor to get a table entry from a name tree entry.
ENTRY *(Entry::*)() const Getter
A function pointer to the getter on Entry class that returns ENTRY.
const ENTRY & operator()(const Entry &nte) const
GetTableEntry(Getter getter=nullptr)
Represents an entry in the Interest table (PIT).
Represents an entry in the Strategy Choice table.