#include <oscl_tagtree.h>
Public Types | |
typedef Oscl_Tag< Alloc > | tag_type |
typedef tag_type::tag_base_type | tag_base_type |
typedef Oscl_Vector< Node *, Alloc > | children_type |
typedef Node | node_type |
typedef node_type * | node_ptr |
typedef Oscl_Map< const tag_base_type, node_ptr, Alloc, Oscl_Tag_Base > | map_type |
typedef map_type::size_type | size_type |
typedef map_type::value_type | value_type |
typedef Oscl_Pair< iterator, bool > | pair_iterator_bool |
Public Methods | |
Oscl_TagTree (size_type max_depth=0) | |
Oscl_TagTree (const Oscl_TagTree< T, Alloc > &x) | |
Oscl_TagTree< T, Alloc > & | operator= (const Oscl_TagTree< T, Alloc > &x) |
~Oscl_TagTree () | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
bool | empty () const |
size_type | size () const |
T & | operator[] (const tag_base_type &t) |
pair_iterator_bool | insert (const tag_base_type &t, const T &x) |
void | erase (iterator position) |
size_type | erase (const tag_base_type &x) |
void | clear () |
iterator | find (const tag_base_type &x) |
size_type | count (const tag_base_type &x) const |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creates a tag tree with only a root node with tag "" |
|
Copy constructor |
|
Destructor |
|
Returns an iterator pointing to the first node in the tree. |
|
Returns an iterator pointing to the first node in the tree. |
|
Erases the entire tag tree. |
|
Returns the number of elements with key x. This can only be 0 or 1.. |
|
Returns true if tree size is 0 |
|
Returns a const iterator pointing to the end of the tree. |
|
Returns an iterator pointing to the end of the tree. |
|
Erases the node with tag x. If the node has children, then the node will not be erased from the tree. It will be replaced with the default node value
|
|
Erases the element pointed to by the iterator. If the node has children, then the node will not be erased from the tree. It will be replaced with the default node value.
|
|
Finds an element whose key is x
|
|
Inserts x into the tree and associates it with tag t. If the tag already exists x will not be inserted, and an iterator pointing to the existing node with tag t is returned.
|
|
Assignment operator |
|
Returns a reference to the object that is associated with a particular tag. If the map does not already contain such an object, operator[] inserts the default object T(). |
|
Returns the number of nodes stored in the tree |