Public Types | |
typedef FullKey::partial_type | Key |
typedef trie * | iterator |
typedef const trie * | const_iterator |
typedef trie_iterator< trie, trie > | recursive_iterator |
typedef trie_iterator< const trie, trie > | const_recursive_iterator |
typedef trie_point_iterator< trie > | point_iterator |
typedef trie_point_iterator < const trie > | const_point_iterator |
typedef PayloadTraits | payload_traits |
Public Member Functions | |
trie (const Key &key, size_t bucketSize=1, size_t bucketIncrement=1) | |
void | clear () |
template<class Predicate > | |
void | clear_if (Predicate cond) |
std::pair< iterator, bool > | insert (const FullKey &key, typename PayloadTraits::insert_type payload) |
iterator | erase () |
Removes payload (if it exists) and if there are no children, prunes parents trie. | |
iterator | prune () |
Do exactly as erase, but without erasing the payload. | |
void | prune_node () |
Perform prune of the node, but without attempting to parent of the node. | |
boost::tuple< iterator, bool, iterator > | find (const FullKey &key) |
Perform the longest prefix match. More... | |
template<class Predicate > | |
boost::tuple< iterator, bool, iterator > | find_if (const FullKey &key, Predicate pred) |
Perform the longest prefix match satisfying preficate. More... | |
iterator | find () |
Find next payload of the sub-trie. More... | |
template<class Predicate > | |
const iterator | find_if (Predicate pred) |
Find next payload of the sub-trie satisfying the predicate. More... | |
template<class Predicate > | |
const iterator | find_if_next_level (Predicate pred) |
Find next payload of the sub-trie satisfying the predicate. More... | |
iterator | end () |
const_iterator | end () const |
PayloadTraits::const_return_type | payload () const |
PayloadTraits::return_type | payload () |
void | set_payload (typename PayloadTraits::insert_type payload) |
Key | key () const |
void | PrintStat (std::ostream &os) const |
Public Attributes | |
PolicyHook | policy_hook_ |
Friends | |
template<class T , class NonConstT > | |
class | trie_iterator |
template<class T > | |
class | trie_point_iterator |
bool | operator== (const trie< FullKey, PayloadTraits, PolicyHook > &a, const trie< FullKey, PayloadTraits, PolicyHook > &b) |
std::size_t | hash_value (const trie< FullKey, PayloadTraits, PolicyHook > &trie_node) |
std::ostream & | operator (std::ostream &os, const trie &trie_node) |
|
inline |
Perform the longest prefix match.
key | the key for which to perform the longest prefix match |
Definition at line 305 of file trie.h.
Referenced by ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< random_policy_traits > > >, random_policy_traits >::deepest_prefix_match(), ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< random_policy_traits > > >, random_policy_traits >::deepest_prefix_match_if(), ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< random_policy_traits > > >, random_policy_traits >::deepest_prefix_match_if_next_level(), ns3::ndn::ndnSIM::trie< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< lru_policy_traits > > >, typename lru_policy_traits::policy_hook_type >::find(), ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< random_policy_traits > > >, random_policy_traits >::find_exact(), ns3::ndn::ndnSIM::trie< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< lru_policy_traits > > >, typename lru_policy_traits::policy_hook_type >::find_if_next_level(), ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< random_policy_traits > > >, random_policy_traits >::longest_prefix_match(), and ns3::ndn::pit::PitImpl< Policy >::Lookup().
|
inline |
|
inline |
Perform the longest prefix match satisfying preficate.
key | the key for which to perform the longest prefix match |
Definition at line 339 of file trie.h.
Referenced by ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< random_policy_traits > > >, random_policy_traits >::deepest_prefix_match_if(), ns3::ndn::ndnSIM::trie< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< lru_policy_traits > > >, typename lru_policy_traits::policy_hook_type >::find_if(), and ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< random_policy_traits > > >, random_policy_traits >::longest_prefix_match_if().
|
inline |
|
inline |