26 #ifndef NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP 27 #define NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP 82 return !m_children.empty();
87 const std::vector<Entry*>&
112 return m_fibEntry.get();
124 const std::vector<shared_ptr<pit::Entry>>&
139 return m_measurementsEntry.get();
148 return m_strategyChoiceEntry.get();
159 template<
typename ENTRY>
161 get(
const ENTRY& tableEntry)
163 return tableEntry.m_nameTreeEntry;
169 Entry* m_parent =
nullptr;
170 std::vector<Entry*> m_children;
172 unique_ptr<fib::Entry> m_fibEntry;
173 std::vector<shared_ptr<pit::Entry>> m_pitEntries;
174 unique_ptr<measurements::Entry> m_measurementsEntry;
175 unique_ptr<strategy_choice::Entry> m_strategyChoiceEntry;
183 template<
typename ENTRY>
203 return *(nte.*m_getter)();
213 #endif // NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP void insertPitEntry(shared_ptr< pit::Entry > pitEntry)
friend Node * getNode(const Entry &entry)
const std::vector< shared_ptr< pit::Entry > > & getPitEntries() const
fib::Entry * getFibEntry() const
void erasePitEntry(pit::Entry *pitEntry)
Entry(const Name &prefix, Node *node)
const std::vector< Entry * > & getChildren() const
void setParent(Entry &entry)
Set parent of this entry.
void setMeasurementsEntry(unique_ptr< measurements::Entry > measurementsEntry)
bool hasChildren() const
Check whether this entry has any children.
Represents a Measurements entry.
measurements::Entry * getMeasurementsEntry() const
bool hasTableEntries() const
ENTRY *(Entry::*)() const Getter
A function pointer to the getter on Entry class that returns ENTRY.
Copyright (c) 2011-2015 Regents of the University of California.
Represents an absolute name.
Represents a Strategy Choice entry.
const ENTRY & operator()(const Entry &nte) const
bool hasPitEntries() const
void unsetParent()
Unset parent of this entry.
strategy_choice::Entry * getStrategyChoiceEntry() const
Entry * getParent() const
GetTableEntry(Getter getter=nullptr)
a functor to get a table entry from a name tree entry
const Name & getName() const
void setFibEntry(unique_ptr< fib::Entry > fibEntry)
void setStrategyChoiceEntry(unique_ptr< strategy_choice::Entry > strategyChoiceEntry)
An entry in the name tree.