26 #ifndef NFD_DAEMON_TABLE_NAME_TREE_HPP 27 #define NFD_DAEMON_TABLE_NAME_TREE_HPP 70 return std::make_pair(
true,
true);
108 dump(std::ostream& output)
const;
121 shared_ptr<name_tree::Entry>
122 lookup(
const Name& prefix);
133 eraseEntryIfEmpty(shared_ptr<name_tree::Entry> entry);
140 shared_ptr<name_tree::Entry>
147 shared_ptr<name_tree::Entry>
154 shared_ptr<name_tree::Entry>
161 shared_ptr<name_tree::Entry>
170 shared_ptr<name_tree::Entry>
171 findExactMatch(
const Name& prefix)
const;
178 shared_ptr<name_tree::Entry>
179 findLongestPrefixMatch(
const Name& prefix,
183 shared_ptr<name_tree::Entry>
184 findLongestPrefixMatch(shared_ptr<name_tree::Entry> entry,
192 shared_ptr<name_tree::Entry>
193 findLongestPrefixMatch(
const pit::Entry& pitEntry)
const;
209 boost::iterator_range<const_iterator>
210 findAllMatches(
const Name& prefix,
228 boost::iterator_range<const_iterator>
245 boost::iterator_range<const_iterator>
246 partialEnumerate(
const Name& prefix,
267 FIND_ALL_MATCHES_TYPE
279 shared_ptr<name_tree::Entry> entry,
288 shared_ptr<name_tree::Entry>
305 shared_ptr<name_tree::Entry> m_entry;
306 shared_ptr<name_tree::Entry> m_subTreeRoot;
307 shared_ptr<name_tree::EntrySelector> m_entrySelector;
308 shared_ptr<name_tree::EntrySubTreeSelector> m_entrySubTreeSelector;
310 bool m_shouldVisitChildren;
322 resize(
size_t newNBuckets);
327 size_t m_minNBuckets;
328 double m_enlargeLoadFactor;
329 size_t m_enlargeThreshold;
331 double m_shrinkLoadFactor;
332 size_t m_shrinkThreshold;
333 double m_shrinkFactor;
335 shared_ptr<name_tree::Entry> m_end;
346 std::pair<shared_ptr<name_tree::Entry>,
bool>
347 insert(
const Name& prefix);
366 inline shared_ptr<name_tree::Entry>
369 return fibEntry.m_nameTreeEntry;
372 inline shared_ptr<name_tree::Entry>
375 return measurementsEntry.m_nameTreeEntry;
378 inline shared_ptr<name_tree::Entry>
381 return strategyChoiceEntry.m_nameTreeEntry;
387 return fullEnumerate().begin();
393 return m_endIterator;
402 inline shared_ptr<name_tree::Entry>
419 return m_entry == other.m_entry;
425 return m_entry != other.m_entry;
430 #endif // NFD_DAEMON_TABLE_NAME_TREE_HPP size_t computeHash(const Name &prefix)
Compute the hash value of the given name prefix's WIRE FORMAT.
shared_ptr< name_tree::Entry > operator->() const
function< std::pair< bool, bool >const Entry &entry)> EntrySubTreeSelector
a predicate to accept or reject an Entry and its children
bool operator==(const const_iterator &other) const
size_t getNBuckets() const
Get the number of buckets in the Name Tree (NPHT)
shared_ptr< name_tree::Entry > get(const fib::Entry &fibEntry) const
get NameTree entry from FIB entry
std::vector< size_t > computeHashSet(const Name &prefix)
Incrementally compute hash values.
size_t size() const
Get the number of occupied entries in the Name Tree.
represents a Measurements entry
Table::const_iterator iterator
std::pair< bool, bool > operator()(const Entry &entry)
const_iterator begin() const
Get an iterator pointing to the first NameTree entry.
Copyright (c) 2011-2015 Regents of the University of California.
Name abstraction to represent an absolute name.
represents a Strategy Choice entry
const_iterator operator++()
bool operator!=(const GlobalRouter::Incidency &a, const GlobalRouter::Incidency &b)
const_iterator end() const
Get an iterator referring to the past-the-end FIB entry.
function< bool(const Entry &entry)> EntrySelector
a predicate to accept or reject an Entry in find operations
const name_tree::Entry & operator*() const
bool operator!=(const const_iterator &other) const
bool operator()(const Entry &entry)
bool operator==(const GlobalRouter::Incidency &a, const GlobalRouter::Incidency &b)