trie Interface

A concrete basic trie-based associative container.

Defined in: assoc_container.hpp

Template Parameters

Parameter Description Default Value
typename Key

Key type.

-
typename Mapped

Mapped type.

-
class E_Access_Traits 

Element-access traits.

-
class Tag 

Data-structure tag.

pat_trie_tag
template< 
  typename Const_Node_Iterator, 
  typename Node_Iterator, 
  class E_Access_Traits_, 
  typename Allocator_>
class Node_Update 

Node updater type.

Design::Tree-Based Containers::Node Invariants explains this concept.

null_trie_node_update
class Allocator 

Allocator type.

std::allocator<char>

Public Types and Constants

Policy Definitions

Type Definition Description
e_access_traits
E_Access_Traits

Element access traits type.

Iterator Definitions

Type Definition Description
const_node_iterator
const_node_iterator

Const node iterator.

node_iterator
node_iterator

Node iterator.

Public Methods

Constructors, Destructor, and Related

Method Description
  trie
  ()

Default constructor.

  trie
  (const E_Access_Traits &r_e_access_traits)

Constructor taking some policy objects. r_e_access_traits will be copied by the E_Access_Traits object of the container object.

template<
    class It>
  trie
  (It first_it, 
    It last_it)

Constructor taking iterators to a range of value_types. The value_types between first_it and last_it will be inserted into the container object.

template<
    class It>
  trie
  (It first_it, 
    It last_it,
    const E_Access_Traits &r_e_access_traits)

Constructor taking iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object.

  trie
  (const trie &other)

Copy constructor.

virtual 
  ~trie
  ()

Destructor.

trie &
  operator=
  (const trie &other)

Assignment operator.

void
  swap
  (trie &other)

Swaps content.

Policy Access Methods

Method Description
e_access_traits &
  get_e_access_traits
  ()

Access to the comb_hash_fn object.

e_access_traits &
  get_e_access_traits
  () const

Const access to the comb_hash_fn object.

Node-Iteration Methods

Method Description
node_iterator
  node_begin
  ()

Returns a node_iterator corresponding to the node at the root of the trie.

const_node_iterator
  node_begin
  () const

Returns a const_node_iterator corresponding to the node at the root of the trie.

node_iterator
  node_end
  ()

Returns a node_iterator corresponding to a node just after a leaf of the trie.

const_node_iterator
  node_end
  () const

Returns a const_node_iterator corresponding to a node just after a leaf of the trie.