public class TMtxFunctionEvaluator : TMtxComponent
Function evaluator.
The component offers a simple interface to evaluate expressions.
The expressions are assigned to the Dew.Math.TMtxFunctionEvaluator.Context property and are compiled, prepared for execution and stored in the Dew.Math.TMtxFunctionEvaluator.Expressions property. The expression parser can handle real and complex numbers, logical variables, variable assignments and more. The expression engine is fully customizable supporting user defined variables and functions.
To evalute the expression(s) in the Dew.Math.TMtxFunctionEvaluator.Context property again, set the Dew.Math.TMtxFunctionEvaluator.Context property again or call the Dew.Math.TMtxFunctionEvaluator.Recalculate method. In either case the expression will not be parsed again, just evaluated once more.
Properties
| Name | Type | Description |
|---|---|---|
| BlockAssign | Boolean | Block streaming of specific properties when storing only a "template". |
| Context | TExprContext | Expression context. |
| EditorActive | Boolean | Returns True, if the component editor is displayed. |
| Expressions | TMtxExpression | Returns the compiled expressions from the Dew.Math.TMtxFunctionEvaluator.Context class. |
| Reference | TReferenceList | Stores a list of components that have to be notified, when this component is destroyed. |
| ResultAsString | String | Returns the result of evaluation as string. |
Methods
| Name | Description |
|---|---|
| AllowStreaming | Returns the negatated value of BlockAssign. |
| Assign | Assign values of all published properties from Source. |
| AssignTemplate | Assign values of "template-like" published properties from Source. |
| EditorClass | To be overriden in descendanr classses. |
| LoadFromStream | Load the component from Src stream. |
| LoadTemplateFromFile | Load a template from file. |
| LoadTemplateFromStream | Load a template from stream. |
| Recalculate | Re-evaluates expression in Context. |
| Reset | Reset is called after loading the data from stream or file. |
| SaveTemplateToFile | Save template to file. |
| SaveTemplateToStream | Save template to stream. |
| SaveToStream | Save the component to Dst stream. |