Class: QgsEsriArcadeForInStatement¶
Represents a range based for…in or for…of iteration statement.
Added in version 4.4.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Base class for statement nodes in an Esri Arcade script. |
|
Represents an abstract node for an Esri Arcade script. |
Constructor
Enums
Type of iteration loop. |
Abstract Methods
Methods
Returns the loop body block statement. |
|
Returns the collection expression being iterated over. |
|
Returns |
|
Returns the iteration type (for...in or for...of). |
|
Returns the loop variable identifier name. |
- class qgis.core.QgsEsriArcadeForInStatement[source]¶
Bases:
QgsEsriArcadeStatement- __init__(iterationType: QgsEsriArcadeForInStatement.IterationType, variableName: str | None, isVariableDeclaration: bool, collection: QgsEsriArcadeExpression | None, body: QgsEsriArcadeBlockStatement | None)¶
Constructor for QgsEsriArcadeForInStatement.
Ownership of
collectionandbodyis transferred to this statement.- Parameters:
iterationType (QgsEsriArcadeForInStatement.IterationType)
variableName (str|None)
isVariableDeclaration (bool)
collection (QgsEsriArcadeExpression|None)
body (QgsEsriArcadeBlockStatement|None)
- class IterationType(*values)¶
Bases:
EnumType of iteration loop.
ForIn: For x in y loopForOf: For x of y loop
- ForIn = 0¶
- ForOf = 1¶
- body(self) QgsEsriArcadeBlockStatement | None[source]¶
Returns the loop body block statement.
- Return type:
- abstract clone(self) QgsEsriArcadeNode | None[source]¶
- Return type:
QgsEsriArcadeNode|None
- collection(self) QgsEsriArcadeExpression | None[source]¶
Returns the collection expression being iterated over.
- Return type:
- isVariableDeclaration(self) bool[source]¶
Returns
Trueif the loop variable was declared with the var keyword.- Return type:
bool
- iterationType(self) QgsEsriArcadeForInStatement.IterationType[source]¶
Returns the iteration type (for…in or for…of).
- Return type: