QGIS API Documentation  2.99.0-Master (8ec3eaf)
Public Member Functions | Static Public Member Functions | List of all members
QgsExpression::NodeFunction Class Reference

#include <qgsexpression.h>

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

Public Member Functions

 NodeFunction (int fnIndex, NodeList *args)
 
virtual ~NodeFunction ()
 
NodeListargs () const
 
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...
 
int fnIndex () 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...
 
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 ()
 

Static Public Member Functions

static bool validateParams (int fnIndex, NodeList *args, QString &error)
 Tests whether the provided argument list is valid for the matching function. More...
 

Detailed Description

Definition at line 1097 of file qgsexpression.h.

Constructor & Destructor Documentation

§ NodeFunction()

QgsExpression::NodeFunction::NodeFunction ( int  fnIndex,
QgsExpression::NodeList args 
)

Definition at line 5224 of file qgsexpression.cpp.

§ ~NodeFunction()

virtual QgsExpression::NodeFunction::~NodeFunction ( )
inlinevirtual

Definition at line 1102 of file qgsexpression.h.

Member Function Documentation

§ args()

NodeList* QgsExpression::NodeFunction::args ( ) const
inline

Definition at line 1105 of file qgsexpression.h.

§ clone()

QgsExpression::Node * QgsExpression::NodeFunction::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 5347 of file qgsexpression.cpp.

§ dump()

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

Abstract virtual dump method.

Returns
An expression which represents this node as string

Implements QgsExpression::Node.

Definition at line 5279 of file qgsexpression.cpp.

§ eval()

QVariant QgsExpression::NodeFunction::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 5188 of file qgsexpression.cpp.

§ fnIndex()

int QgsExpression::NodeFunction::fnIndex ( ) const
inline

Definition at line 1104 of file qgsexpression.h.

§ needsGeometry()

bool QgsExpression::NodeFunction::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 5336 of file qgsexpression.cpp.

§ nodeType()

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

Abstract virtual that returns the type of this node.

Returns
The type of this node

Implements QgsExpression::Node.

Definition at line 1107 of file qgsexpression.h.

§ prepare()

bool QgsExpression::NodeFunction::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 5264 of file qgsexpression.cpp.

§ referencedColumns()

QSet< QString > QgsExpression::NodeFunction::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 5288 of file qgsexpression.cpp.

§ referencedVariables()

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

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

Implements QgsExpression::Node.

Definition at line 5307 of file qgsexpression.cpp.

§ validateParams()

bool QgsExpression::NodeFunction::validateParams ( int  fnIndex,
QgsExpression::NodeList args,
QString &  error 
)
static

Tests whether the provided argument list is valid for the matching function.

Definition at line 5352 of file qgsexpression.cpp.


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