Skip to content

TFPExprIdentifierDef

Class for defining identifiers in expressions

Declaration

Source position: fpexprpars.pp line 499

type

  TFPExprIdentifierDef = class(TCollectionItem)
  public
    function ArgumentCount : Integer;
    procedure Assign;
    function EventBasedVariable : Boolean;
    property AsFloat: TExprFloat; {rw}
    property AsCurrency: Currency; {rw}
    property AsInteger: Int64; {rw}
    property AsString: AnsiString; {rw}
    property AsBoolean: Boolean; {rw}
    property AsDateTime: TDateTime; {rw}
    property OnGetFunctionValueCallBack: TFPExprFunctionCallBack; {rw}
    property OnGetVariableValueCallBack: TFPExprVariableCallBack; {rw}
  published
    property IdentifierType: TIdentifierType; {rw}
    property Name: ShortString; {rw}
    property Value: AnsiString; {rw}
    property ParameterTypes: AnsiString; {rw}
    property ResultType: TResultType; {rw}
    property OnGetFunctionValue: TFPExprFunctionEvent; {rw}
    property OnGetVariableValue: TFPExprVariableEvent; {rw}
    property NodeType: TFPExprFunctionClass; {rw}
    property VariableArgumentCount: Boolean; {rw}
  end;

Description

The TFPExprIdentifierDef class defines an identifier (variable or function) that can be used in expressions. It holds the name, type, and implementation details for identifiers, allowing the expression parser to resolve and evaluate them during expression processing.

Properties

Member Visibility Description
AsBoolean public Get identifier value as boolean
AsCurrency public Get identifier value as currency
AsDateTime public Get identifier value as datetime
AsFloat public Get identifier value as float
AsInteger public Get identifier value as integer
AsString public Get identifier value as string
IdentifierType published The type of this identifier
Name published The name of the identifier
NodeType published The node type for this identifier
ParameterTypes published The parameter types for function identifiers
ResultType published The result type of the identifier
Value published The value of the identifier
VariableArgumentCount published
See all Properties

Methods

Member Visibility Description
ArgumentCount public Get the number of arguments for function identifier
Assign public Assign values from another identifier definition
EventBasedVariable public Check if identifier is an event-based variable
See all Methods

Events

Member Visibility Description
OnGetFunctionValue published Event for function value evaluation
OnGetFunctionValueCallBack public Callback property for function value evaluation
OnGetVariableValue published Event for variable value evaluation
OnGetVariableValueCallBack public Callback property for variable value evaluation
See all Events