Class: QgsExpressionNodeFunction

An expression node for expression functions.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: QgsExpressionNode.needsGeometry()

Class Hierarchy

Inheritance diagram of qgis.core.QgsExpressionNodeFunction

Base classes

QgsExpressionNode

Abstract base class for all nodes that can appear in an expression.

Methods

args

Returns a list of arguments specified for the function.

fnIndex

Returns the index of the node's function.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsExpressionNodeFunction. See the FAQ for more details.

evalNode

prepareNode

Static Methods

validateParams

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

class qgis.core.QgsExpressionNodeFunction[source]

Bases: QgsExpressionNode

__init__(fnIndex: int, args: QgsExpressionNode.NodeList | None)

A function node consists of an index of the function in the global function array and a list of arguments that will be passed to it.

Parameters:
args(self) QgsExpressionNode.NodeList | None[source]

Returns a list of arguments specified for the function.

Return type:

Optional[QgsExpressionNode.NodeList]

virtual evalNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) Any[source]
Parameters:
Return type:

Any

fnIndex(self) int[source]

Returns the index of the node’s function.

Return type:

int

virtual prepareNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) bool[source]
Parameters:
Return type:

bool

static validateParams(fnIndex: int, args: QgsExpressionNode.NodeList | None, error: str | None) bool[source]

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

Parameters:
Return type:

bool