|
Planeshift
|
A specific MathEnvironment to be used in a MathScript. More...
#include <mathscript.h>
Public Member Functions | |
| void | Define (const char *name, double value) |
| define a regular variable in the environment | |
| void | Define (const char *name, iScriptableVar *obj) |
| define an object variable in the environment | |
| void | Define (const char *name, const char *str) |
| define a string variable in the environment | |
| void | DumpAllVars () const |
| iScriptableVar * | GetPointer (double id) const |
| retrieve a pointer to a scriptable object based on it's id. | |
| csString | GetString (double id) const |
| retrieve a string literal based on it's id. | |
| double | GetValue (iScriptableVar *p) |
| retrieve an ID for a scriptable object. | |
| double | GetValue (const char *p) |
| retrieve an ID for a string literal. | |
| bool | HasObject (iScriptableVar *p) const |
| test whether we have an ID for an object. | |
| bool | HasString (const char *p) const |
| test whether we have an ID for a string. | |
| void | InterpolateString (csString &str) const |
| Perform string interpolation, i.e. replacing ${...} with the appropriate variable. | |
| MathVar * | Lookup (const char *name) const |
| MathEnvironment () | |
| MathEnvironment (const MathEnvironment *parent) | |
| ~MathEnvironment () | |
A specific MathEnvironment to be used in a MathScript.
This holds all currently defined variables in that environment and allows you to define/retrieve those.
Definition at line 188 of file mathscript.h.
| MathEnvironment::MathEnvironment | ( | ) | [inline] |
Definition at line 212 of file mathscript.h.
| MathEnvironment::MathEnvironment | ( | const MathEnvironment * | parent | ) | [inline] |
Definition at line 217 of file mathscript.h.
| MathEnvironment::~MathEnvironment | ( | ) |
| void MathEnvironment::Define | ( | const char * | name, |
| double | value | ||
| ) |
define a regular variable in the environment
| void MathEnvironment::Define | ( | const char * | name, |
| iScriptableVar * | obj | ||
| ) |
define an object variable in the environment
| void MathEnvironment::Define | ( | const char * | name, |
| const char * | str | ||
| ) |
define a string variable in the environment
| void MathEnvironment::DumpAllVars | ( | ) | const |
| iScriptableVar* MathEnvironment::GetPointer | ( | double | id | ) | const |
retrieve a pointer to a scriptable object based on it's id.
| csString MathEnvironment::GetString | ( | double | id | ) | const |
retrieve a string literal based on it's id.
| double MathEnvironment::GetValue | ( | const char * | p | ) |
retrieve an ID for a string literal.
| double MathEnvironment::GetValue | ( | iScriptableVar * | p | ) |
retrieve an ID for a scriptable object.
| bool MathEnvironment::HasObject | ( | iScriptableVar * | p | ) | const |
test whether we have an ID for an object.
| bool MathEnvironment::HasString | ( | const char * | p | ) | const |
test whether we have an ID for a string.
| void MathEnvironment::InterpolateString | ( | csString & | str | ) | const |
Perform string interpolation, i.e. replacing ${...} with the appropriate variable.
| MathVar* MathEnvironment::Lookup | ( | const char * | name | ) | const |
1.7.3