#include <rdValueArray.h>
Inheritance diagram for rdValueArray< T >:

Public Member Functions | |
| rdValueArray (int aCapacity=128, const char *aName="UNKNOWN") | |
| Default constructor. | |
| virtual | ~rdValueArray () |
| Destructor. | |
| void | setDescription (const char *aDescrip=NULL) |
| Set the description of this storage. | |
| const char * | getDescription () const |
| Get a description of this storage. | |
| bool | ensureCapacity (int aCapacity) |
| Ensure that the capacity of this array is at least the specified amount. | |
| int | getCapacity () const |
| Get the capacity of this storage instance. | |
| void | setCapacityIncrement (int aIncrement=-1) |
| Set the amount by which the capacity is increased. | |
| int | getCapacityIncrement () const |
| Get the amount by which the capacity is increased. | |
| void | setFirstEmpty (int aIndex=0) |
| Set the first empty element of the array to a specified value. | |
| int | getFirstEmpty () const |
| Get the index of the first empty array element. | |
| int | append (const T &aValue) |
| Append a value onto the array. | |
| int | append (const rdValueArray< T > &aArray) |
| Append an array of values. | |
| void | set (int aIndex, const T &aValue) |
| Set the value at a specified index. | |
| T & | get (int aIndex) const |
| Get the pointer at a specified array index. | |
| T & | getLast () const |
| Get the last pointer in the array. | |
| void | insert (int aIndex, const T &aValue) |
| void | remove (int aIndex) |
| Remove an object by index. | |
| void | remove (const T &aValue) |
| int | searchSequential (const T &aValue, int aStartIndex=0) |
| int | searchBinary (const T &aValue) |
| virtual void | updateObject (bool aDeep=true) |
| Update this object based on its XML node. | |
| virtual void | updateNode (bool aDeep=true) |
| Update the XML node that represents this object. | |
Static Public Attributes | |
| const int | CAPMIN = rdValueArray_CAPMIN |
| Minimum capacity. | |
Protected Attributes | |
| char * | _descrip |
| Description. | |
| int | _capacity |
| Current capacity. | |
| int | _capacityIncrement |
| Increment by which the current capacity is increased when the capacity of this storage instance is reached. | |
| T * | _array |
| Array of values. | |
Private Member Functions | |
| void | setNull () |
| Set all member variables to their null or default values. | |
Private Attributes | |
| int | _firstEmpty |
| Index of the first empty array element. | |
A class for storing an array of values of type T. The capacity of the class grows as needed. To use this template for a class of type T, class T must implement the following methods: default constructor, copy constructor, assignment operator (=), equality operator (==), and less than operator (<).
|
||||||||||||||||
|
Default constructor. Note- this class has been replaced by class rdArray<T>. |
|
|||||||||
|
Destructor. When the array is deleted, references to elements of this array become invalid. |
|
||||||||||
|
Append a value onto the array.
|
|
||||||||||
|
Ensure that the capacity of this array is at least the specified amount.
|
|
||||||||||
|
Get the pointer at a specified array index. If the index is greater than or equal to the capacity of the array, NULL is returned.
|
|
|||||||||
|
Get a description of this storage.
|
|
|||||||||
|
Get the index of the first empty array element.
|
|
|||||||||
|
Get the last pointer in the array.
|
|
||||||||||
|
Remove an object by index. When an object is removed, the array locations of all objects following the removed object are shifted down by 1. The caller is responsible for deleting the removed object. To remove an object without shifting the array locations of all objects following the removed object, use the method set().
|
|
||||||||||||||||
|
Set the value at a specified index.
|
|
||||||||||
|
Set the amount by which the capacity is increased. If the specified increment is less than 0 or this method is called with no argument, the capacity is set to double whenever the capacity is exceeded.
|
|
||||||||||
|
Set the description of this storage. If the last character of a description is a carriage return, it is stripped.
|
|
||||||||||
|
Set the first empty element of the array to a specified value. This method essentially resets the array so that all elements stored at a specified index or after are no longer considered valid: append() will simply over-write these elements.
|
|
||||||||||
|
Update the XML node that represents this object.
Reimplemented from rdObject. |
|
||||||||||
|
Update this object based on its XML node.
Reimplemented from rdObject. |
1.3