QGIS API Documentation  2.99.0-Master (314842d)
Public Member Functions | List of all members
QgsExpression::NodeBinaryOperator Class Reference

#include <qgsexpression.h>

Inheritance diagram for QgsExpression::NodeBinaryOperator:
Inheritance graph
[legend]

Public Member Functions

 NodeBinaryOperator (BinaryOperator op, Node *opLeft, Node *opRight)
 
 ~NodeBinaryOperator ()
 
virtual Nodeclone () const override
 Generate a clone of this node. More...
 
virtual QString dump () const override
 Abstract virtual dump method. More...
 
virtual QVariant eval (QgsExpression *parent, const QgsExpressionContext *context) override
 Abstract virtual eval method Errors are reported to the parent. More...
 
bool leftAssociative () const
 
virtual bool needsGeometry () const override
 Abstract virtual method which returns if the geometry is required to evaluate this expression. More...
 
virtual NodeType nodeType () const override
 Abstract virtual that returns the type of this node. More...
 
BinaryOperator op () const
 
NodeopLeft () const
 
NodeopRight () const
 
int precedence () const
 
virtual bool prepare (QgsExpression *parent, const QgsExpressionContext *context) override
 Abstract virtual preparation method Errors are reported to the parent. More...
 
virtual QSet< QString > referencedColumns () const override
 Abstract virtual method which returns a list of columns required to evaluate this node. More...
 
virtual QSet< QString > referencedVariables () const override
 Return a list of all variables which are used in this expression. More...
 
- Public Member Functions inherited from QgsExpression::Node
virtual ~Node ()=default
 

Detailed Description

Definition at line 1019 of file qgsexpression.h.

Constructor & Destructor Documentation

◆ NodeBinaryOperator()

QgsExpression::NodeBinaryOperator::NodeBinaryOperator ( BinaryOperator  op,
Node opLeft,
Node opRight 
)
inline

Definition at line 1022 of file qgsexpression.h.

◆ ~NodeBinaryOperator()

QgsExpression::NodeBinaryOperator::~NodeBinaryOperator ( )
inline

Definition at line 1027 of file qgsexpression.h.

Member Function Documentation

◆ clone()

QgsExpression::Node * QgsExpression::NodeBinaryOperator::clone ( ) const
overridevirtual

Generate a clone of this node.

Make sure that the clone does not contain any information which is generated in prepare and context related. Ownership is transferred to the caller.

Returns
a deep copy of this node.

Implements QgsExpression::Node.

Definition at line 5182 of file qgsexpression.cpp.

◆ dump()

QString QgsExpression::NodeBinaryOperator::dump ( ) const
overridevirtual

Abstract virtual dump method.

Returns
An expression which represents this node as string

Implements QgsExpression::Node.

Definition at line 5136 of file qgsexpression.cpp.

◆ eval()

QVariant QgsExpression::NodeBinaryOperator::eval ( QgsExpression parent,
const QgsExpressionContext context 
)
overridevirtual

Abstract virtual eval method Errors are reported to the parent.

Note
added in QGIS 2.12

Implements QgsExpression::Node.

Definition at line 4692 of file qgsexpression.cpp.

◆ leftAssociative()

bool QgsExpression::NodeBinaryOperator::leftAssociative ( ) const

Definition at line 5100 of file qgsexpression.cpp.

◆ needsGeometry()

bool QgsExpression::NodeBinaryOperator::needsGeometry ( ) const
overridevirtual

Abstract virtual method which returns if the geometry is required to evaluate this expression.

This needs to call needsGeometry() recursively on any child nodes.

Returns
true if a geometry is required to evaluate this expression

Implements QgsExpression::Node.

Definition at line 5177 of file qgsexpression.cpp.

◆ nodeType()

virtual NodeType QgsExpression::NodeBinaryOperator::nodeType ( ) const
inlineoverridevirtual

Abstract virtual that returns the type of this node.

Returns
The type of this node

Implements QgsExpression::Node.

Definition at line 1033 of file qgsexpression.h.

◆ op()

BinaryOperator QgsExpression::NodeBinaryOperator::op ( ) const
inline

Definition at line 1029 of file qgsexpression.h.

◆ opLeft()

Node* QgsExpression::NodeBinaryOperator::opLeft ( ) const
inline

Definition at line 1030 of file qgsexpression.h.

◆ opRight()

Node* QgsExpression::NodeBinaryOperator::opRight ( ) const
inline

Definition at line 1031 of file qgsexpression.h.

◆ precedence()

int QgsExpression::NodeBinaryOperator::precedence ( ) const

Definition at line 5054 of file qgsexpression.cpp.

◆ prepare()

bool QgsExpression::NodeBinaryOperator::prepare ( QgsExpression parent,
const QgsExpressionContext context 
)
overridevirtual

Abstract virtual preparation method Errors are reported to the parent.

Note
added in QGIS 2.12

Implements QgsExpression::Node.

Definition at line 5047 of file qgsexpression.cpp.

◆ referencedColumns()

QSet< QString > QgsExpression::NodeBinaryOperator::referencedColumns ( ) const
overridevirtual

Abstract virtual method which returns a list of columns required to evaluate this node.

When reimplementing this, you need to return any column that is required to evaluate this node and in addition recursively collect all the columns required to evaluate child nodes.

Returns
A list of columns required to evaluate this expression

Implements QgsExpression::Node.

Definition at line 5167 of file qgsexpression.cpp.

◆ referencedVariables()

QSet< QString > QgsExpression::NodeBinaryOperator::referencedVariables ( ) const
overridevirtual

Return a list of all variables which are used in this expression.

Implements QgsExpression::Node.

Definition at line 5172 of file qgsexpression.cpp.


The documentation for this class was generated from the following files: