QGIS API Documentation  2.11.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
QgsExpression::NodeColumnRef Class Reference

#include <qgsexpression.h>

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

Public Member Functions

 NodeColumnRef (const QString &name)
 
virtual void accept (Visitor &v) const override
 Support the visitor pattern. 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...
 
QString name () 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 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 Attributes

int mIndex
 
QString mName
 

Detailed Description

Definition at line 809 of file qgsexpression.h.

Constructor & Destructor Documentation

QgsExpression::NodeColumnRef::NodeColumnRef ( const QString name)
inline

Definition at line 812 of file qgsexpression.h.

Member Function Documentation

virtual void QgsExpression::NodeColumnRef::accept ( Visitor v) const
inlineoverridevirtual

Support the visitor pattern.

For any implementation this should look like

C++:

v.visit( *this );

Python:

v.visit( self)
Parameters
vA visitor that visits this node.

Implements QgsExpression::Node.

Definition at line 824 of file qgsexpression.h.

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

Abstract virtual dump method.

Returns
An expression which represents this node as string

Implements QgsExpression::Node.

Definition at line 3034 of file qgsexpression.cpp.

QVariant QgsExpression::NodeColumnRef::eval ( QgsExpression parent,
const QgsExpressionContext context 
)
overridevirtual

Abstract virtual eval method Errors are reported to the parent.

Note
added in QGIS 2.12

Reimplemented from QgsExpression::Node.

Definition at line 3000 of file qgsexpression.cpp.

QString QgsExpression::NodeColumnRef::name ( ) const
inline

Definition at line 814 of file qgsexpression.h.

virtual bool QgsExpression::NodeColumnRef::needsGeometry ( ) const
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.

Returns
true if a geometry is required to evaluate this expression

Implements QgsExpression::Node.

Definition at line 822 of file qgsexpression.h.

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

Abstract virtual that returns the type of this node.

Returns
The type of this node

Implements QgsExpression::Node.

Definition at line 816 of file qgsexpression.h.

bool QgsExpression::NodeColumnRef::prepare ( QgsExpression parent,
const QgsExpressionContext context 
)
overridevirtual

Abstract virtual preparation method Errors are reported to the parent.

Note
added in QGIS 2.12

Reimplemented from QgsExpression::Node.

Definition at line 3014 of file qgsexpression.cpp.

virtual QStringList QgsExpression::NodeColumnRef::referencedColumns ( ) const
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.

Returns
A list of columns required to evaluate this expression

Implements QgsExpression::Node.

Definition at line 821 of file qgsexpression.h.

Member Data Documentation

int QgsExpression::NodeColumnRef::mIndex
protected

Definition at line 828 of file qgsexpression.h.

QString QgsExpression::NodeColumnRef::mName
protected

Definition at line 827 of file qgsexpression.h.


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