Home / Open source / Terimber 2.0
_map< K, T, A, Pr, M > Class Template Referenceall memory allocations are on the external allocators
More...
#include <map.h>
List of all members.
|
Public Member Functions |
| _map (const Pr &pr=Pr()) |
| constructor
|
| _map (const _map< K, T, A, Pr, M > &x) |
| copy constructor
|
| ~_map () |
| destructor
|
void | assign (A &allocator_, const _map< K, T, A, Pr, M > &x) |
| assigns external map external allocator is required
|
TYPENAME _map< K, T, A, Pr, M >
::pairib_t | insert (A &allocator_, const K &k, const T &v) |
| inserts key/value external allocator required
|
TYPENAME _map< K, T, A, Pr, M >
::iterator | erase (TYPENAME _map< K, T, A, Pr, M >::iterator p) |
| erases node by iterator erase for byte_allocator, which can not deallocate random items
|
TYPENAME _map< K, T, A, Pr, M >
::iterator | erase (node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > &allocator_, TYPENAME _map< K, T, A, Pr, M >::iterator p) |
| erases node by iterator node_allocator can deallocate random items
|
void | erase (const K &k) |
| erases node by key, no memory deallocation
|
void | erase (node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > &allocator_, const K &k) |
| erases node by key with memory deallocation on external allocator
|
TYPENAME _map< K, T, A, Pr, M >
::iterator | erase (TYPENAME _map< K, T, A, Pr, M >::iterator first, TYPENAME _map< K, T, A, Pr, M >::iterator last) |
| erases the range of iterators no memory deallocation
|
TYPENAME _map< K, T, A, Pr, M >
::iterator | erase (node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > &allocator_, TYPENAME _map< K, T, A, Pr, M >::iterator first, TYPENAME _map< K, T, A, Pr, M >::iterator last) |
| erases the range of iterators with memory deallocaton on external allocator
|
Protected Member Functions |
void | _erase (TYPENAME _map< K, T, A, Pr, M >::_node *x) |
| removes node, no memory deallocation
|
void | _erase (node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > &allocator_, TYPENAME _map< K, T, A, Pr, M >::_node *x) |
| removes node with memory deallocation on external allocator
|
TYPENAME _map< K, T, A, Pr, M >
::iterator | _insert (A &_allocator, bool left, TYPENAME _map< K, T, A, Pr, M >::_node *w, const K &k, const T &v) |
| creates new node on external allocator and insert it
|
TYPENAME _map< K, T, A, Pr, M >
::_node * | _buynode (byte_allocator &_allocator, TYPENAME _map< K, T, A, Pr, M >::_node *p, TYPENAME _map< K, T, A, Pr, M >::redblack c, TYPENAME _map< K, T, A, Pr, M >::nodetype t) |
| creates new node on external allocator (byte_allocator)
|
TYPENAME _map< K, T, A, Pr, M >
::_node * | _buynode (node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > &_allocator, TYPENAME _map< K, T, A, Pr, M >::_node *p, TYPENAME _map< K, T, A, Pr, M >::redblack c, TYPENAME _map< K, T, A, Pr, M >::nodetype t) |
| creates new node on external allocator (node_allocator)
|
void | _freenode (node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > &_allocator, TYPENAME _map< K, T, A, Pr, M >::_node *s) |
| destroys node and returns memory to external allocator
|
Private Member Functions |
_map< K, T, A, Pr, M > & | operator= (const _map< K, T, A, Pr, M > &x) |
| private assign operator
|
Detailed Description
template<class K, class T, class A = byte_allocator, class Pr = less< K >, bool M = false>
class _map< K, T, A, Pr, M >
all memory allocations are on the external allocators
Definition at line 635 of file map.h.
Constructor & Destructor Documentation
template<class K, class T, class A, class Pr, bool M>
_map< K, T, A, Pr, M >::_map |
( |
const Pr & |
pr = Pr() |
) |
[inline, explicit] |
template<class K, class T, class A, class Pr, bool M>
_map< K, T, A, Pr, M >::_map |
( |
const _map< K, T, A, Pr, M > & |
x |
) |
[inline] |
copy constructor
- Parameters:
-
Definition at line 637 of file map.hpp.
template<class K, class T, class A, class Pr, bool M>
_map< K, T, A, Pr, M >::~_map |
( |
|
) |
[inline] |
destructor
Definition at line 632 of file map.hpp.
Member Function Documentation
template<class K, class T, class A = byte_allocator, class Pr = less< K >, bool M = false>
_map< K, T, A, Pr, M >& _map< K, T, A, Pr, M >::operator= |
( |
const _map< K, T, A, Pr, M > & |
x |
) |
[private] |
template<class K, class T, class A, class Pr, bool M>
void _map< K, T, A, Pr, M >::assign |
( |
A & |
allocator_, |
|
|
const _map< K, T, A, Pr, M > & |
x | |
|
) |
| | [inline] |
assigns external map external allocator is required
- Parameters:
-
allocator_ |
external allocator |
x |
input map |
Definition at line 645 of file map.hpp.
References base_map< K, T, Pr, M >::begin(), base_map< K, T, Pr, M >::clear(), base_map< K, T, Pr, M >::end(), _map< K, T, A, Pr, M >::insert(), and TYPENAME.
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::pairib_t _map< K, T, A, Pr, M >::insert |
( |
A & |
allocator_, |
|
|
const K & |
k, |
|
|
const T & |
v | |
|
) |
| | [inline] |
inserts key/value external allocator required
- Parameters:
-
allocator_ |
external allocator |
k |
key |
v |
value |
Definition at line 690 of file map.hpp.
References base_map< K, T, Pr, M >::_head, _map< K, T, A, Pr, M >::_insert(), base_map< K, T, Pr, M >::_node_::_parent, base_map< K, T, Pr, M >::begin(), base_map< K, T, Pr, M >::head(), base_map< K, T, Pr, M >::iterator, base_map< K, T, Pr, M >::key_compare, t_head, and TYPENAME.
Referenced by fuzzy_matcher_impl::_match(), xml_grammar::add_attribute_decl(), xml_grammar::add_element_decl(), xml_grammar::add_entity_decl(), xml_document::add_model(), xml_grammar::add_notation_decl(), xml_grammar::add_pi_decl(), xml_grammar::add_reference_decl(), _map< K, T, A, Pr, M >::assign(), content_children::build_dfa(), var_container::combine(), xml_grammar::copy(), cluster_processor< T, N >::cut(), cluster_engine_impl::do_clustering(), var_object_repository::insert_object(), xml_processor::parseAttributes(), fuzzy_matcher_impl::partial_intersect(), and byte_manager::resolveEntity().
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::iterator _map< K, T, A, Pr, M >::erase |
( |
TYPENAME _map< K, T, A, Pr, M >::iterator |
p |
) |
[inline] |
erases node by iterator erase for byte_allocator, which can not deallocate random items
- Parameters:
-
Definition at line 724 of file map.hpp.
References base_map< K, T, Pr, M >::_erase(), and TYPENAME.
Referenced by var_object_repository::delete_object(), _map< K, T, A, Pr, M >::erase(), and var_container::intersect().
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::iterator _map< K, T, A, Pr, M >::erase |
( |
node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > & |
allocator_, |
|
|
TYPENAME _map< K, T, A, Pr, M >::iterator |
p | |
|
) |
| | [inline] |
erases node by iterator node_allocator can deallocate random items
- Parameters:
-
allocator_ |
external allocator |
p |
iterator |
Definition at line 734 of file map.hpp.
References base_map< K, T, Pr, M >::_destkey(), base_map< K, T, Pr, M >::_destval(), base_map< K, T, Pr, M >::_erase(), _map< K, T, A, Pr, M >::_freenode(), and TYPENAME.
template<class K, class T, class A, class Pr, bool M>
void _map< K, T, A, Pr, M >::erase |
( |
const K & |
k |
) |
[inline] |
erases node by key, no memory deallocation
- Parameters:
-
Definition at line 751 of file map.hpp.
References base_map< K, T, Pr, M >::_size, base_map< K, T, Pr, M >::equal_range(), _map< K, T, A, Pr, M >::erase(), and TYPENAME.
template<class K, class T, class A, class Pr, bool M>
erases node by key with memory deallocation on external allocator
- Parameters:
-
allocator_ |
external allocator |
k |
key |
Definition at line 762 of file map.hpp.
References base_map< K, T, Pr, M >::_size, base_map< K, T, Pr, M >::equal_range(), _map< K, T, A, Pr, M >::erase(), and TYPENAME.
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::iterator _map< K, T, A, Pr, M >::erase |
( |
TYPENAME _map< K, T, A, Pr, M >::iterator |
first, |
|
|
TYPENAME _map< K, T, A, Pr, M >::iterator |
last | |
|
) |
| | [inline] |
erases the range of iterators no memory deallocation
- Parameters:
-
first |
first iterator |
last |
last iterator |
Definition at line 773 of file map.hpp.
References _map< K, T, A, Pr, M >::_erase(), base_map< K, T, Pr, M >::_head, base_map< K, T, Pr, M >::_node_::_parent, base_map< K, T, Pr, M >::begin(), base_map< K, T, Pr, M >::clear(), base_map< K, T, Pr, M >::end(), and _map< K, T, A, Pr, M >::erase().
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::iterator _map< K, T, A, Pr, M >::erase |
( |
node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > & |
allocator_, |
|
|
TYPENAME _map< K, T, A, Pr, M >::iterator |
first, |
|
|
TYPENAME _map< K, T, A, Pr, M >::iterator |
last | |
|
) |
| | [inline] |
erases the range of iterators with memory deallocaton on external allocator
- Parameters:
-
allocator_ |
external allocator |
first |
first iterator |
last |
last iterator |
Definition at line 791 of file map.hpp.
References _map< K, T, A, Pr, M >::_erase(), base_map< K, T, Pr, M >::_head, base_map< K, T, Pr, M >::_node_::_parent, base_map< K, T, Pr, M >::begin(), base_map< K, T, Pr, M >::clear(), base_map< K, T, Pr, M >::end(), and _map< K, T, A, Pr, M >::erase().
template<class K, class T, class A, class Pr, bool M>
void _map< K, T, A, Pr, M >::_erase |
( |
TYPENAME _map< K, T, A, Pr, M >::_node * |
x |
) |
[inline, protected] |
removes node, no memory deallocation
- Parameters:
-
Definition at line 809 of file map.hpp.
References t_head, and TYPENAME.
Referenced by _map< K, T, A, Pr, M >::_erase(), and _map< K, T, A, Pr, M >::erase().
template<class K, class T, class A, class Pr, bool M>
void _map< K, T, A, Pr, M >::_erase |
( |
node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > & |
allocator_, |
|
|
TYPENAME _map< K, T, A, Pr, M >::_node * |
x | |
|
) |
| | [inline, protected] |
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::iterator _map< K, T, A, Pr, M >::_insert |
( |
A & |
_allocator, |
|
|
bool |
left, |
|
|
TYPENAME _map< K, T, A, Pr, M >::_node * |
w, |
|
|
const K & |
k, |
|
|
const T & |
v | |
|
) |
| | [inline, protected] |
creates new node on external allocator and insert it
- Parameters:
-
_allocator |
external allocator |
left |
left flag |
w |
target node |
k |
key |
v |
value |
Definition at line 833 of file map.hpp.
References _map< K, T, A, Pr, M >::_buynode(), base_map< K, T, Pr, M >::_insert(), c_red, base_map< K, T, Pr, M >::end(), t_leaf, and TYPENAME.
Referenced by _map< K, T, A, Pr, M >::insert().
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::_node * _map< K, T, A, Pr, M >::_buynode |
( |
byte_allocator & |
_allocator, |
|
|
TYPENAME _map< K, T, A, Pr, M >::_node * |
p, |
|
|
TYPENAME _map< K, T, A, Pr, M >::redblack |
c, |
|
|
TYPENAME _map< K, T, A, Pr, M >::nodetype |
t | |
|
) |
| | [inline, protected] |
template<class K, class T, class A, class Pr, bool M>
TYPENAME _map< K, T, A, Pr, M >::_node * _map< K, T, A, Pr, M >::_buynode |
( |
node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > & |
_allocator, |
|
|
TYPENAME _map< K, T, A, Pr, M >::_node * |
p, |
|
|
TYPENAME _map< K, T, A, Pr, M >::redblack |
c, |
|
|
TYPENAME _map< K, T, A, Pr, M >::nodetype |
t | |
|
) |
| | [inline, protected] |
template<class K, class T, class A, class Pr, bool M>
void _map< K, T, A, Pr, M >::_freenode |
( |
node_allocator< TYPENAME base_map< K, T, Pr, M >::_node > & |
_allocator, |
|
|
TYPENAME _map< K, T, A, Pr, M >::_node * |
s | |
|
) |
| | [inline, protected] |
The documentation for this class was generated from the following files:
|
|