26 #ifndef NFD_DAEMON_TABLE_NAME_TREE_HPP 27 #define NFD_DAEMON_TABLE_NAME_TREE_HPP 52 static constexpr
size_t 77 template<
typename EntryT>
95 lookup(
const Name& name,
size_t prefixLen);
102 return this->
lookup(name, name.size());
152 findExactMatch(
const Name& name,
size_t prefixLen = std::numeric_limits<size_t>::max())
const;
177 template<
typename EntryT>
183 BOOST_ASSERT(nte !=
nullptr);
290 #endif // NFD_DAEMON_TABLE_NAME_TREE_HPP an EntrySelector that accepts every Entry
Entry * findLongestPrefixMatch(const EntryT &tableEntry, const EntrySelector &entrySelector=AnyEntry()) const
equivalent to findLongestPrefixMatch(getEntry(tableEntry)->getName(), entrySelector) ...
a common index structure for FIB, PIT, StrategyChoice, and Measurements
Entry * findLongestPrefixMatch(const Name &name, const EntrySelector &entrySelector=AnyEntry()) const
longest prefix matching
represents a Measurements entry
size_t eraseIfEmpty(Entry *entry, bool canEraseAncestors=true)
delete the entry if it is empty
Entry * getEntry(const EntryT &tableEntry) const
size_t getNBuckets() const
Range fullEnumerate(const EntrySelector &entrySelector=AnyEntry()) const
enumerate all entries
static constexpr size_t getMaxDepth()
maximum depth of the name tree
Entry & lookup(const Name &name)
equivalent to lookup(name, name.size())
Range partialEnumerate(const Name &prefix, const EntrySubTreeSelector &entrySubTreeSelector=AnyEntrySubTree()) const
enumerate all entries under a prefix
const_iterator begin() 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
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
an EntrySubTreeSelector that accepts every Entry and its children
Range findAllMatches(const Name &name, const EntrySelector &entrySelector=AnyEntry()) const
all-prefixes match lookup
an entry in the name tree
represents a Strategy Choice entry
static Entry * get(const ENTRY &tableEntry)
static const int FIB_MAX_DEPTH
Maximum number of components in a FIB entry prefix.
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
size_t getNBuckets() const
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
const_iterator end() const