TMtxFunctionEvaluator Class

Header: Dew.Math/MtxParseExpr.h · Cross-compiler
tObjectTMtxComponentTMtxFunctionEvaluator

class TMtxFunctionEvaluator : public TMtxComponent;

Function evaluator.

The component offers a simple interface to evaluate expressions.

The expressions are assigned to the TMtxFunctionEvaluator::Context property and are compiled, prepared for execution and stored in the 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 TMtxFunctionEvaluator::Context property again, set the TMtxFunctionEvaluator::Context property again or call the TMtxFunctionEvaluator::Recalculate method. In either case the expression will not be parsed again, just evaluated once more.

Constructors

NameDescription
TMtxFunctionEvaluator (2)

Destructors

NameDescription
~TMtxFunctionEvaluator

Properties

NameTypeDescription
BlockAssignboolBlock streaming of specific properties when storing only a "template".
ContextTExprContext*Expression context.
EditorActiveboolReturns True, if the component editor is displayed.
ExpressionsTMtxExpression*Returns the compiled expressions from the TMtxFunctionEvaluator::Context class.
NameDewString
ReferenceTReferenceList*Stores a list of components that have to be notified, when this component is destroyed.
ResultAsStringDewStringReturns the result of evaluation as string.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
EditorClassTo be overriden in descendanr classses.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
RecalculateRe-evaluates expression in Context.
ReferenceRemoved
ResetReset is called after loading the data from stream or file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.

Fields

NameTypeDescription
Tagintptr_t