basic_tree_assoc_cntnr Interface

A basic tree-based associative container specialized for underlying data-structure which do not support reverse iteration.

  1. assoc_cntnr.hpp
  2. Template parameters.
  3. Base classes.
  4. Public Types and Constants:
    1. General container definitions.
    2. Key-type definitions.
    3. Policy definitions.
    4. Iterator definitions.
  5. Public Methods:
    1. Constructors, destructor, and related.
    2. Policy access methods.
    3. Erase methods.
    4. Node-Iteration methods.
    5. Split and join methods.

Template parameters.

ParameterDescriptionDefault Value
Key

Key type.

-
Data

Data type.

-
Cmp_Fn

Comparison functor.

-
Node_Updator

Node updator type.

Node Invariants explains this concept.

-
Allocator

Allocator type.

-

Base classes.

ClassDerivation Type
Node_Updator

public

General container definitions.

TypeDefinitionDescription
size_type
typename Allocator::size_type

Size type.

Key-type definitions.

TypeDefinitionDescription
const_key_reference
typename Allocator::template rebind<
    Key>::other::const_reference

Const key reference type.

Policy definitions.

TypeDefinitionDescription
cmp_fn
Cmp_Fn

Comparison functor type.

node_updator
Node_Updator

Node updator type.

Iterator definitions.

TypeDefinitionDescription
const_iterator
Underlying data-structure's const range-type iterator.

Const range-type iterator.

iterator
Underlying data-structure's range-type iterator.

Range-type iterator.

const_node_iterator
basic_tree_assoc_cntnr::const_node_iterator

Const node iterator.

node_iterator
basic_tree_assoc_cntnr::node_iterator

Node iterator.

Constructors, destructor, and related.

MethodDescription
virtual
  ~basic_tree_assoc_cntnr
  ()

Destructor.

Policy access methods.

MethodDescription
cmp_fn &
  get_cmp_fn
  ()

Access to the cmp_fn object.

const cmp_fn &
  get_cmp_fn
  () const

Const access to the cmp_fn object.

node_updator &
  get_node_updator
  ()

Access to the node_updator object.

const node_updator &
  get_node_updator
  () const

Const access to the node_updator object.

Erase methods.

MethodDescription
inline size_type
  erase
  (const_key_reference r_key)

Erases the value_type associated with r_key; returns the number of value_types erased (0 or 1).

inline iterator
  erase
  (iterator it)

Erases the value_type corresponding to the iterator it. Returns the iterator corresponding to the next value_type.

Node-Iteration methods.

MethodDescription
inline node_iterator
  node_begin
  ()

Returns a node_iterator corresponding to the value_type at the root of the tree.

inline const_node_iterator
  node_begin
  () const

Returns a const_node_iterator corresponding to the value_type at the root of the tree.

inline node_iterator
  node_end
  ()

Returns a node_iterator corresponding to a value_type just after a leaf of the tree.

inline const_node_iterator
  node_end
  () const

Returns a const_node_iterator corresponding to a value_type just after a leaf of the tree.

Split and join methods.

MethodDescription
void
  join
  (basic_tree_assoc_cntnr &r_other)

Joins two trees. When this function returns, r_other will be empty.

inline void
  split
  (const_key_reference r_key,
    basic_tree_assoc_cntnr &r_other)

Joins two trees. When this function returns, r_other will be empty.