Skip to content

TFPExprFunction

Internally used class for representing function calls in expression trees

Declaration

Source position: fpexprpars.pp line 625

type

  TFPExprFunction = class(TFPExprIdentifierNode)
  public
    procedure Check;
    constructor CreateFunction;
    destructor Destroy;
    procedure InitAggregate;
    procedure UpdateAggregate;
    function HasAggregate : Boolean;
    property ArgumentNodes: TExprArgumentArray; {r}
    property ArgumentParams: TExprParameterArray; {r}
    function AsString : AnsiString;
  end;

Description

The TFPExprFunction class represents a function call node in the expression tree. It serves as the base class for all function implementations that can be called from within expressions, including mathematical functions, string functions, date/time functions, and user-defined functions.

The class manages function parameters, validates argument types and counts, and provides the framework for function evaluation. It handles the common aspects of function calls such as parameter management and type checking.

Derived classes implement specific functions by overriding the evaluation methods and providing function-specific logic. The class supports functions with varying numbers of parameters and different return types.

This class is used internally by the TFPExpressionParser class to construct an AST (Abstract Syntax Tree). There is normally no need for you to use or instantiate this class directly.

Properties

Member Visibility Description
ArgumentNodes read only public The argument nodes for the function
ArgumentParams read only public The argument parameters for the function
See all Properties

Methods

Member Visibility Description
AsString public Get string representation of function expression
Check public Validate the function expression
CreateFunction public Create function with identifier and arguments
Destroy public Destroy function expression and free resources
HasAggregate public Check if function contains aggregates
InitAggregate public Initialize aggregate processing for function
UpdateAggregate public Update aggregate calculations for function
See all Methods

See also

Name Description
TFPExprNode Class for representing nodes in expression trees