26 #ifndef NFD_DAEMON_TABLE_NAME_TREE_HPP 27 #define NFD_DAEMON_TABLE_NAME_TREE_HPP 50 static constexpr
size_t 75 template<
typename EntryT>
93 lookup(
const Name& name,
size_t prefixLen);
100 return this->
lookup(name, name.size());
149 findExactMatch(
const Name& name,
size_t prefixLen = std::numeric_limits<size_t>::max())
const;
174 template<
typename EntryT>
180 BOOST_ASSERT(nte !=
nullptr);
287 #endif // NFD_DAEMON_TABLE_NAME_TREE_HPP an EntrySelector that accepts every Entry
A common index structure for FIB, PIT, StrategyChoice, and Measurements.
Represents a Measurements entry.
size_t eraseIfEmpty(Entry *entry, bool canEraseAncestors=true)
Delete the entry if it is empty.
Entry * findLongestPrefixMatch(const EntryT &tableEntry, const EntrySelector &entrySelector=AnyEntry()) const
Equivalent to findLongestPrefixMatch(getEntry(tableEntry)->getName(), entrySelector) ...
size_t getNBuckets() const
static constexpr size_t getMaxDepth()
Maximum depth of the name tree.
Entry & lookup(const Name &name)
Equivalent to lookup(name, name.size())
Entry * getEntry(const EntryT &tableEntry) const
Range fullEnumerate(const EntrySelector &entrySelector=AnyEntry()) const
Enumerate all entries.
const_iterator end() const
Entry * findExactMatch(const Name &name, size_t prefixLen=std::numeric_limits< size_t >::max()) const
Exact match lookup.
enumeration operation implementation
Entry & lookup(const Name &name, size_t prefixLen)
Find or insert an entry by name.
const_iterator begin() const
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Range partialEnumerate(const Name &prefix, const EntrySubTreeSelector &entrySubTreeSelector=AnyEntrySubTree()) const
Enumerate all entries under a prefix.
size_t getNBuckets() const
an EntrySubTreeSelector that accepts every Entry and its children
Entry * findLongestPrefixMatch(const Name &name, const EntrySelector &entrySelector=AnyEntry()) const
Longest prefix matching.
An entry in the name tree.
Represents a Strategy Choice entry.
static Entry * get(const ENTRY &tableEntry)
boost::iterator_range< Iterator > Range
a Forward Range of name tree entries
std::function< std::pair< bool, bool >(const Entry &)> EntrySubTreeSelector
a predicate to accept or reject an Entry and its children
Range findAllMatches(const Name &name, const EntrySelector &entrySelector=AnyEntry()) const
All-prefixes match lookup.
std::function< bool(const Entry &)> EntrySelector
a predicate to accept or reject an Entry in find operations
NameTree(size_t nBuckets=1024)
a hashtable for fast exact name lookup