ExpressionCalculator class
Implements an expression calculator class.
Constructors
- ExpressionCalculator([String? expression])
- Constructs this class and assigns expression string.
Properties
- autoVariables ↔ bool
-
Gets the flag to turn on auto creation of variables for specified expression.
getter/setter pair
- defaultFunctions → IFunctionCollection
-
The list with default functions.
no setter
- defaultVariables → IVariableCollection
-
The list with default variables.
no setter
- expression ↔ String?
-
The expression string.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initialTokens
→ List<
ExpressionToken> -
The list of original expression tokens.
no setter
-
originalTokens
↔ List<
Token> -
getter/setter pair
-
resultTokens
→ List<
ExpressionToken> -
The list of processed expression tokens.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- variantOperations ↔ IVariantOperations
-
Gets the manager for operations on variant values.
getter/setter pair
Methods
-
clear(
) → void - Cleans up this calculator from all data.
-
createVariables(
IVariableCollection variables) → void - Populates the specified variables list with variables from parsed expression.
-
evaluate(
) → Future< Variant> - Evaluates this expression using default variables and functions. Returns the evaluation result.
-
evaluateWithVariables(
IVariableCollection variables) → Future< Variant> - Evaluates this expression using specified variables.
-
evaluateWithVariablesAndFunctions(
IVariableCollection? variables, IFunctionCollection? functions) → Future< Variant> - Evaluates this expression using specified variables and functions.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited