Evaluator for parameter expressions written in daslang.
More...
#include <ExpressionEngine.h>
Evaluator for parameter expressions written in daslang.
A bare expression such as "5 + 5" is wrapped in a function, compiled through DasRuntime, and run to produce a parameter value.
- Note
- Compiled expressions are cached so repeated evaluation during cooking stays cheap.
◆ evalFloat()
| bool enzo::expr::ExpressionEngine::evalFloat |
( |
const String & | expression, |
|
|
const ExpressionContext * | context, |
|
|
floatT & | result, |
|
|
String & | error ) |
Evaluates an expression and returns its result as a float.
- Parameters
-
| context | The world the expression reads, e.g. for prm(), may be null. |
- Returns
- True on success, false when the expression fails to compile or run.
◆ evalInt()
| bool enzo::expr::ExpressionEngine::evalInt |
( |
const String & | expression, |
|
|
const ExpressionContext * | context, |
|
|
intT & | result, |
|
|
String & | error ) |
Evaluates an expression and returns its result as an integer.
- Parameters
-
| context | The world the expression reads, e.g. for prm(), may be null. |
- Returns
- True on success, false when the expression fails to compile or run.
◆ evalString()
| bool enzo::expr::ExpressionEngine::evalString |
( |
const String & | expression, |
|
|
const ExpressionContext * | context, |
|
|
String & | result, |
|
|
String & | error ) |
Evaluates an expression and returns its result as a string.
- Parameters
-
| context | The world the expression reads, e.g. for prm(), may be null. |
- Returns
- True on success, false when the expression fails to compile or run.
The documentation for this class was generated from the following files: