wxArt2D
Public Member Functions | List of all members

Holds internal variables to be used whereever needed. More...

#include <gen.h>

Inheritance diagram for a2dVariablesHash:
Inheritance graph
[legend]
Collaboration diagram for a2dVariablesHash:
Collaboration graph
[legend]

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 a2dNamedPropertyGetVariable (const wxString &variableName)
 get an existing variable of unknown type (not cloned) More...
 
a2dNamedPropertyGetVariableClone (const wxString &variableName)
 get an existing variable of unknown type (cloned) More...
 
a2dObjectGetVariableRefObject (const wxString &variableName)
 get an existing a2dObject variable More...
 
wxString * GetVariableString (const wxString &variableName)
 get an existing wxString variable More...
 

Detailed Description

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.

Definition at line 3223 of file gen.h.

Member Function Documentation

const a2dNamedProperty * a2dVariablesHash::GetVariable ( const wxString &  variableName)

get an existing variable of unknown type (not cloned)

Parameters
variableNamevariable to search
Returns
NULL if variable does not exist, else the property found.

Definition at line 4294 of file gen.cpp.

a2dNamedProperty * a2dVariablesHash::GetVariableClone ( const wxString &  variableName)

get an existing variable of unknown type (cloned)

Parameters
variableNamevariable to search
Returns
NULL if variable does not exist, else the property found.

Definition at line 4303 of file gen.cpp.

a2dObject * a2dVariablesHash::GetVariableRefObject ( const wxString &  variableName)

get an existing a2dObject variable

Parameters
variableNamevariable to search
Returns
NULL if variable does not exist, else the property found.

Definition at line 4312 of file gen.cpp.

wxString * a2dVariablesHash::GetVariableString ( const wxString &  variableName)

get an existing wxString variable

Parameters
variableNamevariable to search
Returns
NULL if variable does not exist, else the property found.

Definition at line 4321 of file gen.cpp.

bool a2dVariablesHash::SetVariable ( const wxString &  variableName,
a2dNamedProperty property 
)

set a new or replace an existing variable of arbitrary type

Remarks
The given property object is owned and deleted by the variable hash.
Parameters
variableNamevariable to add or replace
propertynew property object for the variable ( id is usually wxPropertyIdXXX::GetDummy )
Returns
true if variable already did exist.

Definition at line 4229 of file gen.cpp.

bool a2dVariablesHash::SetVariableDouble ( const wxString &  variableName,
double  value 
)

set a new or replace an existing double variable

Parameters
variableNamevariable to add or replace
valuenew value of the variable
Returns
true if variable already did exist.

Definition at line 4268 of file gen.cpp.

bool a2dVariablesHash::SetVariableInt ( const wxString &  variableName,
int  value 
)

set a new or replace an existing int variable

Parameters
variableNamevariable to add or replace
valuenew value of the variable
Returns
true if variable already did exist.

Definition at line 4281 of file gen.cpp.

bool a2dVariablesHash::SetVariableRefObject ( const wxString &  variableName,
a2dObject value 
)

set a new or replace an existing a2dObject variable

Parameters
variableNamevariable to add or replace
valuenew value of the variable
Returns
true if variable already did exist.

Definition at line 4242 of file gen.cpp.

bool a2dVariablesHash::SetVariableString ( const wxString &  variableName,
const wxString &  value 
)

set a new or replace an existing wxString variable

Parameters
variableNamevariable to add or replace
valuenew value of the variable
Returns
true if variable already did exist.

Definition at line 4255 of file gen.cpp.


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