This holds all the formulas loaded from the MathScript table and provides a container for them.
More...
#include <mathscript.h>
|
static double | CustomCompoundFunc (const double *parms) |
| internal function used for callbacks to scriptable objects from fparser. More...
|
|
static csString | FormatMessage (const csString &formatString, size_t arg_count, const double *parms) |
| format a message using csString's Format given a string ID and a number of floating points. More...
|
|
static CS::StringIDValue | GetCompoundFunction (const csString &name) |
| retrieve the index of a custom compound function given it's name. More...
|
|
static bool | HasString (const char *str) |
| check whether a string is present in the global lookup table. More...
|
|
static double | RandomGen (const double *dummy) |
| rnd(limit) generates a random number between 0 and limit. More...
|
|
static const char * | Request (uint32 ID) |
| obtain a string literal based on it's actual ID More...
|
|
static const char * | Request (double f) |
| obtain a string literal based on it's masked value More...
|
|
static double | Request (const char *str) |
| request a masked value for a string More...
|
|
static uint32 | RequestID (const char *str) |
| request an ID for a string More...
|
|
This holds all the formulas loaded from the MathScript table and provides a container for them.
It also enables adding of some needed functions not built-in to the formula parser. On top of that it may be used to format a message based on variables retrieved from a MathEnvironment.
Definition at line 51 of file mathscript.h.
MathScriptEngine::MathScriptEngine |
( |
iDataConnection * |
db, |
|
|
const csString & |
mathScriptTable |
|
) |
| |
MathScriptEngine::~MathScriptEngine |
( |
| ) |
|
static double MathScriptEngine::CustomCompoundFunc |
( |
const double * |
parms | ) |
|
|
static |
internal function used for callbacks to scriptable objects from fparser.
do not call this manually.
MathScript* MathScriptEngine::FindScript |
( |
const csString & |
name | ) |
|
static csString MathScriptEngine::FormatMessage |
( |
const csString & |
formatString, |
|
|
size_t |
arg_count, |
|
|
const double * |
parms |
|
) |
| |
|
static |
format a message using csString's Format given a string ID and a number of floating points.
static CS::StringIDValue MathScriptEngine::GetCompoundFunction |
( |
const csString & |
name | ) |
|
|
inlinestatic |
retrieve the index of a custom compound function given it's name.
for internal use only, do not call this manually.
Definition at line 108 of file mathscript.h.
static bool MathScriptEngine::HasString |
( |
const char * |
str | ) |
|
|
inlinestatic |
check whether a string is present in the global lookup table.
Definition at line 165 of file mathscript.h.
bool MathScriptEngine::LoadScripts |
( |
iDataConnection * |
db, |
|
|
bool |
reload = false |
|
) |
| |
Loads all the scripts from the database.
- Returns
- TRUE if it was possible to retrieve successfully the data.
static double MathScriptEngine::RandomGen |
( |
const double * |
dummy | ) |
|
|
static |
rnd(limit) generates a random number between 0 and limit.
void MathScriptEngine::ReloadScripts |
( |
iDataConnection * |
db | ) |
|
Triggers a cleanup and reload of all the scripts.
static const char* MathScriptEngine::Request |
( |
uint32 |
ID | ) |
|
|
inlinestatic |
obtain a string literal based on it's actual ID
Definition at line 114 of file mathscript.h.
static const char* MathScriptEngine::Request |
( |
double |
f | ) |
|
|
inlinestatic |
obtain a string literal based on it's masked value
Definition at line 120 of file mathscript.h.
static double MathScriptEngine::Request |
( |
const char * |
str | ) |
|
|
inlinestatic |
request a masked value for a string
Definition at line 146 of file mathscript.h.
static uint32 MathScriptEngine::RequestID |
( |
const char * |
str | ) |
|
|
inlinestatic |
void MathScriptEngine::UnloadScripts |
( |
| ) |
|
Cleans up all the script and data loaded.
csStringSet MathScriptEngine::customCompoundFunctions |
|
staticprotected |
csString MathScriptEngine::mathScriptTable |
|
protected |
csRandomGen MathScriptEngine::rng |
|
staticprotected |
csHash<MathScript*, csString> MathScriptEngine::scripts |
|
protected |
csStringSet MathScriptEngine::stringLiterals |
|
staticprotected |
The documentation for this class was generated from the following file: