Home / Open source / Terimber 2.0
_vector< T, A > Class Template Referencesupports vector with external allocator size of empty vector is 8 byte
More...
#include <vector.h>
List of all members.
|
Public Member Functions |
| _vector () |
| constructor
|
| ~_vector () |
| destructor
|
| _vector (const _vector< T, A > &x) |
| copy constructor copies only pointer to first element and length no memory reallocation or copy
|
_vector< T, A > & | operator= (const _vector< T, A > &x) |
| assign operator copies only pointer to first element and length no reallocation or copying of memory
|
bool | assign (A &allocator_, TYPENAME _vector< T, A >::const_iterator first, TYPENAME _vector< T, A >::const_iterator last) |
| assign range of iterators
|
bool | assign (A &allocator_, size_t n, const T &x=T()) |
| assigns n equal values
|
bool | assign (A &allocator_, const _vector< T, A > &x) |
| assigns another vector copies values
|
bool | resize (A &allocator_, size_t n, const T &x) |
| expands boundaries if needed must be defined as a copy constructor for template T
|
bool | resize (A &allocator_, size_t n) |
| expands boundaries if needed
|
void | reduce (size_t n) |
| reduces boundaries if needed no memory deallocation, no destructors invoked
|
void | clear () |
| clear vector
|
void | clear (array_allocator< T > &allocator_) |
| clears vector and deallocates memory on external allocator
|
Private Member Functions |
void | _reduce (size_t n) |
| reduces size of vector no memory deallocation
|
T * | _buynodes (byte_allocator &allocator_, size_t n) |
| allocates array of objects on external byte_allocator
|
T * | _buynodes (array_allocator< T > &allocator_, size_t n) |
| allocates array of objects on external array_allocator
|
Detailed Description
template<class T, class A = byte_allocator>
class _vector< T, A >
supports vector with external allocator size of empty vector is 8 byte
Definition at line 87 of file vector.h.
Constructor & Destructor Documentation
template<class T, class A>
template<class T, class A>
template<class T, class A>
copy constructor copies only pointer to first element and length no memory reallocation or copy
Definition at line 156 of file vector.hpp.
Member Function Documentation
template<class T, class A>
template<class T, class A>
template<class T, class A>
bool _vector< T, A >::assign |
( |
A & |
allocator_, |
|
|
size_t |
n, |
|
|
const T & |
x = T() | |
|
) |
| | [inline] |
template<class T, class A>
bool _vector< T, A >::assign |
( |
A & |
allocator_, |
|
|
const _vector< T, A > & |
x | |
|
) |
| | [inline] |
template<class T, class A>
bool _vector< T, A >::resize |
( |
A & |
allocator_, |
|
|
size_t |
n, |
|
|
const T & |
x | |
|
) |
| | [inline] |
expands boundaries if needed must be defined as a copy constructor for template T
- Parameters:
-
allocator_ |
external allocator |
n |
new vector length |
x |
input value |
Definition at line 228 of file vector.hpp.
References _vector< T, A >::_buynodes(), base_vector< T >::_first, base_vector< T >::_length, and _vector< T, A >::_reduce().
Referenced by dbserver_impl::_get_columns_info(), paged_buffer::add_page(), _vector< T, A >::assign(), content_children::build_dfa(), fuzzy_matcher_impl::candidate_sorter::candidate_sorter(), memtable::create(), cluster_processor< T, N >::cut(), vardatabase::fill_schema(), var_object_repository::insert_object(), memtable::insert_row(), content_children::make_def_state_list(), mst< T, N >::mst(), memtable::populate(), priority_queue< T >::priority_queue(), var_object_repository::process_values(), var_object_repository::select_object(), mysql_dbserver::v_before_bind_columns(), and mysql_dbserver::v_replace_quote().
template<class T, class A>
bool _vector< T, A >::resize |
( |
A & |
allocator_, |
|
|
size_t |
n | |
|
) |
| | [inline] |
template<class T, class A>
void _vector< T, A >::reduce |
( |
size_t |
n |
) |
[inline] |
template<class T, class A>
void _vector< T, A >::clear |
( |
|
) |
[inline] |
template<class T, class A>
template<class T, class A>
void _vector< T, A >::_reduce |
( |
size_t |
n |
) |
[inline, private] |
template<class T, class A>
template<class T, class A>
The documentation for this class was generated from the following files:
|
|