Home / Open source / Terimber 2.0
map< K, T, Pr, M > Class Template Referenceimpelments map with internal node allocator
More...
#include <map.h>
List of all members.
|
Public Member Functions |
| map (const Pr &pr=Pr(), size_t size=os_def_size) |
| constructor
|
| map (const map< K, T, Pr, M > &x) |
| copy constructor
|
| ~map () |
| destructor
|
map< K, T, Pr, M > & | operator= (const map< K, T, Pr, M > &x) |
| assign operator
|
TYPENAME map< K, T, Pr, M >
::pairib_t | insert (const K &k, const T &v) |
| inserts new element key/value
|
TYPENAME map< K, T, Pr, M >
::iterator | erase (TYPENAME map< K, T, Pr, M >::iterator p) |
| erases element by iterator
|
void | erase (const K &k) |
| erases element by key
|
void | clear () |
| clears map
|
Protected Member Functions |
TYPENAME map< K, T, Pr, M >
::iterator | erase (TYPENAME map< K, T, Pr, M >::iterator first, TYPENAME map< K, T, Pr, M >::iterator last) |
| the range of ierators
|
void | _erase (TYPENAME map< K, T, Pr, M >::_node *x) |
| erases a node
|
TYPENAME map< K, T, Pr, M >
::iterator | _insert (bool left, TYPENAME map< K, T, Pr, M >::_node *w, const K &k, const T &v) |
| inserts a new node
|
TYPENAME map< K, T, Pr, M >
::_node * | _buynode (TYPENAME map< K, T, Pr, M >::_node *p, TYPENAME map< K, T, Pr, M >::redblack c, TYPENAME map< K, T, Pr, M >::nodetype t) |
| create a new node on internal allocator
|
void | _freenode (TYPENAME map< K, T, Pr, M >::_node *s) |
| destroys node
|
Protected Attributes |
node_allocator< TYPENAME
base_map< K, T, Pr, M >::_node > | _allocator |
| internal node allocator
|
Detailed Description
template<class K, class T, class Pr = less< K >, bool M = false>
class map< K, T, Pr, M >
impelments map with internal node allocator
Definition at line 767 of file map.h.
Constructor & Destructor Documentation
template<class K, class T, class Pr, bool M>
map< K, T, Pr, M >::map |
( |
const Pr & |
pr = Pr() , |
|
|
size_t |
size = os_def_size | |
|
) |
| | [inline, explicit] |
constructor
- Parameters:
-
pr |
predicate |
size |
number of element on one page of allocator |
Definition at line 885 of file map.hpp.
template<class K, class T, class Pr, bool M>
map< K, T, Pr, M >::map |
( |
const map< K, T, Pr, M > & |
x |
) |
[inline] |
copy constructor
Definition at line 896 of file map.hpp.
template<class K, class T, class Pr, bool M>
map< K, T, Pr, M >::~map |
( |
|
) |
[inline] |
destructor
Definition at line 891 of file map.hpp.
Member Function Documentation
template<class K, class T, class Pr, bool M>
map< K, T, Pr, M > & map< K, T, Pr, M >::operator= |
( |
const map< K, T, Pr, M > & |
x |
) |
[inline] |
assign operator
Definition at line 905 of file map.hpp.
References base_map< K, T, Pr, M >::begin(), map< K, T, Pr, M >::clear(), base_map< K, T, Pr, M >::end(), map< K, T, Pr, M >::insert(), base_map< K, T, Pr, M >::key_compare, and TYPENAME.
template<class K, class T, class Pr, bool M>
TYPENAME map< K, T, Pr, M >::pairib_t map< K, T, Pr, M >::insert |
( |
const K & |
k, |
|
|
const T & |
v | |
|
) |
| | [inline] |
inserts new element key/value
- Parameters:
-
Definition at line 958 of file map.hpp.
References base_map< K, T, Pr, M >::_head, map< K, T, 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 aiofile::_assign_file(), aiosock::_assign_socket(), msg_communicator::_register_this(), fuzzy_matcher_impl::add(), tokenizer::add_abbreviation(), msg_communicator::add_connection(), tokenizer::add_regex(), varmap< T, C >::add_resource(), aiogate::bind(), threadpool::borrow_from_range(), threadpool::borrow_thread(), msg_communicator::change_connection_address(), aiosock::close(), aiofile::close(), aiogate::connect(), memindex::construct(), aiosock::listen(), aiogate::listen(), memindex::notify(), map< K, T, Pr, M >::operator=(), vardatabase::process_xml_request(), msg_user_connection::send_async(), and aiogate::v_on_accept().
template<class K, class T, class Pr, bool M>
erases element by iterator
- Parameters:
-
Definition at line 991 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, Pr, M >::_freenode(), and TYPENAME.
Referenced by aiofile::_assign_file(), aiosock::_assign_socket(), threadpool::_clean_up_clients(), msg_communicator::_close_connection(), msg_communicator::_revoke_this(), aiogate::bind(), threadpool::borrow_from_range(), threadpool::borrow_thread(), msg_communicator::change_connection_address(), map< K, T, Pr, M >::clear(), aiosock::close(), aiofile::close(), aiogate::connect(), aiogate::deaf(), map< K, T, Pr, M >::erase(), aiogate::initiate_close(), aiogate::listen(), memindex::notify(), aiogate::off(), msg_user_connection::pop_async_timeouted(), aiosock::process_timeouted_blocks(), aiofile::process_timeouted_blocks(), vardatabase::process_xml_request(), msg_user_connection::push_msg(), fuzzy_matcher_impl::remove(), varmap< T, C >::remove_all_resource(), varmap< T, C >::remove_resource(), aiosock::v_do_job(), aiofile::v_do_job(), threadpool::v_has_job(), and aiogate::v_on_accept().
template<class K, class T, class Pr, bool M>
void map< K, T, Pr, M >::erase |
( |
const K & |
k |
) |
[inline] |
erases element by key
- Parameters:
-
Definition at line 1008 of file map.hpp.
References base_map< K, T, Pr, M >::_size, base_map< K, T, Pr, M >::equal_range(), map< K, T, Pr, M >::erase(), and TYPENAME.
template<class K, class T, class Pr, bool M>
void map< K, T, Pr, M >::clear |
( |
|
) |
[inline] |
clears map
Reimplemented from base_map< K, T, Pr, M >.
Definition at line 1022 of file map.hpp.
References map< K, T, Pr, M >::_allocator, base_map< K, T, Pr, M >::_size, base_map< K, T, Pr, M >::begin(), base_map< K, T, Pr, M >::clear(), rep_allocator::clear_all(), base_map< K, T, Pr, M >::end(), and map< K, T, Pr, M >::erase().
Referenced by msg_communicator::_destroy_connections(), varmap< T, C >::clear(), tokenizer::clear_abbr(), tokenizer::clear_regex(), aiosock::off(), aiofile::off(), map< K, T, Pr, M >::operator=(), fuzzy_matcher_impl::reset(), and msg_user_connection::~msg_user_connection().
template<class K, class T, class Pr, bool M>
TYPENAME map< K, T, Pr, M >::iterator map< K, T, Pr, M >::erase |
( |
TYPENAME map< K, T, Pr, M >::iterator |
first, |
|
|
TYPENAME map< K, T, Pr, M >::iterator |
last | |
|
) |
| | [inline, protected] |
the range of ierators
- Parameters:
-
Definition at line 1039 of file map.hpp.
References map< K, T, 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, Pr, M >::erase().
template<class K, class T, class Pr, bool M>
void map< K, T, Pr, M >::_erase |
( |
TYPENAME map< K, T, Pr, M >::_node * |
x |
) |
[inline, protected] |
erases a node
- Parameters:
-
Definition at line 1057 of file map.hpp.
References base_map< K, T, Pr, M >::_destkey(), base_map< K, T, Pr, M >::_destval(), map< K, T, Pr, M >::_freenode(), t_head, and TYPENAME.
Referenced by map< K, T, Pr, M >::erase().
template<class K, class T, class Pr, bool M>
TYPENAME map< K, T, Pr, M >::iterator map< K, T, Pr, M >::_insert |
( |
bool |
left, |
|
|
TYPENAME map< K, T, Pr, M >::_node * |
w, |
|
|
const K & |
k, |
|
|
const T & |
v | |
|
) |
| | [inline, protected] |
inserts a new node
- Parameters:
-
left |
left flag |
w |
target node |
k |
key |
v |
value |
Definition at line 1072 of file map.hpp.
References map< K, T, 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, Pr, M >::insert().
template<class K, class T, class Pr, bool M>
TYPENAME map< K, T, Pr, M >::_node * map< K, T, Pr, M >::_buynode |
( |
TYPENAME map< K, T, Pr, M >::_node * |
p, |
|
|
TYPENAME map< K, T, Pr, M >::redblack |
c, |
|
|
TYPENAME map< K, T, Pr, M >::nodetype |
t | |
|
) |
| | [inline, protected] |
create a new node on internal allocator
- Parameters:
-
p |
parent node |
c |
node color |
t |
node type |
Definition at line 1084 of file map.hpp.
References map< K, T, Pr, M >::_allocator, base_map< K, T, Pr, M >::_node_::_color, base_map< K, T, Pr, M >::_node_::_parent, node_allocator< T >::allocate(), base_map< K, T, Pr, M >::head(), and TYPENAME.
Referenced by map< K, T, Pr, M >::_insert().
template<class K, class T, class Pr, bool M>
void map< K, T, Pr, M >::_freenode |
( |
TYPENAME map< K, T, Pr, M >::_node * |
s |
) |
[inline, protected] |
destroys node
- Parameters:
-
Definition at line 1099 of file map.hpp.
References map< K, T, Pr, M >::_allocator, and rep_allocator::deallocate().
Referenced by map< K, T, Pr, M >::_erase(), and map< K, T, Pr, M >::erase().
Member Data Documentation
template<class K, class T, class Pr = less< K >, bool M = false>
internal node allocator
Definition at line 844 of file map.h.
Referenced by map< K, T, Pr, M >::_buynode(), map< K, T, Pr, M >::_freenode(), and map< K, T, Pr, M >::clear().
The documentation for this class was generated from the following files:
|
|