#include <rdObjectArray.h>
Inheritance diagram for rdObjectArray:

Public Member Functions | |
| rdObjectArray (int aCapacity=128, const char *aName="UNKNOWN") | |
| Default constructor. | |
| rdObjectArray (const char *aFileName) | |
| Construct from a file. | |
| rdObjectArray (IDOM_Element *aElement) | |
| Construct based on an XML element. | |
| virtual | ~rdObjectArray () |
| Destructor. | |
| virtual void | setDescription (const char *aDescrip=NULL) |
| Set the description of this storage. | |
| virtual const char * | getDescription () const |
| Get a description of this storage. | |
| virtual bool | ensureCapacity (int aCapacity) |
| Ensure that the capacity of this expandable array is at least the specified amount. | |
| virtual int | getCapacity () const |
| Get the capacity of this storage instance. | |
| virtual void | setCapacityIncrement (int aIncrement=-1) |
| Set the amount by which the capacity is increased. | |
| virtual int | getCapacityIncrement () const |
| Get the amount by which the capacity is increased. | |
| virtual void | reset () |
| Reset the storage to start storing at index 0. | |
| virtual void | reset (int aIndex) |
| Reset the storage to start storing after the specified index. | |
| virtual int | getFirstEmpty () const |
| Get the index of the first empty array element. | |
| virtual int | getIndex (const char *aName, int aStart=0) const |
| Get the index of the first object with the specified name. | |
| virtual int | getIndex (rdObject *aObject) const |
| Get the index of an object by pointer value. | |
| virtual rdObject * | set (int aIndex, rdObject *aObject) |
| Set the pointer at a specified array index. | |
| virtual rdObject * | get (int aIndex) const |
| Get the pointer at a specified array index. | |
| virtual rdObject * | getLast () const |
| Get the last pointer in the array. | |
| virtual int | append (rdObject *aObject) |
| Append an object. | |
| virtual int | append (rdObjectArray *aArray) |
| Append all the objects in an rdObjectArray object. | |
| virtual rdObject * | remove (int aIndex) |
| Remove an object by index. | |
| virtual rdObject * | remove (rdObject *aObject) |
| Remove an object based on the object's pointer. | |
| virtual void | updateObject (bool aDeep=true) |
| Update this object based on its XML node. | |
| virtual void | updateNode (bool aDeep=true) |
| Update the XML node representing this object. | |
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. | |
| rdObject ** | _array |
| Array of pointers to rdObjects. | |
Static Protected Attributes | |
| const int | CAPMIN = rdObjectArray_CAPMIN |
| Minimum capacity. | |
Private Member Functions | |
| void | allocateCapacity () |
| void | setNull () |
| Set all member variables to their null or default values. | |
Private Attributes | |
| int | _firstEmpty |
| Index of the first empty rdStateVector pointer. | |
The capacity of the class grows as needed.
When an rdObjectArray object is deleted, the objects held by the array are deleted.
|
|
Construct from a file.
|
|
|
Construct based on an XML element.
|
|
|
Destructor. The destructor does NOT call the destructor for the pointer elements held in the array. It simply deletes the array itself. |
|
|
Append an object.
|
|
|
Ensure that the capacity of this expandable 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 index of an object by pointer value.
|
|
||||||||||||
|
Get the index of the first object with the specified name. A case-sensitive comparison of the specified name is performed to identify the object.
|
|
|
Get the last pointer in the array.
|
|
|
Remove an object based on the object's pointer. When an object is removed, the array locations of all objects following the removed object are shifted down by 1. This method is fairly expensive to call at this time because the entire array is searched sequentially. 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().
|
|
|
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 pointer at a specified array index. If the index is greater than or equal to the capacity, sufficient capacity is added. It is permissible to set the value of an array element to NULL.
|
|
|
Set the amount by which the capacity is increased. If an increment is sent in that 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.
|
|
|
Update the XML node representing this object.
Reimplemented from rdObject. Reimplemented in rdFunctionSet, and suTrackObjectSet. |
|
|
Update this object based on its XML node.
Reimplemented from rdObject. Reimplemented in rdFunctionSet, and suTrackObjectSet. |
1.3