#include <Xabsl2Array.h>
Public Member Functions | |
Xabsl2Array () | |
Constructor. | |
~Xabsl2Array () | |
Destructor. | |
void | clear () |
Clears the array. | |
T | getElement (const char *name, T defaultValue) const |
Returns the value for a given name. | |
T | getElement (const char *name) const |
Returns the value for a given name. | |
T | getElement (int pos) const |
Returns the value for a given array position. | |
Xabsl2ArrayElement< T > * | getPElement (const char *name) |
Returns a pointer to the array element for a given name. | |
const char * | getName (int pos) const |
Returns the name of an element. | |
void | append (const char *name, T element) |
The function appends a new element to the array. | |
void | setElement (const char *name, T value) |
The function sets the value of an element in the array. | |
void | setElement (int pos, T value) |
The function sets the value of an element in the array. | |
int | getSize () const |
The function returns the number of elements in the array. | |
T | operator[] (int pos) const |
Returns the value for a given array position. | |
bool | exists (const char *name) const |
Returns whether an element for the given name exists. | |
Protected Member Functions | |
int | find (const char *name) const |
Returns the index of an element with the given name. | |
Protected Attributes | |
Xabsl2ArrayElement< T > ** | data |
The array. | |
int | usedSize |
The number of elements in the array. | |
int | allocatedSize |
The number of elements in the array. |
Each array element can have a text label.
Martin Lötzsch
Thomas Röfer
Definition at line 78 of file Xabsl2Array.h.
|
Constructor.
Definition at line 82 of file Xabsl2Array.h. |
|
Destructor.
Definition at line 90 of file Xabsl2Array.h. |
|
Clears the array.
Definition at line 98 of file Xabsl2Array.h. |
|
Returns the value for a given name. If no element exists for the name, the default value is returned.
Definition at line 115 of file Xabsl2Array.h. Referenced by Xabsl2State::create(), Xabsl2Array< Xabsl2State * >::getElement(), Xabsl2Array< Xabsl2State * >::operator[](), and Xabsl2TransitionToState::Xabsl2TransitionToState(). |
|
Returns the value for a given name. Note that the function crashes if the element does not exist.
Definition at line 129 of file Xabsl2Array.h. |
|
Returns the value for a given array position. Note that the function crashes if the required position is bigger than the size of the array. Definition at line 139 of file Xabsl2Array.h. |
|
Returns a pointer to the array element for a given name. Note that the function crashes if the element does not exist
Definition at line 149 of file Xabsl2Array.h. Referenced by Xabsl2OptionParameterRef::Xabsl2OptionParameterRef(). |
|
Returns the name of an element.
Definition at line 155 of file Xabsl2Array.h. Referenced by Xabsl2Array< Xabsl2State * >::find(). |
|
The function appends a new element to the array.
Definition at line 165 of file Xabsl2Array.h. |
|
The function sets the value of an element in the array. Note that the function crashes if the element does not exist.
Definition at line 185 of file Xabsl2Array.h. Referenced by Xabsl2Array< Xabsl2State * >::setElement(). |
|
The function sets the value of an element in the array. Note that the function crashes if the element does not exist.
Definition at line 196 of file Xabsl2Array.h. |
|
The function returns the number of elements in the array.
Definition at line 205 of file Xabsl2Array.h. Referenced by Xabsl2Array< Xabsl2State * >::append(), Xabsl2Array< Xabsl2State * >::clear(), Xabsl2Array< Xabsl2State * >::find(), and Xabsl2Array< Xabsl2State * >::~Xabsl2Array(). |
|
Returns the value for a given array position. Note that the function crashes if the required position is bigger than the size of the array. Definition at line 212 of file Xabsl2Array.h. |
|
Returns whether an element for the given name exists.
Definition at line 218 of file Xabsl2Array.h. Referenced by Xabsl2State::create(), and Xabsl2OptionParameterRef::Xabsl2OptionParameterRef(). |
|
Returns the index of an element with the given name.
Definition at line 229 of file Xabsl2Array.h. Referenced by Xabsl2Array< Xabsl2State * >::exists(), Xabsl2Array< Xabsl2State * >::getElement(), Xabsl2Array< Xabsl2State * >::getPElement(), and Xabsl2Array< Xabsl2State * >::setElement(). |
|
The array.
Definition at line 238 of file Xabsl2Array.h. |
|
The number of elements in the array.
Definition at line 241 of file Xabsl2Array.h. |
|
The number of elements in the array.
Definition at line 241 of file Xabsl2Array.h. |