wxArt2D
|
Holds arrayed variables, e.g. parameter lists in a command processor. More...
#include <gen.h>
Public Member Functions | |
a2dVariablesArray () | |
constructor | |
~a2dVariablesArray () | |
destructor | |
void | DeleteAll () |
delete all variables in the array | |
void | AppendVariable (a2dNamedProperty *property) |
add a new variable of arbitrary type More... | |
void | AppendVariableRefObject (a2dObject *value) |
add a new a2dObject variable More... | |
void | AppendVariableString (const wxString &value) |
add a new wxString variable More... | |
void | AppendVariableDouble (double value) |
add a new double variable More... | |
void | AppendVariableInt (int value) |
add a new int variable More... | |
const a2dNamedProperty & | GetVariable (int index) |
get an existing variable of unknown type (not cloned) More... | |
a2dNamedProperty * | GetVariableClone (int index) |
get an existing variable of unknown type (cloned) More... | |
a2dObject * | GetVariableRefObject (int index) |
get an existing a2dObject variable More... | |
wxString | GetVariableString (int index) |
get an existing wxString variable More... | |
wxString | GetVariableAsString (int index) |
get an existing variable of any type as String More... | |
int | GetCount () |
get the number of elements in the array | |
Protected Member Functions | |
void | SetMinSize (int size) |
set the minimum size for the array | |
Protected Attributes | |
a2dNamedProperty ** | m_properties |
this is the array of properties | |
int | m_nelements |
number of used elements in m_properties | |
int | m_melements |
number of elements in m_properties | |
Holds arrayed variables, e.g. parameter lists in a command processor.
The variables are stored as a2dNamedProperty in an integer indexed array.
Understand that a variable can hold any type of property and therefore any type of information can be stored. How that information is used in the commands within a2dCommandProcessor depends on the commands you implement. e.g. You can have C++ command functions which return a a2dObject* and this you can add a variable to the variable hash. Next that variable can be used to extract information using other commands again.
void a2dVariablesArray::AppendVariable | ( | a2dNamedProperty * | property | ) |
void a2dVariablesArray::AppendVariableDouble | ( | double | value | ) |
void a2dVariablesArray::AppendVariableInt | ( | int | value | ) |
void a2dVariablesArray::AppendVariableRefObject | ( | a2dObject * | value | ) |
void a2dVariablesArray::AppendVariableString | ( | const wxString & | value | ) |
const a2dNamedProperty & a2dVariablesArray::GetVariable | ( | int | index | ) |
wxString a2dVariablesArray::GetVariableAsString | ( | int | index | ) |
a2dNamedProperty * a2dVariablesArray::GetVariableClone | ( | int | index | ) |
a2dObject * a2dVariablesArray::GetVariableRefObject | ( | int | index | ) |
wxString a2dVariablesArray::GetVariableString | ( | int | index | ) |