#include <XFuDynamicArray.h>
Inheritance diagram for XFuDynamicArray< T >:
Public Member Functions | |
UINT32 | getSizeIncrement () const |
Returns the size increment. | |
void | setSizeIncrement (const UINT32 aSizeIncrement) |
Sets the size increment. | |
UINT32 | size () const |
Returns the number of elements stored in the array. | |
UINT32 | maxSize () const |
Returns the size of the array. | |
INT | isEmpty () const |
Checks whether the array has any elements. | |
T | get (const UINT32 aPos) const |
Returns an element at the specified position in the array. | |
T | get () const |
Returns the last element from the array. | |
void | put (T aElement) |
Adds an element to the end of the array. | |
void | put (const UINT32 aPos, T aElement) |
Inserts an element to the array at the specified position. | |
T | removeIndex (const UINT32 aPos) |
Removes an element from the array and returns the removed element. | |
T | remove (T aElement) |
Removes an element from the array. | |
T | remove () |
Removes the last element from the array and returns the removed element. | |
void | clear () |
Clears the array, but does not free its internal storage. | |
~XFuDynamicArray () | |
Destructor. | |
Static Public Member Functions | |
XFuDynamicArray * | create (const UINT32 aSize=XFUDYNAMICARRAY_DEFAULT_SIZE_INCREMENT) |
Static constructor. | |
Protected Member Functions | |
void | setArraySize (const UINT32 aSize) |
Resizes the element array. | |
XFuDynamicArray () | |
Protected constructor. | |
Protected Attributes | |
UINT32 | mElementCount |
The number of elements in the array. | |
T * | mElements |
Array of elements stored by the dynamic array. | |
UINT32 | mSizeIncrement |
Size increment. | |
UINT32 | mArraySize |
The size of the element array. |
Simple usage example to store UINT32's:
// Create the array XFuDynamicArray<UINT32> *store = XFuDynamicArray<UINT32>::create(); // put 3 values to the end of the array store->put(1); store->put(3); store->put(4); // Insert value in the second position of the array store->put(1, 2); // store now contains { 1, 2, 3, 4 } UINT32 value = store->get(3); // value is now 4 delete store;
Definition at line 39 of file XFuDynamicArray.h.
|
Protected constructor.
Definition at line 102 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mArraySize, XFuDynamicArray< T >::mElementCount, and XFuDynamicArray< T >::mElements. |
|
Destructor.
Definition at line 247 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElements. |
|
Clears the array, but does not free its internal storage.
Definition at line 227 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElementCount. |
|
Static constructor.
Definition at line 234 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mArraySize, XFuDynamicArray< T >::mElementCount, XFuDynamicArray< T >::mElements, XFuDynamicArray< T >::mSizeIncrement, and XFUDYNAMICARRAY_DEFAULT_SIZE_INCREMENT. Referenced by XFuInetNetwork::init(), XFuBluetoothNetwork::init(), and XFuBluetoothMultiNetwork::init(). |
|
Returns the last element from the array.
Definition at line 153 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElementCount, and XFuDynamicArray< T >::mElements. |
|
Returns an element at the specified position in the array.
Definition at line 144 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElementCount, and XFuDynamicArray< T >::mElements. |
|
Returns the size increment.
Definition at line 110 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mSizeIncrement. |
|
Checks whether the array has any elements.
Definition at line 135 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElementCount. |
|
Returns the size of the array.
Definition at line 129 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mArraySize. |
|
Inserts an element to the array at the specified position.
Definition at line 168 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mArraySize, XFuDynamicArray< T >::mElementCount, XFuDynamicArray< T >::mElements, and XFuDynamicArray< T >::setArraySize(). |
|
Adds an element to the end of the array.
Definition at line 162 of file XFuDynamicArray.h. |
|
Removes the last element from the array and returns the removed element.
Definition at line 209 of file XFuDynamicArray.h. References XFuDynamicArray< T >::removeIndex(). |
|
Removes an element from the array.
Definition at line 215 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElementCount, XFuDynamicArray< T >::mElements, and XFuDynamicArray< T >::removeIndex(). |
|
Removes an element from the array and returns the removed element.
Definition at line 190 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElementCount, and XFuDynamicArray< T >::mElements. Referenced by XFuDynamicArray< T >::remove(). |
|
Resizes the element array.
Definition at line 95 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mArraySize, and XFuDynamicArray< T >::mElements. Referenced by XFuDynamicArray< T >::put(). |
|
Sets the size increment.
Definition at line 117 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mSizeIncrement. |
|
Returns the number of elements stored in the array.
Definition at line 123 of file XFuDynamicArray.h. References XFuDynamicArray< T >::mElementCount. |
|
The size of the element array.
Definition at line 51 of file XFuDynamicArray.h. Referenced by XFuDynamicArray< T >::create(), XFuDynamicArray< T >::maxSize(), XFuDynamicArray< T >::put(), XFuDynamicArray< T >::setArraySize(), and XFuDynamicArray< T >::XFuDynamicArray(). |
|
The number of elements in the array.
Definition at line 43 of file XFuDynamicArray.h. Referenced by XFuDynamicArray< T >::clear(), XFuDynamicArray< T >::create(), XFuDynamicArray< T >::get(), XFuDynamicArray< T >::isEmpty(), XFuDynamicArray< T >::put(), XFuDynamicArray< T >::remove(), XFuDynamicArray< T >::removeIndex(), XFuDynamicArray< T >::size(), and XFuDynamicArray< T >::XFuDynamicArray(). |
|
Array of elements stored by the dynamic array.
Definition at line 45 of file XFuDynamicArray.h. Referenced by XFuDynamicArray< T >::create(), XFuDynamicArray< T >::get(), XFuDynamicArray< T >::put(), XFuDynamicArray< T >::remove(), XFuDynamicArray< T >::removeIndex(), XFuDynamicArray< T >::setArraySize(), XFuDynamicArray< T >::XFuDynamicArray(), and XFuDynamicArray< T >::~XFuDynamicArray(). |
|
Size increment.
Definition at line 48 of file XFuDynamicArray.h. Referenced by XFuDynamicArray< T >::create(), XFuDynamicArray< T >::getSizeIncrement(), and XFuDynamicArray< T >::setSizeIncrement(). |
![]() | ||||
![]() |
Confidential Copyright © 2002-2003 Fathammer | with doxygen by Dimitri van Heesch |