QGIS API Documentation  3.0.2-Girona (307d082)
Public Member Functions | List of all members
QgsScopedExpressionFunction Class Referenceabstract

Expression function for use within a QgsExpressionContextScope. More...

#include <qgsexpressioncontext.h>

Inheritance diagram for QgsScopedExpressionFunction:
Inheritance graph
[legend]

Public Member Functions

 QgsScopedExpressionFunction (const QString &fnname, int params, const QString &group, const QString &helpText=QString(), bool usesGeometry=false, const QSet< QString > &referencedColumns=QSet< QString >(), bool lazyEval=false, bool handlesNull=false, bool isContextual=true)
 Create a new QgsScopedExpressionFunction. More...
 
 QgsScopedExpressionFunction (const QString &fnname, const QgsExpressionFunction::ParameterList &params, const QString &group, const QString &helpText=QString(), bool usesGeometry=false, const QSet< QString > &referencedColumns=QSet< QString >(), bool lazyEval=false, bool handlesNull=false, bool isContextual=true)
 Create a new QgsScopedExpressionFunction using named parameters. More...
 
virtual QgsScopedExpressionFunctionclone () const =0
 Returns a clone of the function. More...
 
QVariant func (const QVariantList &values, const QgsExpressionContext *context, QgsExpression *parent, const QgsExpressionNodeFunction *node) override=0
 
bool isStatic (const QgsExpressionNodeFunction *node, QgsExpression *parent, const QgsExpressionContext *context) const override
 
QSet< QString > referencedColumns (const QgsExpressionNodeFunction *node) const override
 
bool usesGeometry (const QgsExpressionNodeFunction *node) const override
 

Detailed Description

Expression function for use within a QgsExpressionContextScope.

This differs from a standard QgsExpression::Function in that it requires an implemented clone() method.

Since
QGIS 2.12

Definition at line 55 of file qgsexpressioncontext.h.

Constructor & Destructor Documentation

◆ QgsScopedExpressionFunction() [1/2]

QgsScopedExpressionFunction::QgsScopedExpressionFunction ( const QString &  fnname,
int  params,
const QString &  group,
const QString &  helpText = QString(),
bool  usesGeometry = false,
const QSet< QString > &  referencedColumns = QSet<QString>(),
bool  lazyEval = false,
bool  handlesNull = false,
bool  isContextual = true 
)
inline

Create a new QgsScopedExpressionFunction.

Since
QGIS 2.12

Definition at line 64 of file qgsexpressioncontext.h.

◆ QgsScopedExpressionFunction() [2/2]

QgsScopedExpressionFunction::QgsScopedExpressionFunction ( const QString &  fnname,
const QgsExpressionFunction::ParameterList &  params,
const QString &  group,
const QString &  helpText = QString(),
bool  usesGeometry = false,
const QSet< QString > &  referencedColumns = QSet<QString>(),
bool  lazyEval = false,
bool  handlesNull = false,
bool  isContextual = true 
)
inline

Create a new QgsScopedExpressionFunction using named parameters.

Since
QGIS 3.0

Definition at line 83 of file qgsexpressioncontext.h.

Member Function Documentation

◆ clone()

virtual QgsScopedExpressionFunction* QgsScopedExpressionFunction::clone ( ) const
pure virtual

Returns a clone of the function.

◆ func()

QVariant QgsScopedExpressionFunction::func ( const QVariantList &  values,
const QgsExpressionContext context,
QgsExpression *  parent,
const QgsExpressionNodeFunction *  node 
)
overridepure virtual

◆ isStatic()

bool QgsScopedExpressionFunction::isStatic ( const QgsExpressionNodeFunction *  node,
QgsExpression *  parent,
const QgsExpressionContext context 
) const
override

Definition at line 1251 of file qgsexpressioncontext.cpp.

◆ referencedColumns()

QSet< QString > QgsScopedExpressionFunction::referencedColumns ( const QgsExpressionNodeFunction *  node) const
override

Definition at line 1245 of file qgsexpressioncontext.cpp.

◆ usesGeometry()

bool QgsScopedExpressionFunction::usesGeometry ( const QgsExpressionNodeFunction *  node) const
override

Definition at line 1239 of file qgsexpressioncontext.cpp.


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