|
Givaro 4.2.1
|
NODOC. More...
#include <givarray0.h>
Inheritance diagram for Array0< T >: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. | |
| typedef Type_t * | iterator |
| typedef const Type_t * | const_iterator |
Public Member Functions | |
| Array0 (size_t s=0) | |
| Default cstor : ctsor of s size array. | |
| Array0 (size_t s, const T &t) | |
| Array0 (const Self_t &p, givNoCopy) | |
| Recopy cstor : logical copy. | |
| Array0 (const Self_t &p, givWithCopy) | |
| Recopy cstor : physical copy. | |
| ~Array0 () | |
| Destructor. | |
| void | destroy () |
| Destroy of the array. | |
| void | allocate (size_t s) |
| Allocation of an array of s Elements. | |
| void | reallocate (size_t s) |
| Reallocation of an array of s Elements. | |
| void | resize (size_t s) |
| resize | |
| void | reserve (size_t s) |
| reserve | |
| Self_t & | copy (const Self_t &src) |
| Physical copy operator. | |
| Self_t & | logcopy (const Self_t &src) |
| Logical recopy operator: make an alias to src. Return dest. | |
| Self_t & | operator= (const Self_t &p) |
| assignement operator is physical copy | |
| size_t | size () const |
| Return the occuped size of the array. | |
| size_t | phsize () const |
| Return the physical size of the array (capacity) | |
| Type_t * | baseptr () |
| Return the base ptr to the array. | |
| const Type_t * | baseptr () const |
| const T & | operator[] (Indice_t i) const |
| Access to the ith Element: | |
| T & | operator[] (Indice_t i) |
| const T & | front () const |
| back/front | |
| T & | front () |
| const T & | back () const |
| T & | back () |
| void | push_back (const T &a) |
| add one element at the end | |
| void | write (Indice_t i, const Type_t &val) |
| write | |
| void | read (Indice_t i, Type_t &val) const |
| read | |
| Iterator_t | begin () |
| Iterators. | |
| Iterator_t | end () |
| constIterator_t | begin () const |
| constIterator_t | end () const |
| int | getCounter () const |
Protected Attributes | |
| int * | _cnt |
| reference counter on _d | |
| size_t | _size |
| actual size of the array. | |
| size_t | _psz |
| physical size of the array | |
| T * | _d |
| ptr to the memory | |
NODOC.
| typedef size_t Indice_t |
| typedef T Type_t |
| typedef Type_t* Iterator_t |
| typedef const Type_t* constIterator_t |
| typedef Type_t value_type |
STL compliance.
| typedef const Type_t* const_iterator |
|
inline |
Default cstor : ctsor of s size array.
|
inline |
|
inline |
Recopy cstor : physical copy.
|
inline |
Destructor.
|
inline |
Destroy of the array.
|
inline |
Allocation of an array of s Elements.
if refcount>1 then it is always a creation of new array
|
inline |
Reallocation of an array of s Elements.
if refcount>1 then it is always a creation of new array + recopy
|
inline |
resize
|
inline |
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.
|
inline |
Return the occuped size of the array.
|
inline |
Return the physical size of the array (capacity)
|
inline |
Return the base ptr to the array.
|
inline |
|
inline |
|
inline |
back/front
|
inline |
|
inline |
|
inline |
|
inline |
add one element at the end
|
inline |
Iterators.
|
inline |
|
inline |
|
inline |
|
inline |
get Counter
|
protected |
reference counter on _d
|
protected |
actual size of the array.
If ==0 then _psz=_d=_cnt=0
|
protected |
physical size of the array
|
protected |
ptr to the memory