Givaro
|
ArrayAllocator: class for allocation of arrays. More...
#include <givarrayallocator.h>
Public Types | |
typedef size_t | Indice_t |
typedef T | Type_t |
typedef Array0< T > | Self_t |
typedef Type_t * | Iterator_t |
typedef const Type_t * | constIterator_t |
typedef Type_t | value_type |
STL compliance. More... | |
typedef Type_t * | iterator |
typedef const Type_t * | const_iterator |
Public Member Functions | |
void | destroy () |
Destroy of the array. More... | |
void | allocate (size_t s) |
Allocation of an array of s Elements. More... | |
void | reallocate (size_t s) |
Reallocation of an array of s Elements. More... | |
void | resize (size_t s) |
resize More... | |
void | reserve (size_t s) |
reserve More... | |
Self_t & | copy (const Self_t &src) |
Physical copy operator. More... | |
Self_t & | logcopy (const Self_t &src) |
Logical recopy operator: make an alias to src. Return dest. More... | |
size_t | size () const |
Return the occuped size of the array. More... | |
size_t | phsize () const |
Return the physical size of the array (capacity) More... | |
Type_t * | baseptr () |
Return the base ptr to the array. More... | |
const Type_t * | baseptr () const |
const T & | operator[] (Indice_t i) const |
Access to the ith Element: More... | |
T & | operator[] (Indice_t i) |
const T & | front () const |
back/front More... | |
T & | front () |
const T & | back () const |
T & | back () |
void | push_back (const T &a) |
add one element at the end More... | |
void | write (Indice_t i, const Type_t &val) |
write More... | |
void | read (Indice_t i, Type_t &val) const |
read More... | |
Iterator_t | begin () |
Iterators. More... | |
constIterator_t | begin () const |
Iterator_t | end () |
constIterator_t | end () const |
int | getCounter () const |
Protected Attributes | |
int * | _cnt |
reference counter on _d More... | |
size_t | _size |
actual size of the array. More... | |
size_t | _psz |
physical size of the array More... | |
T * | _d |
ptr to the memory More... | |
ArrayAllocator: class for allocation of arrays.
Specialization: for Array0Tag.
Should have
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
STL compliance.
|
inherited |
|
inlineinherited |
Destroy of the array.
|
inlineinherited |
Allocation of an array of s Elements.
if refcount>1 then it is always a creation of new array
|
inlineinherited |
Reallocation of an array of s Elements.
if refcount>1 then it is always a creation of new array + recopy
|
inlineinherited |
resize
|
inlineinherited |
reserve
Physical copy operator.
reallocate dest of the same size as src (if necessary) and apply GivaroCopyItem<Array<T>,T> on each Element. This class can be specialized. Return dest (i.e, *this).
Logical recopy operator: make an alias to src. Return dest.
|
inlineinherited |
Return the occuped size of the array.
|
inlineinherited |
Return the physical size of the array (capacity)
|
inlineinherited |
Return the base ptr to the array.
|
inlineinherited |
|
inlineinherited |
Access to the ith Element:
|
inlineinherited |
|
inlineinherited |
back/front
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
add one element at the end
|
inlineinherited |
Iterators.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
get Counter
|
protectedinherited |
reference counter on _d
|
protectedinherited |
actual size of the array.
If ==0 then _psz=_d=_cnt=0
|
protectedinherited |
physical size of the array
|
protectedinherited |
ptr to the memory