|
CartoType API
|
#include <cartotype_array.h>
Public Member Functions | |
| CPointerArray (bool aOwnData=true, int32 aIncrement=0) | |
| TResult | Append (const T *const *aElement, int32 aCount) |
| TResult | Append (const T *aElement) |
| T * | Append (TResult &aError) |
| TResult | Insert (const T *const *aElement, int32 aIndex, int32 aCount) |
| TResult | Insert (const T *aElement, int32 aIndex) |
| void | Delete (int32 aIndex, int32 aCount=1) |
| void | Clear () |
| void | SetSizeToZero () |
| TResult | SetSize (int32 aSize) |
| int32 | Count () const |
| T ** | Data () |
| const T *const * | Data () const |
| T *& | operator[] (int32 aIndex) |
| const T * | operator[] (int32 aIndex) const |
| TResult | Reserve (int32 aCount) |
| int32 | MemoryUsed () const |
A variable-size array of objects of type T*. This class can be used for any type of object but is most convenient for an array of C-class objects or objects of variable size or variable derived class.
| CartoType::CPointerArray< T >::CPointerArray | ( | bool | aOwnData = true, |
| int32 | aIncrement = 0 |
||
| ) | [inline] |
Create an array. If aOwnData is true the elements are owned by the array and deleted by its destructor, and when individually deleted; and ownership is transferred to the array when they are added to it. The meaning of aIncrement is the same as in CArray.
| TResult CartoType::CPointerArray< T >::Append | ( | const T *const * | aElement, |
| int32 | aCount | ||
| ) | [inline] |
Append aCount elements stored contiguously in the C++ array aElement.
| TResult CartoType::CPointerArray< T >::Append | ( | const T * | aElement | ) | [inline] |
Append a single element.
| T* CartoType::CPointerArray< T >::Append | ( | TResult & | aError | ) | [inline] |
Create and append a new element and return a pointer to it.
| void CartoType::CPointerArray< T >::Clear | ( | ) | [inline] |
Delete all the elements.
Reimplemented from CartoType::CArrayBase.
| int32 CartoType::CPointerArray< T >::Count | ( | ) | const [inline] |
Return the number of elements.
| T** CartoType::CPointerArray< T >::Data | ( | ) | [inline] |
Return a writable pointer to the underlying C++ array of pointers to elements.
| const T* const* CartoType::CPointerArray< T >::Data | ( | ) | const [inline] |
Return a read-only pointer to the underlying C++ array of pointers to elements.
| void CartoType::CPointerArray< T >::Delete | ( | int32 | aIndex, |
| int32 | aCount = 1 |
||
| ) | [inline] |
Delete aCount elements, starting with aIndex.
Reimplemented from CartoType::CArrayBase.
| TResult CartoType::CPointerArray< T >::Insert | ( | const T *const * | aElement, |
| int32 | aIndex, | ||
| int32 | aCount | ||
| ) | [inline] |
Insert aCount elements before the element indexed by aIndex.
| TResult CartoType::CPointerArray< T >::Insert | ( | const T * | aElement, |
| int32 | aIndex | ||
| ) | [inline] |
Insert a single element before the element indexed by aIndex.
| int32 CartoType::CPointerArray< T >::MemoryUsed | ( | ) | const [inline] |
Return the number of heap bytes used by the array.
| T*& CartoType::CPointerArray< T >::operator[] | ( | int32 | aIndex | ) | [inline] |
The writable array index operator, allowing the array to be treated like a C++ array.
| const T* CartoType::CPointerArray< T >::operator[] | ( | int32 | aIndex | ) | const [inline] |
The constant array index operator, allowing the array to be treated like a C++ array.
| TResult CartoType::CPointerArray< T >::Reserve | ( | int32 | aCount | ) | [inline] |
Reserve space for at least aCount elements.
Reimplemented from CartoType::CArrayBase.
| TResult CartoType::CPointerArray< T >::SetSize | ( | int32 | aSize | ) | [inline] |
Set the size of the array.
Reimplemented from CartoType::CArrayBase.
| void CartoType::CPointerArray< T >::SetSizeToZero | ( | ) | [inline] |
Set the size of the array to zero without discarding reserved memory.
Reimplemented from CartoType::CArrayBase.
1.7.5.1