QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
QgsExpression::Function Class Reference

A abstract base class for defining QgsExpression functions. More...

#include <qgsexpression.h>

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

Public Member Functions

 Function (QString fnname, int params, QString group, QString helpText=QString(), bool usesGeometry=false, QStringList referencedColumns=QStringList(), bool lazyEval=false)
virtual QVariant func (const QVariantList &values, const QgsFeature *f, QgsExpression *parent)=0
QString group ()
 The group the function belongs to.
QString helptext ()
 The help text for the function.
bool lazyEval ()
 True if this function should use lazy evaluation.
QString name ()
 The name of the function.
bool operator== (const Function &other) const
int params ()
 The number of parameters this function takes.
virtual QStringList referencedColumns () const
bool usesgeometry ()
 Does this function use a geometry object.

Detailed Description

A abstract base class for defining QgsExpression functions.

Definition at line 282 of file qgsexpression.h.

Constructor & Destructor Documentation

QgsExpression::Function::Function ( QString  fnname,
int  params,
QString  group,
QString  helpText = QString(),
bool  usesGeometry = false,
QStringList  referencedColumns = QStringList(),
bool  lazyEval = false 
)
inline

Definition at line 285 of file qgsexpression.h.

Member Function Documentation

virtual QVariant QgsExpression::Function::func ( const QVariantList &  values,
const QgsFeature f,
QgsExpression parent 
)
pure virtual
QString QgsExpression::Function::group ( )
inline

The group the function belongs to.

Definition at line 302 of file qgsexpression.h.

QString QgsExpression::Function::helptext ( )
inline

The help text for the function.

Definition at line 304 of file qgsexpression.h.

bool QgsExpression::Function::lazyEval ( )
inline

True if this function should use lazy evaluation.

Lazy evaluation functions take QgsExpression::Node objects rather than the node results when called. You can use node->eval(parent, feature) to evaluate the node and return the result Functions are non lazy default and will be given the node return value when called

Definition at line 297 of file qgsexpression.h.

QString QgsExpression::Function::name ( )
inline

The name of the function.

Definition at line 288 of file qgsexpression.h.

bool QgsExpression::Function::operator== ( const Function other) const
inline

Definition at line 308 of file qgsexpression.h.

int QgsExpression::Function::params ( )
inline

The number of parameters this function takes.

Definition at line 290 of file qgsexpression.h.

virtual QStringList QgsExpression::Function::referencedColumns ( ) const
inlinevirtual

Definition at line 299 of file qgsexpression.h.

bool QgsExpression::Function::usesgeometry ( )
inline

Does this function use a geometry object.

Definition at line 292 of file qgsexpression.h.


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