NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::ndnSIM::trie_with_policy< FullKey, PayloadTraits, PolicyTraits > Class Template Reference
Inheritance diagram for ns3::ndn::ndnSIM::trie_with_policy< FullKey, PayloadTraits, PolicyTraits >:

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_triegetTrie () const
 
parent_triegetTrie ()
 
const policy_container & getPolicy () const
 
policy_container & getPolicy ()
 

Static Public Member Functions

static iterator s_iterator_to (typename parent_trie::iterator item)
 

Detailed Description

template<typename FullKey, typename PayloadTraits, typename PolicyTraits>
class ns3::ndn::ndnSIM::trie_with_policy< FullKey, PayloadTraits, PolicyTraits >

Definition at line 34 of file trie-with-policy.h.

Member Function Documentation

template<typename FullKey, typename PayloadTraits, typename PolicyTraits>
iterator ns3::ndn::ndnSIM::trie_with_policy< FullKey, PayloadTraits, PolicyTraits >::deepest_prefix_match ( const FullKey &  key)
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.

template<typename FullKey, typename PayloadTraits, typename PolicyTraits>
template<class Predicate >
iterator ns3::ndn::ndnSIM::trie_with_policy< FullKey, PayloadTraits, PolicyTraits >::deepest_prefix_match_if_next_level ( const FullKey &  key,
Predicate  pred 
)
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.


The documentation for this class was generated from the following file: