wxArt2D
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Holds arrayed variables, e.g. parameter lists in a command processor. More...

#include <gen.h>

Collaboration diagram for a2dVariablesArray:
Collaboration graph
[legend]

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 a2dNamedPropertyGetVariable (int index)
 get an existing variable of unknown type (not cloned) More...
 
a2dNamedPropertyGetVariableClone (int index)
 get an existing variable of unknown type (cloned) More...
 
a2dObjectGetVariableRefObject (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
 

Detailed Description

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.

Definition at line 3326 of file gen.h.

Member Function Documentation

void a2dVariablesArray::AppendVariable ( a2dNamedProperty property)

add a new variable of arbitrary type

Parameters
propertynew variable to add ( id is usually wxPropertyIdXXX::GetDummy )

Definition at line 4369 of file gen.cpp.

void a2dVariablesArray::AppendVariableDouble ( double  value)

add a new double variable

Parameters
valuenew value of the variable

Definition at line 4387 of file gen.cpp.

void a2dVariablesArray::AppendVariableInt ( int  value)

add a new int variable

Parameters
valuenew value of the variable

Definition at line 4393 of file gen.cpp.

void a2dVariablesArray::AppendVariableRefObject ( a2dObject value)

add a new a2dObject variable

Parameters
valuenew value of the variable

Definition at line 4375 of file gen.cpp.

void a2dVariablesArray::AppendVariableString ( const wxString &  value)

add a new wxString variable

Parameters
valuenew value of the variable

Definition at line 4381 of file gen.cpp.

const a2dNamedProperty & a2dVariablesArray::GetVariable ( int  index)

get an existing variable of unknown type (not cloned)

Parameters
indexof the variable (must be valid!)
Returns
the property found.

Definition at line 4399 of file gen.cpp.

wxString a2dVariablesArray::GetVariableAsString ( int  index)

get an existing variable of any type as String

Parameters
indexof the variable (must be valid!)
Returns
the string representation of the property found

Definition at line 4423 of file gen.cpp.

a2dNamedProperty * a2dVariablesArray::GetVariableClone ( int  index)

get an existing variable of unknown type (cloned)

Parameters
indexof the variable (must be valid!)
Returns
the property found.

Definition at line 4405 of file gen.cpp.

a2dObject * a2dVariablesArray::GetVariableRefObject ( int  index)

get an existing a2dObject variable

Parameters
indexof the variable (must be valid!)
Returns
the refobject of the property found.

Definition at line 4411 of file gen.cpp.

wxString a2dVariablesArray::GetVariableString ( int  index)

get an existing wxString variable

Parameters
indexof the variable (must be valid!)
Returns
the string value of the property found.

Definition at line 4417 of file gen.cpp.


The documentation for this class was generated from the following files:
a2dVariablesArray Class Reference -- Sun Oct 12 2014 17:04:51 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation