Class TBrookMathExpression
Unit
Declaration
type TBrookMathExpression = class(TBrookHandledComponent)
Description
Mathematical expression evaluator.
Hierarchy
- TObject
- TPersistent
- TComponent
- TBrookHandledComponent
- TBrookMathExpression
Overview
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
procedure Open; |
![]() |
procedure Close; |
![]() |
function Compile(const AExpression: string; out AError: TBrookMathExpressionError): Boolean; overload; virtual; |
![]() |
function Compile(const AExpression: string): Boolean; overload; virtual; |
![]() |
procedure Clear; virtual; |
![]() |
function Evaluate: Double; virtual; |
![]() |
function GetVariable(const AName: string): Double; virtual; |
![]() |
procedure SetVariable(const AName: string; const AValue: Double); virtual; |
Properties
![]() |
property Compiled: Boolean read FCompiled; |
![]() |
property Variables[constAName:string]: Double read GetVariable
write SetVariable; |
![]() |
property Active: Boolean read FActive write SetActive stored IsActiveStored; |
![]() |
property Expression: string read FExpression write SetExpression; |
![]() |
property Extensions: TStringList read FExtensions write SetExtensions; |
![]() |
property OnExtension: TBrookMathExpressionExtensionEvent read FOnExtension
write FOnExtension; |
![]() |
property OnError: TBrookMathExpressionErrorEvent read FOnError
write FOnError; |
![]() |
property OnActivate: TNotifyEvent read FOnActivate write FOnActivate; |
![]() |
property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate; |
Description
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
Creates an instance of Parameters
|
![]() |
destructor Destroy; override; |
Destroys an instance of |
![]() |
procedure Open; |
Opens the math expression. |
![]() |
procedure Close; |
Closes the math expression. |
![]() |
function Compile(const AExpression: string; out AError: TBrookMathExpressionError): Boolean; overload; virtual; |
Compiles a mathematical expression returning the errors if it does not succeed. Parameters
Returns
|
![]() |
function Compile(const AExpression: string): Boolean; overload; virtual; |
Compiles a mathematical expression indicating if it succeeds. Parameters
Returns
|
![]() |
procedure Clear; virtual; |
Clears a mathematical expression instance. |
![]() |
function Evaluate: Double; virtual; |
Evaluates a compiled mathematical expression. ReturnsEvaluated mathematical expression |
![]() |
function GetVariable(const AName: string): Double; virtual; |
Gets the value of a declared variable. Parameters
ReturnsValue of a declared variable. |
![]() |
procedure SetVariable(const AName: string; const AValue: Double); virtual; |
Sets a variable to the mathematical expression. Parameters
|
Properties
![]() |
property Compiled: Boolean read FCompiled; |
Indicates if a mathematical expression has been successfully |
![]() |
property Variables[constAName:string]: Double read GetVariable
write SetVariable; |
Gets or sets a mathematical expression variable. |
![]() |
property Active: Boolean read FActive write SetActive stored IsActiveStored; |
Activates the mathematical expression evaluator. |
![]() |
property Expression: string read FExpression write SetExpression; |
Declares the mathematical |
![]() |
property Extensions: TStringList read FExtensions write SetExtensions; |
Declares the list of mathematical expression |
![]() |
property OnExtension: TBrookMathExpressionExtensionEvent read FOnExtension
write FOnExtension; |
Event triggered when an extensions is called in the mathematical expression. |
![]() |
property OnError: TBrookMathExpressionErrorEvent read FOnError
write FOnError; |
Event triggered when a mathematical expression compilation fails. |
![]() |
property OnActivate: TNotifyEvent read FOnActivate write FOnActivate; |
Event triggered when the math expression component is enabled. |
![]() |
property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate; |
Event triggered when the math expression component is disabled. |
Generated by PasDoc 0.16.0.