wxArt2D
|
Holds internal variables to be used whereever needed. More...
#include <gen.h>
Public Member Functions | |
a2dVariablesHash () | |
constructor | |
a2dVariablesHash (const a2dVariablesHash &other) | |
copy constructor | |
void | operator= (const a2dVariablesHash &other) |
assignment operator | |
~a2dVariablesHash () | |
destructor | |
bool | SetVariable (const wxString &variableName, a2dNamedProperty *property) |
set a new or replace an existing variable of arbitrary type More... | |
bool | SetVariableRefObject (const wxString &variableName, a2dObject *value) |
set a new or replace an existing a2dObject variable More... | |
bool | SetVariableString (const wxString &variableName, const wxString &value) |
set a new or replace an existing wxString variable More... | |
bool | SetVariableDouble (const wxString &variableName, double value) |
set a new or replace an existing double variable More... | |
bool | SetVariableInt (const wxString &variableName, int value) |
set a new or replace an existing int variable More... | |
const a2dNamedProperty * | GetVariable (const wxString &variableName) |
get an existing variable of unknown type (not cloned) More... | |
a2dNamedProperty * | GetVariableClone (const wxString &variableName) |
get an existing variable of unknown type (cloned) More... | |
a2dObject * | GetVariableRefObject (const wxString &variableName) |
get an existing a2dObject variable More... | |
wxString * | GetVariableString (const wxString &variableName) |
get an existing wxString variable More... | |
Holds internal variables to be used whereever needed.
The variables are stored as wxString keys plus a2dNamedProperty in a hash table.
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.
const a2dNamedProperty * a2dVariablesHash::GetVariable | ( | const wxString & | variableName | ) |
a2dNamedProperty * a2dVariablesHash::GetVariableClone | ( | const wxString & | variableName | ) |
a2dObject * a2dVariablesHash::GetVariableRefObject | ( | const wxString & | variableName | ) |
wxString * a2dVariablesHash::GetVariableString | ( | const wxString & | variableName | ) |
bool a2dVariablesHash::SetVariable | ( | const wxString & | variableName, |
a2dNamedProperty * | property | ||
) |
set a new or replace an existing variable of arbitrary type
variableName | variable to add or replace |
property | new property object for the variable ( id is usually wxPropertyIdXXX::GetDummy ) |
bool a2dVariablesHash::SetVariableDouble | ( | const wxString & | variableName, |
double | value | ||
) |
bool a2dVariablesHash::SetVariableInt | ( | const wxString & | variableName, |
int | value | ||
) |
bool a2dVariablesHash::SetVariableRefObject | ( | const wxString & | variableName, |
a2dObject * | value | ||
) |
bool a2dVariablesHash::SetVariableString | ( | const wxString & | variableName, |
const wxString & | value | ||
) |