Unit 'fpexprpars' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPUnaryOperator

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internally used class for unary operations with single operand

Declaration

Source position: fpexprpars.pp line 365

type TFPUnaryOperator = class(TFPExprNode)

public

  constructor Create();

  

Create unary operator with operand

  destructor Destroy; override;

  

Destroy unary operator and free resources

  procedure InitAggregate; override;

  

Initialize aggregate processing for unary operator

  procedure UpdateAggregate; override;

  

Update aggregate calculations for unary operator

  function HasAggregate; override;

  

Check if unary operator contains aggregates

  procedure Check; override;

  

Validate the unary operator for correctness

  property Operand: TFPExprNode; [r]

  

The operand expression of the unary operator

end;

Inheritance

TFPUnaryOperator

  

Internally used class for unary operations with single operand

|

TFPExprNode

  

Class for representing nodes in expression trees

|

TObject

Description

TFPUnaryOperator is the base class for all unary operations in the expression parser. Unary operations take a single operand and perform some operation to produce a result. It extends TFPExprNode to provide the foundation for all single-operand operations.

The class manages the operand node and provides common functionality such as aggregate handling, validation, and resource management that is shared by all unary operations.

Derived classes implement specific operations such as logical NOT, numeric negation, and type conversions. Each operation defines its own evaluation logic while leveraging the common unary operation infrastructure.

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.

See also

TFPExprNode

  

Class for representing nodes in expression trees


Documentation generated on: Dec 15 2025