QGIS API Documentation  3.37.0-Master (a5b4d9743e8)
Public Member Functions | Protected Attributes | List of all members
QgsSQLStatement::NodeBinaryOperator Class Reference

Binary logical/arithmetical operator (AND, OR, =, +, ...) More...

#include <qgssqlstatement.h>

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

Public Member Functions

 NodeBinaryOperator (QgsSQLStatement::BinaryOperator op, QgsSQLStatement::Node *opLeft, QgsSQLStatement::Node *opRight)
 Constructor. More...
 
 ~NodeBinaryOperator () override
 
void accept (QgsSQLStatement::Visitor &v) const override
 Support the visitor pattern. More...
 
QgsSQLStatement::Nodeclone () const override
 Generate a clone of this node. More...
 
QString dump () const override
 Abstract virtual dump method. More...
 
bool leftAssociative () const
 Is left associative ? More...
 
QgsSQLStatement::NodeType nodeType () const override
 Abstract virtual that returns the type of this node. More...
 
QgsSQLStatement::BinaryOperator op () const
 Operator. More...
 
QgsSQLStatement::NodeopLeft () const
 Left operand. More...
 
QgsSQLStatement::NodeopRight () const
 Right operand. More...
 
int precedence () const
 Precedence. More...
 
- Public Member Functions inherited from QgsSQLStatement::Node
virtual ~Node ()=default
 

Protected Attributes

BinaryOperator mOp
 
NodemOpLeft = nullptr
 
NodemOpRight = nullptr
 

Detailed Description

Binary logical/arithmetical operator (AND, OR, =, +, ...)

Definition at line 356 of file qgssqlstatement.h.

Constructor & Destructor Documentation

◆ NodeBinaryOperator()

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

Constructor.

Definition at line 360 of file qgssqlstatement.h.

◆ ~NodeBinaryOperator()

QgsSQLStatement::NodeBinaryOperator::~NodeBinaryOperator ( )
inlineoverride

Definition at line 365 of file qgssqlstatement.h.

Member Function Documentation

◆ accept()

void QgsSQLStatement::NodeBinaryOperator::accept ( QgsSQLStatement::Visitor v) const
inlineoverridevirtual

Support the visitor pattern.

For any implementation this should look like

C++:

v.visit( *this );

Python:

v.visit( self)
Parameters
vA visitor that visits this node.

Implements QgsSQLStatement::Node.

Definition at line 379 of file qgssqlstatement.h.

◆ clone()

QgsSQLStatement::Node * QgsSQLStatement::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 QgsSQLStatement::Node.

Definition at line 440 of file qgssqlstatement.cpp.

◆ dump()

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

Abstract virtual dump method.

Returns
A statement which represents this node as string

Implements QgsSQLStatement::Node.

Definition at line 409 of file qgssqlstatement.cpp.

◆ leftAssociative()

bool QgsSQLStatement::NodeBinaryOperator::leftAssociative ( ) const

Is left associative ?

Definition at line 374 of file qgssqlstatement.cpp.

◆ nodeType()

QgsSQLStatement::NodeType QgsSQLStatement::NodeBinaryOperator::nodeType ( ) const
inlineoverridevirtual

Abstract virtual that returns the type of this node.

Returns
The type of this node

Implements QgsSQLStatement::Node.

Definition at line 376 of file qgssqlstatement.h.

◆ op()

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

Operator.

Definition at line 368 of file qgssqlstatement.h.

◆ opLeft()

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

Left operand.

Definition at line 371 of file qgssqlstatement.h.

◆ opRight()

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

Right operand.

Definition at line 374 of file qgssqlstatement.h.

◆ precedence()

int QgsSQLStatement::NodeBinaryOperator::precedence ( ) const

Precedence.

Definition at line 329 of file qgssqlstatement.cpp.

Member Data Documentation

◆ mOp

BinaryOperator QgsSQLStatement::NodeBinaryOperator::mOp
protected

Definition at line 390 of file qgssqlstatement.h.

◆ mOpLeft

Node* QgsSQLStatement::NodeBinaryOperator::mOpLeft = nullptr
protected

Definition at line 391 of file qgssqlstatement.h.

◆ mOpRight

Node* QgsSQLStatement::NodeBinaryOperator::mOpRight = nullptr
protected

Definition at line 392 of file qgssqlstatement.h.


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