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);
137 shared_ptr<name_tree::Entry>
141 shared_ptr<name_tree::Entry>
145 shared_ptr<name_tree::Entry>
149 shared_ptr<name_tree::Entry>
158 shared_ptr<name_tree::Entry>
159 findExactMatch(
const Name& prefix)
const;
166 shared_ptr<name_tree::Entry>
167 findLongestPrefixMatch(
const Name& prefix,
171 shared_ptr<name_tree::Entry>
172 findLongestPrefixMatch(shared_ptr<name_tree::Entry> entry,
190 boost::iterator_range<const_iterator>
191 findAllMatches(
const Name& prefix,
209 boost::iterator_range<const_iterator>
226 boost::iterator_range<const_iterator>
227 partialEnumerate(
const Name& prefix,
248 FIND_ALL_MATCHES_TYPE
260 shared_ptr<name_tree::Entry> entry,
269 shared_ptr<name_tree::Entry>
286 shared_ptr<name_tree::Entry> m_entry;
287 shared_ptr<name_tree::Entry> m_subTreeRoot;
288 shared_ptr<name_tree::EntrySelector> m_entrySelector;
289 shared_ptr<name_tree::EntrySubTreeSelector> m_entrySubTreeSelector;
291 bool m_shouldVisitChildren;
303 resize(
size_t newNBuckets);
308 size_t m_minNBuckets;
309 double m_enlargeLoadFactor;
310 size_t m_enlargeThreshold;
312 double m_shrinkLoadFactor;
313 size_t m_shrinkThreshold;
314 double m_shrinkFactor;
316 shared_ptr<name_tree::Entry> m_end;
327 std::pair<shared_ptr<name_tree::Entry>,
bool>
328 insert(
const Name& prefix);
347 inline shared_ptr<name_tree::Entry>
350 return fibEntry.m_nameTreeEntry;
353 inline shared_ptr<name_tree::Entry>
356 return pitEntry.m_nameTreeEntry;
359 inline shared_ptr<name_tree::Entry>
362 return measurementsEntry.m_nameTreeEntry;
365 inline shared_ptr<name_tree::Entry>
368 return strategyChoiceEntry.m_nameTreeEntry;
374 return fullEnumerate().begin();
380 return m_endIterator;
389 inline shared_ptr<name_tree::Entry>
406 return m_entry == other.m_entry;
412 return m_entry != other.m_entry;
417 #endif // NFD_DAEMON_TABLE_NAME_TREE_HPP bool operator==(const const_iterator &other) const
size_t computeHash(const Name &prefix)
Compute the hash value of the given name prefix's WIRE FORMAT.
const_iterator begin() const
Get an iterator pointing to the first NameTree entry.
shared_ptr< name_tree::Entry > get(const fib::Entry &fibEntry) const
get NameTree entry from attached FIB entry
function< std::pair< bool, bool >const Entry &entry)> EntrySubTreeSelector
a predicate to accept or reject an Entry and its children
const_iterator end() const
Get an iterator referring to the past-the-end FIB entry.
const name_tree::Entry & operator*() const
std::vector< size_t > computeHashSet(const Name &prefix)
Incrementally compute hash values.
size_t getNBuckets() const
Get the number of buckets in the Name Tree (NPHT)
represents a Measurements entry
Table::const_iterator iterator
size_t size() const
Get the number of occupied entries in the Name Tree.
std::pair< bool, bool > operator()(const Entry &entry)
Copyright (c) 2011-2015 Regents of the University of California.
bool operator!=(const const_iterator &other) const
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)
function< bool(const Entry &entry)> EntrySelector
a predicate to accept or reject an Entry in find operations
shared_ptr< name_tree::Entry > operator->() const
bool operator()(const Entry &entry)
bool operator==(const GlobalRouter::Incidency &a, const GlobalRouter::Incidency &b)