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¶
Base classes¶
Abstract base class for all nodes that can appear in an expression. |
Methods
Returns a list of arguments specified for the function. |
|
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.
Static Methods
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:
fnIndex (int)
args (Optional[QgsExpressionNode.NodeList])
- 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:
parent (Optional[QgsExpression])
context (Optional[QgsExpressionContext])
- Return type:
Any
- virtual prepareNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) bool [source]¶
- Parameters:
parent (Optional[QgsExpression])
context (Optional[QgsExpressionContext])
- 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:
fnIndex (int)
args (Optional[QgsExpressionNode.NodeList])
error (Optional[str])
- Return type:
bool