>xabsl | The Extensible Agent Behavior Specification Language | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
start | team | language reference | tools | xabsl engine | download | licence | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
XabslEngine Class Library Reference | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members
xabsl::NamedArray< T > Class Template Reference#include <XabslArray.h>
Inheritance diagram for xabsl::NamedArray< T >: ![]() ![]() Detailed Descriptiontemplate<class T>
The class implements a dynamic array.
|
Public Member Functions | |
virtual | ~NamedArray () |
Destructor. | |
NamedArray< T > & | operator= (const NamedArray< T > &other) |
Assignment operator. | |
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. | |
NamedArrayElement< 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 | append (T element) |
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. | |
T | operator[] (int pos) const |
Returns the value for a given array position. | |
T | operator[] (const char *name) const |
Returns the value for a given name. | |
bool | exists (const char *name) const |
Returns whether an element for the given name exists. | |
void | removeLast () |
Removes the last element of the array. | |
Protected Member Functions | |
int | find (const char *name) const |
Returns the index of an element with the given name. |
|
Destructor.
Definition at line 220 of file XabslArray.h. |
|
Assignment operator.
Definition at line 230 of file XabslArray.h. |
|
Clears the array.
Reimplemented from xabsl::Array< NamedArrayElement< T > * >. Definition at line 244 of file XabslArray.h. |
|
Returns the value for a given name. If no element exists for the name, the default value is returned.
Definition at line 258 of file XabslArray.h. Referenced by xabsl::NamedArray< EnumeratedOutputSymbol * >::getElement(), and xabsl::NamedArray< EnumeratedOutputSymbol * >::operator[](). |
|
Returns the value for a given name. Note that the function crashes if the element does not exist.
Definition at line 272 of file XabslArray.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. Reimplemented from xabsl::Array< NamedArrayElement< T > * >. Definition at line 282 of file XabslArray.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 292 of file XabslArray.h. |
|
Returns the name of an element.
Definition at line 298 of file XabslArray.h. Referenced by xabsl::NamedArray< EnumeratedOutputSymbol * >::find(). |
|
The function appends a new element to the array.
Definition at line 308 of file XabslArray.h. Referenced by xabsl::NamedArray< EnumeratedOutputSymbol * >::append(). |
|
Definition at line 312 of file XabslArray.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 323 of file XabslArray.h. Referenced by xabsl::NamedArray< EnumeratedOutputSymbol * >::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 334 of file XabslArray.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. Reimplemented from xabsl::Array< NamedArrayElement< T > * >. Definition at line 344 of file XabslArray.h. |
|
Returns the value for a given name. Note that the function crashes if the element does not exist.
Definition at line 354 of file XabslArray.h. |
|
Returns whether an element for the given name exists.
Definition at line 360 of file XabslArray.h. Referenced by xabsl::Action::create(). |
|
Removes the last element of the array.
Reimplemented from xabsl::Array< NamedArrayElement< T > * >. Definition at line 366 of file XabslArray.h. |
|
Returns the index of an element with the given name.
Definition at line 378 of file XabslArray.h. Referenced by xabsl::NamedArray< EnumeratedOutputSymbol * >::exists(), xabsl::NamedArray< EnumeratedOutputSymbol * >::getElement(), xabsl::NamedArray< EnumeratedOutputSymbol * >::getPElement(), and xabsl::NamedArray< EnumeratedOutputSymbol * >::setElement(). |
Up | Main Page | Generated at Wed Aug 19 17:32:30 2009.