TFPBinaryOperation¶
Internally used class for binary operations with left and right operands
Declaration¶
Source position: fpexprpars.pp line 133
type
TFPBinaryOperation = class(TFPExprNode)
public
constructor Create;
destructor Destroy;
procedure InitAggregate;
procedure UpdateAggregate;
function HasAggregate : Boolean;
procedure Check;
property left: TFPExprNode; {r}
property Right: TFPExprNode; {r}
end;
Inheritance¶
Description¶
This TFPBinaryOperation is the base class for all binary operations in the expression parser. Binary operations take two operands (left and right) and perform some operation to produce a result. It extends TFPExprNode to provide the foundation for all two-operand operations.
The class manages the operand nodes and provides common functionality such as aggregate handling, validation, and resource management that is shared by all binary operations.
Derived classes implement specific operations such as arithmetic operations (+, -, *, /), comparison operations (=, <, >), and logical operations (and, or, xor). Each operation defines its own evaluation logic while leveraging the common binary 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.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| left read only | public | Left operand of the binary operation |
| Right read only | public | Right operand of the binary operation |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Check | public | Validate the binary operation for correctness |
| Create | public | Create binary operation with left and right operands |
| Destroy | public | Destroy binary operation and free resources |
| HasAggregate | public | Check if binary operation contains aggregates |
| InitAggregate | public | Initialize aggregate processing for binary operation |
| UpdateAggregate | public | Update aggregate calculations for binary operation |
See also¶
| Name | Description |
|---|---|
| TFPExprNode | Class for representing nodes in expression trees |