QgsExpressionFunction::Parameter class

Represents a single parameter passed to a function.

Constructors, destructors, conversion operators

Parameter(const QString& name, bool optional = false, const QVariant& defaultValue = QVariant(), bool isSubExpression = false)
Constructor for Parameter.

Public functions

auto defaultValue() const -> QVariant
Returns the default value for the parameter.
auto isSubExpression() const -> bool
Returns true if parameter argument is a separate sub-expression, and should not be checked while determining referenced columns for the expression.
auto name() const -> QString
Returns the name of the parameter.
auto optional() const -> bool
Returns true if the parameter is optional.

Function documentation

QgsExpressionFunction::Parameter::Parameter(const QString& name, bool optional = false, const QVariant& defaultValue = QVariant(), bool isSubExpression = false)

Constructor for Parameter.

Parameters
name parameter name, used when named parameter are specified in an expression
optional set to true if parameter should be optional
defaultValue default value to use for optional parameters
isSubExpression set to true if this parameter is a sub-expression

bool QgsExpressionFunction::Parameter::isSubExpression() const

Returns true if parameter argument is a separate sub-expression, and should not be checked while determining referenced columns for the expression.