Public Types | |
typedef trie< FullKey, PayloadTraits, typename PolicyTraits::policy_hook_type > | parent_trie |
typedef parent_trie::iterator | iterator |
typedef parent_trie::const_iterator | const_iterator |
typedef PolicyTraits::template policy< trie_with_policy < FullKey, PayloadTraits, PolicyTraits >, parent_trie, typename PolicyTraits::template container_hook< parent_trie > ::type >::type | policy_container |
Public Member Functions | |
trie_with_policy (size_t bucketSize=1, size_t bucketIncrement=1) | |
std::pair< iterator, bool > | insert (const FullKey &key, typename PayloadTraits::insert_type payload) |
void | erase (const FullKey &key) |
void | erase (iterator node) |
void | clear () |
template<typename Modifier > | |
bool | modify (iterator position, Modifier mod) |
iterator | find_exact (const FullKey &key) |
Find a node that has the exact match with the key. | |
iterator | longest_prefix_match (const FullKey &key) |
Find a node that has the longest common prefix with key (FIB/PIT lookup) | |
template<class Predicate > | |
iterator | longest_prefix_match_if (const FullKey &key, Predicate pred) |
Find a node that has the longest common prefix with key (FIB/PIT lookup) | |
iterator | deepest_prefix_match (const FullKey &key) |
Const version of the longest common prefix match (semi-const, because there could be update of the policy anyways) More... | |
template<class Predicate > | |
iterator | deepest_prefix_match_if (const FullKey &key, Predicate pred) |
Find a node that has prefix at least as the key. | |
template<class Predicate > | |
iterator | deepest_prefix_match_if_next_level (const FullKey &key, Predicate pred) |
Find a node that has prefix at least as the key. More... | |
iterator | end () const |
const parent_trie & | getTrie () const |
parent_trie & | getTrie () |
const policy_container & | getPolicy () const |
policy_container & | getPolicy () |
Static Public Member Functions | |
static iterator | s_iterator_to (typename parent_trie::iterator item) |
Definition at line 34 of file trie-with-policy.h.
|
inline |
Const version of the longest common prefix match (semi-const, because there could be update of the policy anyways)
Find a node that has prefix at least as the key (cache lookup)
Definition at line 183 of file trie-with-policy.h.
|
inline |
Find a node that has prefix at least as the key.
This version of find checks predicate for the next level and if predicate is True, returns first deepest match available
Definition at line 247 of file trie-with-policy.h.