a2dVariablesArray Class Reference
[base classes used for many othersa2dPropObject holds property objects]

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

#include <gen.h>

Collaboration diagram for a2dVariablesArray:

Collaboration graph
[legend]

List of all members.

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
void AppendVariableRefObject (a2dObject *value)
 add a new a2dObject variable
void AppendVariableString (const wxString &value)
 add a new wxString variable
void AppendVariableDouble (double value)
 add a new double variable
void AppendVariableInt (int value)
 add a new int variable
const a2dNamedPropertyGetVariable (int index)
 get an existing variable of unknown type (not cloned)
a2dNamedPropertyGetVariableClone (int index)
 get an existing variable of unknown type (cloned)
a2dObjectGetVariableRefObject (int index)
 get an existing a2dObject variable
wxString GetVariableString (int index)
 get an existing wxString variable
wxString GetVariableAsString (int index)
 get an existing variable of any type as String
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 2717 of file gen.h.


Member Function Documentation

void a2dVariablesArray::AppendVariable ( a2dNamedProperty property  ) 

add a new variable of arbitrary type

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

Definition at line 3007 of file gen.cpp.

void a2dVariablesArray::AppendVariableRefObject ( a2dObject value  ) 

add a new a2dObject variable

Parameters:
value new value of the variable

Definition at line 3013 of file gen.cpp.

void a2dVariablesArray::AppendVariableString ( const wxString &  value  ) 

add a new wxString variable

Parameters:
value new value of the variable

Definition at line 3019 of file gen.cpp.

void a2dVariablesArray::AppendVariableDouble ( double  value  ) 

add a new double variable

Parameters:
value new value of the variable

Definition at line 3025 of file gen.cpp.

void a2dVariablesArray::AppendVariableInt ( int  value  ) 

add a new int variable

Parameters:
value new value of the variable

Definition at line 3031 of file gen.cpp.

const a2dNamedProperty & a2dVariablesArray::GetVariable ( int  index  ) 

get an existing variable of unknown type (not cloned)

Parameters:
index of the variable (must be valid!)
Returns:
the property found.

Definition at line 3037 of file gen.cpp.

a2dNamedProperty * a2dVariablesArray::GetVariableClone ( int  index  ) 

get an existing variable of unknown type (cloned)

Parameters:
index of the variable (must be valid!)
Returns:
the property found.

Definition at line 3043 of file gen.cpp.

a2dObject * a2dVariablesArray::GetVariableRefObject ( int  index  ) 

get an existing a2dObject variable

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

Definition at line 3049 of file gen.cpp.

wxString a2dVariablesArray::GetVariableString ( int  index  ) 

get an existing wxString variable

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

Definition at line 3055 of file gen.cpp.

wxString a2dVariablesArray::GetVariableAsString ( int  index  ) 

get an existing variable of any type as String

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

Definition at line 3061 of file gen.cpp.


The documentation for this class was generated from the following files:
a2dVariablesArray Class Reference -- Tue Aug 31 18:36:10 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation