Home / Open source / Terimber 2.0
_list< T, A > Class Template Referenceclass _list uses external allocator class for ALL memory allocations only 4 byte size for empty list object only forward and backward iterators are supported
More...
#include <list.h>
List of all members.
|
Public Member Functions |
| _list () |
| constructor
|
| ~_list () |
| destructor
|
| _list (const _list< T, A > &x) |
| copy constructor copies only pointers to head and to elements NO memory reallocation or copy
|
_list< T, A > & | operator= (const _list< T, A > &x) |
| assign operator copies only pointers to head and to elements NO memory reallocation or copy
|
void | assign (A &allocator_, const _list< T, A > &x) |
| make a full copy
|
void | assign (A &allocator_, TYPENAME _list< T, A >::const_iterator first, TYPENAME _list< T, A >::const_iterator last) |
| makes a full copy
|
void | assign (A &allocator_, size_t n, const T &x=T()) |
| adds n elements to list
|
size_t | size () const |
| gets list size expensive operation
|
TYPENAME _list< T, A >::iterator | push_back (A &allocator_, const T &x) |
| inserts new object to the end of list
|
TYPENAME _list< T, A >::iterator | push_front (A &allocator_, const T &x) |
| inserts new object to the front of list
|
bool | pop_front () |
| removes first element from list no memory deallocation
|
bool | pop_front (node_allocator< TYPENAME base_list< T >::_node > &allocator_) |
| removes first element from list
|
bool | pop_back () |
| no memory deallocation
|
bool | pop_back (node_allocator< TYPENAME base_list< T >::_node > &allocator_) |
| removes last element from list
|
TYPENAME _list< T, A >::iterator | insert (A &allocator_, TYPENAME _list< T, A >::iterator it, const T &x=T()) |
| inserts object before provided iterator
|
void | insert (A &allocator_, TYPENAME _list< T, A >::iterator it, size_t n, const T &x) |
| inserts n objects before provided iterator
|
void | insert (A &allocator_, TYPENAME _list< T, A >::iterator it, TYPENAME _list< T, A >::const_iterator first, TYPENAME _list< T, A >::const_iterator last) |
| inserts the list of objects before provided iterator
|
void | remove (const T &x) |
| removes the specified element of list without memory deallocation must be defined compare operator for stored object
|
void | remove (node_allocator< TYPENAME base_list< T >::_node > &allocator_, const T &x) |
| removes the specified element of list with memory deallocation must be defined compare operator for stored object
|
TYPENAME _list< T, A >::iterator | erase (TYPENAME _list< T, A >::iterator iter) |
| removes list object by iterator no memory deallocation
|
TYPENAME _list< T, A >::iterator | erase (node_allocator< TYPENAME base_list< T >::_node > &allocator_, TYPENAME _list< T, A >::iterator iter) |
| removes list object by iterator with memory deallocation
|
TYPENAME _list< T, A >::iterator | erase (TYPENAME _list< T, A >::iterator first, TYPENAME _list< T, A >::iterator last) |
| removes list objects by iterator interval no memory deallocation
|
TYPENAME _list< T, A >::iterator | erase (node_allocator< TYPENAME base_list< T >::_node > &allocator_, TYPENAME _list< T, A >::iterator first, TYPENAME _list< T, A >::iterator last) |
| removes list objects by iterator interval with memory deallocation
|
Private Member Functions |
TYPENAME _list< T, A >::iterator | remove (TYPENAME _list< T, A >::iterator iter) |
| removes object by iterator interval no memory deallocation
|
TYPENAME _list< T, A >::iterator | remove (node_allocator< TYPENAME base_list< T >::_node > &allocator_, TYPENAME _list< T, A >::iterator iter) |
| removes object by iterator interval with memory deallocation
|
TYPENAME _list< T, A >::_node * | _buynode (byte_allocator &allocator_, const T &x) |
| allocates node object on byte_allocator
|
TYPENAME _list< T, A >::_node * | _buynode (node_allocator< TYPENAME base_list< T >::_node > &allocator_, const T &x) |
| allocates node object on node_allocator
|
void | _freenode (node_allocator< TYPENAME base_list< T >::_node > &allocator_, TYPENAME _list< T, A >::_node *p) |
| deallocates node object on node_allocator
|
Detailed Description
template<class T, class A = byte_allocator>
class _list< T, A >
class _list uses external allocator class for ALL memory allocations only 4 byte size for empty list object only forward and backward iterators are supported
Definition at line 343 of file list.h.
Constructor & Destructor Documentation
template<class T, class A>
template<class T, class A>
template<class T, class A>
copy constructor copies only pointers to head and to elements NO memory reallocation or copy
Definition at line 175 of file list.hpp.
Member Function Documentation
template<class T, class A>
_list< T, A > & _list< T, A >::operator= |
( |
const _list< T, A > & |
x |
) |
[inline] |
template<class T, class A>
void _list< T, A >::assign |
( |
A & |
allocator_, |
|
|
const _list< T, A > & |
x | |
|
) |
| | [inline] |
template<class T, class A>
template<class T, class A>
void _list< T, A >::assign |
( |
A & |
allocator_, |
|
|
size_t |
n, |
|
|
const T & |
x = T() | |
|
) |
| | [inline] |
template<class T, class A>
size_t _list< T, A >::size |
( |
|
) |
const [inline] |
template<class T, class A>
TYPENAME _list< T, A >::iterator _list< T, A >::push_back |
( |
A & |
allocator_, |
|
|
const T & |
x | |
|
) |
| | [inline] |
inserts new object to the end of list
- Parameters:
-
allocator_ |
external allocator |
x |
object |
Definition at line 244 of file list.hpp.
References _list< T, A >::_buynode(), base_list< T >::_head, base_list< T >::_node_::_next, base_list< T >::_node_::_prev, base_list< T >::end(), base_list< T >::head(), and TYPENAME.
Referenced by fuzzy_matcher_impl::_match(), fuzzy_matcher_impl::add(), paged_buffer::add_page(), _list< T, A >::assign(), content_mixed::build_mixed_list(), xml_grammar::copy(), vardatabase::fill_schema(), fuzzy_matcher_impl::match(), dtd_processor::parseAttrEnumeration(), dtd_processor::parseMixed(), var_object_repository::process_returns(), fuzzy_matcher_impl::reconstruct_string(), fuzzy_matcher_impl::remove(), xml_designer_impl::select_xpath(), tokenizer::tokenize(), tokenValues(), orcl_dbserver::v_fetch(), odbc_dbserver::v_fetch(), and mysql_dbserver::v_fetch().
template<class T, class A>
TYPENAME _list< T, A >::iterator _list< T, A >::push_front |
( |
A & |
allocator_, |
|
|
const T & |
x | |
|
) |
| | [inline] |
template<class T, class A>
bool _list< T, A >::pop_front |
( |
|
) |
[inline] |
template<class T, class A>
template<class T, class A>
bool _list< T, A >::pop_back |
( |
|
) |
[inline] |
template<class T, class A>
template<class T, class A>
template<class T, class A>
void _list< T, A >::insert |
( |
A & |
allocator_, |
|
|
TYPENAME _list< T, A >::iterator |
it, |
|
|
size_t |
n, |
|
|
const T & |
x | |
|
) |
| | [inline] |
inserts n objects before provided iterator
- Parameters:
-
allocator_ |
external allocator |
it |
before iterator |
n |
number of objects |
x |
object |
Definition at line 356 of file list.hpp.
References _list< T, A >::insert().
template<class T, class A>
inserts the list of objects before provided iterator
- Parameters:
-
allocator_ |
external allocator |
it |
before iterator |
first |
begin iterator |
last |
end iterator |
Definition at line 365 of file list.hpp.
References _list< T, A >::insert().
template<class T, class A>
void _list< T, A >::remove |
( |
const T & |
x |
) |
[inline] |
template<class T, class A>
template<class T, class A>
template<class T, class A>
removes list object by iterator with memory deallocation
- Parameters:
-
allocator_ |
external allocator |
iter |
erase iterator |
Definition at line 410 of file list.hpp.
template<class T, class A>
removes list objects by iterator interval no memory deallocation
- Parameters:
-
first |
first iterator |
last |
last iterator |
Definition at line 418 of file list.hpp.
template<class T, class A>
removes list objects by iterator interval with memory deallocation
- Parameters:
-
allocator_ |
external allocator |
first |
first iterator |
last |
last iterator |
Definition at line 428 of file list.hpp.
template<class T, class A>
removes object by iterator interval no memory deallocation
- Parameters:
-
Definition at line 438 of file list.hpp.
References TYPENAME.
template<class T, class A>
template<class T, class A>
template<class T, class A>
template<class T, class A>
The documentation for this class was generated from the following files:
|
|