![]() |
Murl Engine API
Version 2025.1
|
An expression evaluator. More...
#include <murl_util_evaluator.h>
An expression evaluator.
Public Member Functions | |
| Evaluator () | |
| The constructor. | |
| virtual | ~Evaluator () |
| The destructor. | |
| virtual Bool | AddConstants (const IAttributes *constants) |
| Add a set of user-defined constants used during evaluation. More... | |
| virtual Bool | AddVariables (IAttributes *variables) |
| Add a set of user-defined variables used during evaluation. More... | |
| virtual Bool | Update () |
| Update the evaluator. More... | |
| virtual Bool | Evaluate (const String &expression, String &result) |
| Evaluate a given expression string. More... | |
| virtual UInt32 | GetNumberOfConstantSets () const |
| Get the number of known constant sets. More... | |
| virtual UInt32 | GetNumberOfConstants (UInt32 constantSetIndex) const |
| Get the number of known constants for a given set. More... | |
| virtual String | GetConstantName (UInt32 constantSetIndex, UInt32 constantIndex) const |
| Get the name of a given constant. More... | |
| virtual String | GetConstantValue (UInt32 constantSetIndex, UInt32 constantIndex) const |
| Get the value of a given constant. More... | |
| virtual UInt32 | GetNumberOfVariableSets () const |
| Get the number of known variable sets. More... | |
| virtual UInt32 | GetNumberOfVariables (UInt32 variableSetIndex) const |
| Get the number of known variables for a given set. More... | |
| virtual String | GetVariableName (UInt32 variableSetIndex, UInt32 variableIndex) const |
| Get the name of a given variable. More... | |
| virtual String | GetVariableValue (UInt32 variableSetIndex, UInt32 variableIndex) const |
| Get the value of a given variable. More... | |
| virtual UInt32 | GetNumberOfFunctionSets () const |
| Get the number of known function sets. More... | |
| virtual UInt32 | GetNumberOfFunctions (UInt32 functionSetIndex) const |
| Get the number of known functions for a given set. More... | |
| virtual String | GetFunctionName (UInt32 functionSetIndex, UInt32 functionIndex) const |
| Get the name of a given function. More... | |
| virtual SInt32 | GetFunctionMinNumberOfArguments (UInt32 functionSetIndex, UInt32 functionIndex) const |
| Get the minimum number of arguments for a given function. More... | |
| virtual SInt32 | GetFunctionMaxNumberOfArguments (UInt32 functionSetIndex, UInt32 functionIndex) const |
| Get the maximum number of arguments for a given function. More... | |
| virtual String | GetFunctionArgumentName (UInt32 functionSetIndex, UInt32 functionIndex, UInt32 argumentIndex) const |
| Get the name of a given function's argument. More... | |
|
virtual |
Add a set of user-defined constants used during evaluation.
| constants | The user-defined constants. |
|
virtual |
Add a set of user-defined variables used during evaluation.
| variables | The user-defined variables. |
|
virtual |
Update the evaluator.
Whenever an input constant or variable has changed, this method must be called prior to Evaluate() to reflect the actual changes.
Evaluate a given expression string.
| expression | The expression string to evaluate |
| result | A reference to a string receiving the result. |
|
virtual |
Get the number of known constant sets.
Get the number of known constants for a given set.
| constantSetIndex | The index of the constant set. |
|
virtual |
Get the name of a given constant.
| constantSetIndex | The index of the constant set. |
| constantIndex | The index of the constant. |
|
virtual |
Get the value of a given constant.
| constantSetIndex | The index of the constant set. |
| constantIndex | The index of the constant. |
|
virtual |
Get the number of known variable sets.
Get the number of known variables for a given set.
| variableSetIndex | The index of the variable set. |
|
virtual |
Get the name of a given variable.
| variableSetIndex | The index of the variable set. |
| variableIndex | The index of the variable. |
|
virtual |
Get the value of a given variable.
| variableSetIndex | The index of the variable set. |
| variableIndex | The index of the variable. |
|
virtual |
Get the number of known function sets.
Get the number of known functions for a given set.
| functionSetIndex | The index of the function set. |
|
virtual |
Get the name of a given function.
| functionSetIndex | The index of the function set. |
| functionIndex | The index of the function. |
|
virtual |
Get the minimum number of arguments for a given function.
| functionSetIndex | The index of the function set. |
| functionIndex | The index of the function. |
|
virtual |
Get the maximum number of arguments for a given function.
| functionSetIndex | The index of the function set. |
| functionIndex | The index of the function. |
|
virtual |
Get the name of a given function's argument.
| functionSetIndex | The index of the function set. |
| functionIndex | The index of the function. |
| argumentIndex | The index of the argument. |