26 #ifndef NFD_DAEMON_TABLE_NAME_TREE_ITERATOR_HPP
27 #define NFD_DAEMON_TABLE_NAME_TREE_ITERATOR_HPP
31 #include <boost/range/iterator_range_core.hpp>
65 constexpr std::pair<bool, bool>
72 class EnumerationImpl;
93 BOOST_ASSERT(m_impl !=
nullptr);
100 BOOST_ASSERT(m_impl !=
nullptr);
122 shared_ptr<EnumerationImpl> m_impl;
126 const Entry* m_entry =
nullptr;
130 const Entry* m_ref =
nullptr;
217 using Range = boost::iterator_range<Iterator>;
An entry in the name tree.
Enumeration operation implementation.
virtual ~EnumerationImpl()=default
EnumerationImpl(const NameTree &nt)
virtual void advance(Iterator &i)=0
Full enumeration implementation.
FullEnumerationImpl(const NameTree &nt, const EntrySelector &pred)
void advance(Iterator &i) final
A hashtable for fast exact name lookup.
std::forward_iterator_tag iterator_category
const Entry & operator*() const
bool operator!=(const Iterator &other) const
friend std::ostream & operator<<(std::ostream &, const Iterator &)
const Entry * operator->() const
bool operator==(const Iterator &other) const
std::ptrdiff_t difference_type
A common index structure for FIB, PIT, StrategyChoice, and Measurements.
Partial enumeration implementation.
PartialEnumerationImpl(const NameTree &nt, const EntrySubTreeSelector &pred)
void advance(Iterator &i) final
Partial enumeration implementation.
PrefixMatchImpl(const NameTree &nt, const EntrySelector &pred)
std::ostream & operator<<(std::ostream &os, const Iterator &i)
boost::iterator_range< Iterator > Range
A Forward Range of name tree entries.
std::function< bool(const Entry &)> EntrySelector
A predicate to accept or reject an Entry in find operations.
std::function< std::pair< bool, bool >(const Entry &)> EntrySubTreeSelector
A predicate to accept or reject an Entry and its children.
An EntrySelector that accepts every Entry.
constexpr bool operator()(const Entry &) const noexcept
An EntrySubTreeSelector that accepts every Entry and its children.
constexpr std::pair< bool, bool > operator()(const Entry &) const noexcept