QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
#include <qgsexpression.h>
Public Member Functions | |
NodeBinaryOperator (BinaryOperator op, Node *opLeft, Node *opRight) | |
~NodeBinaryOperator () | |
virtual void | accept (Visitor &v) const override |
Support the visitor pattern. More... | |
virtual Node * | clone () 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 |
Node * | opLeft () const |
Node * | opRight () 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 QStringList | referencedColumns () const override |
Abstract virtual method which returns a list of columns required to evaluate this node. More... | |
Public Member Functions inherited from QgsExpression::Node | |
virtual | ~Node () |
virtual Q_DECL_DEPRECATED QVariant | eval (QgsExpression *parent, const QgsFeature *f) |
Abstract virtual eval method Errors are reported to the parent. More... | |
virtual Q_DECL_DEPRECATED bool | prepare (QgsExpression *parent, const QgsFields &fields) |
Abstract virtual preparation method Errors are reported to the parent. More... | |
Protected Member Functions | |
bool | compare (double diff) |
QDateTime | computeDateTimeFromInterval (const QDateTime &d, QgsInterval *i) |
Computes the result date time calculation from a start datetime and an interval. More... | |
double | computeDouble (double x, double y) |
int | computeInt (int x, int y) |
Protected Attributes | |
BinaryOperator | mOp |
Node * | mOpLeft |
Node * | mOpRight |
Definition at line 1121 of file qgsexpression.h.
|
inline |
Definition at line 1124 of file qgsexpression.h.
|
inline |
Definition at line 1129 of file qgsexpression.h.
|
inlineoverridevirtual |
Support the visitor pattern.
For any implementation this should look like
C++:
v.visit( *this );
Python:
v.visit( self)
v | A visitor that visits this node. |
Implements QgsExpression::Node.
Definition at line 1142 of file qgsexpression.h.
|
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.
Implements QgsExpression::Node.
Definition at line 4608 of file qgsexpression.cpp.
|
protected |
Definition at line 4412 of file qgsexpression.cpp.
|
protected |
Computes the result date time calculation from a start datetime and an interval.
d | start datetime |
i | interval to add or subtract (depending on mOp) |
Definition at line 4454 of file qgsexpression.cpp.
|
protected |
Definition at line 4468 of file qgsexpression.cpp.
|
protected |
Definition at line 4434 of file qgsexpression.cpp.
|
overridevirtual |
Abstract virtual dump method.
Implements QgsExpression::Node.
Definition at line 4577 of file qgsexpression.cpp.
|
overridevirtual |
Abstract virtual eval method Errors are reported to the parent.
Reimplemented from QgsExpression::Node.
Definition at line 4133 of file qgsexpression.cpp.
bool QgsExpression::NodeBinaryOperator::leftAssociative | ( | ) | const |
Definition at line 4541 of file qgsexpression.cpp.
|
inlineoverridevirtual |
Abstract virtual method which returns if the geometry is required to evaluate this expression.
This needs to call needsGeometry()
recursively on any child nodes.
Implements QgsExpression::Node.
Definition at line 1141 of file qgsexpression.h.
|
inlineoverridevirtual |
Abstract virtual that returns the type of this node.
Implements QgsExpression::Node.
Definition at line 1135 of file qgsexpression.h.
|
inline |
Definition at line 1131 of file qgsexpression.h.
|
inline |
Definition at line 1132 of file qgsexpression.h.
|
inline |
Definition at line 1133 of file qgsexpression.h.
int QgsExpression::NodeBinaryOperator::precedence | ( | ) | const |
Definition at line 4495 of file qgsexpression.cpp.
|
overridevirtual |
Abstract virtual preparation method Errors are reported to the parent.
Reimplemented from QgsExpression::Node.
Definition at line 4488 of file qgsexpression.cpp.
|
inlineoverridevirtual |
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.
Implements QgsExpression::Node.
Definition at line 1140 of file qgsexpression.h.
|
protected |
Definition at line 1159 of file qgsexpression.h.
|
protected |
Definition at line 1160 of file qgsexpression.h.
|
protected |
Definition at line 1161 of file qgsexpression.h.