Sign in Join
FPDoc Onlineexperiment

TFPUnaryOperator class

In unit fpExprPars

Internally used class for unary operations with single operand

Declaration

pascal
TFPUnaryOperator = class(TFPExprNode)

Inheritance

  1. TFPUnaryOperator
  2. TFPExprNode
  3. TObject

Descends from it: TFPConvertNode TFPNegateOperation TFPNotNode

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

Properties

OperandpublicThe operand expression of the unary operator

Methods

CreatepublicCreate unary operator with operand
DestroypublicDestroy unary operator and free resources
InitAggregatepublicInitialize aggregate processing for unary operator
UpdateAggregatepublicUpdate aggregate calculations for unary operator
HasAggregatepublicCheck if unary operator contains aggregates
CheckpublicValidate the unary operator for correctness

Inherited

From TFPExprNode (6)

AsString CheckNodeType GetNodeValue IsAggregate NodeType NodeValue

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.