QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
#include <qgsexpression.h>
Public Member Functions | |
virtual | ~Node () |
virtual void | accept (Visitor &v) const =0 |
Support the visitor pattern. More... | |
virtual Node * | clone () const =0 |
Generate a clone of this node. More... | |
virtual QString | dump () const =0 |
Abstract virtual dump method. More... | |
virtual Q_DECL_DEPRECATED QVariant | eval (QgsExpression *parent, const QgsFeature *f) |
Abstract virtual eval method Errors are reported to the parent. More... | |
virtual QVariant | eval (QgsExpression *parent, const QgsExpressionContext *context) |
Abstract virtual eval method Errors are reported to the parent. More... | |
virtual bool | needsGeometry () const =0 |
Abstract virtual method which returns if the geometry is required to evaluate this expression. More... | |
virtual NodeType | nodeType () const =0 |
Abstract virtual that returns the type of this node. More... | |
virtual Q_DECL_DEPRECATED bool | prepare (QgsExpression *parent, const QgsFields &fields) |
Abstract virtual preparation method Errors are reported to the parent. More... | |
virtual bool | prepare (QgsExpression *parent, const QgsExpressionContext *context) |
Abstract virtual preparation method Errors are reported to the parent. More... | |
virtual QStringList | referencedColumns () const =0 |
Abstract virtual method which returns a list of columns required to evaluate this node. More... | |
Definition at line 922 of file qgsexpression.h.
|
inlinevirtual |
Definition at line 925 of file qgsexpression.h.
|
pure virtual |
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. |
Implemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.
|
pure virtual |
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.
Implemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.
|
pure virtual |
Abstract virtual dump method.
Implemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.
|
virtual |
Abstract virtual eval method Errors are reported to the parent.
Definition at line 5283 of file qgsexpression.cpp.
|
virtual |
Abstract virtual eval method Errors are reported to the parent.
Reimplemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.
Definition at line 5290 of file qgsexpression.cpp.
|
pure virtual |
Abstract virtual method which returns if the geometry is required to evaluate this expression.
This needs to call needsGeometry()
recursively on any child nodes.
Implemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.
|
pure virtual |
Abstract virtual that returns the type of this node.
Implemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.
|
virtual |
Abstract virtual preparation method Errors are reported to the parent.
Definition at line 5302 of file qgsexpression.cpp.
|
virtual |
Abstract virtual preparation method Errors are reported to the parent.
Reimplemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.
Definition at line 5308 of file qgsexpression.cpp.
|
pure virtual |
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.
Implemented in QgsExpression::NodeCondition, QgsExpression::NodeColumnRef, QgsExpression::NodeLiteral, QgsExpression::NodeFunction, QgsExpression::NodeInOperator, QgsExpression::NodeBinaryOperator, and QgsExpression::NodeUnaryOperator.