QGIS API Documentation 4.3.0-Master (0cef2469b72)
Loading...
Searching...
No Matches
QgsVbScriptForStatement Class Reference

Represents a standard counter-based for loop. More...

#include <qgsvbscript.h>

Inheritance diagram for QgsVbScriptForStatement:

Public Member Functions

 QgsVbScriptForStatement (const QString &variableName, QgsVbScriptExpression *startExpression, QgsVbScriptExpression *endExpression, QgsVbScriptExpression *stepExpression, QgsVbScriptBlockStatement *body)
 Constructor for QgsVbScriptForStatement.
void accept (QgsVbScriptVisitor &visitor) const override
 Accepts a visitor to traverse the node.
QgsVbScriptBlockStatement * body () const
 Returns the loop body block statement.
QgsVbScriptNode * clone () const override
 Creates a copy of the node.
QString dump () const override
 Returns the formatted script representation of the node.
QgsVbScriptExpression * endExpression () const
 Returns the terminal counter expression.
QgsVbScriptNode::NodeType nodeType () const override
 Returns the node type.
QgsVbScriptExpression * startExpression () const
 Returns the initial counter expression.
QgsVbScriptExpression * stepExpression () const
 Returns the step increment expression, or nullptr if default.
QString variableName () const
 Returns the loop variable identifier name.
Public Member Functions inherited from QgsVbScriptStatement
 ~QgsVbScriptStatement () override=default
Public Member Functions inherited from QgsVbScriptNode
virtual ~QgsVbScriptNode ()=default

Additional Inherited Members

Public Types inherited from QgsVbScriptNode
enum class  NodeType {
  BlockStatement , VariableDeclarationStatement , AssignmentStatement , FunctionDeclarationStatement ,
  ExpressionStatement , LiteralExpression , VariableReferenceExpression , MemberAccessExpression ,
  BinaryOperatorExpression , UnaryOperatorExpression , FunctionCallExpression , IndexExpression ,
  ArrayLiteralExpression , IfStatement , ForStatement , ForEachStatement ,
  WhileStatement , ExitStatement , FieldReferenceExpression
}
 Node type identifier. More...

Detailed Description

Represents a standard counter-based for loop.

Since
QGIS 4.4

Definition at line 908 of file qgsvbscript.h.

Constructor & Destructor Documentation

◆ QgsVbScriptForStatement()

QgsVbScriptForStatement::QgsVbScriptForStatement ( const QString & variableName,
QgsVbScriptExpression * startExpression,
QgsVbScriptExpression * endExpression,
QgsVbScriptExpression * stepExpression,
QgsVbScriptBlockStatement * body )

Constructor for QgsVbScriptForStatement.

Ownership of startExpression, endExpression, stepExpression, and body is transferred to this statement.

Definition at line 565 of file qgsvbscript.cpp.

Member Function Documentation

◆ accept()

void QgsVbScriptForStatement::accept ( QgsVbScriptVisitor & visitor) const
overridevirtual

Accepts a visitor to traverse the node.

Implements QgsVbScriptNode.

Definition at line 594 of file qgsvbscript.cpp.

◆ body()

QgsVbScriptBlockStatement * QgsVbScriptForStatement::body ( ) const
inline

Returns the loop body block statement.

Definition at line 952 of file qgsvbscript.h.

◆ clone()

QgsVbScriptNode * QgsVbScriptForStatement::clone ( ) const
overridevirtual

Creates a copy of the node.

Caller takes ownership of the returned object.

Implements QgsVbScriptNode.

Definition at line 585 of file qgsvbscript.cpp.

◆ dump()

QString QgsVbScriptForStatement::dump ( ) const
overridevirtual

Returns the formatted script representation of the node.

This can be used to export a script node back to a valid VBScript string.

Implements QgsVbScriptNode.

Definition at line 575 of file qgsvbscript.cpp.

◆ endExpression()

QgsVbScriptExpression * QgsVbScriptForStatement::endExpression ( ) const
inline

Returns the terminal counter expression.

Definition at line 942 of file qgsvbscript.h.

◆ nodeType()

QgsVbScriptNode::NodeType QgsVbScriptForStatement::nodeType ( ) const
inlineoverridevirtual

Returns the node type.

Implements QgsVbScriptNode.

Definition at line 924 of file qgsvbscript.h.

◆ startExpression()

QgsVbScriptExpression * QgsVbScriptForStatement::startExpression ( ) const
inline

Returns the initial counter expression.

Definition at line 937 of file qgsvbscript.h.

◆ stepExpression()

QgsVbScriptExpression * QgsVbScriptForStatement::stepExpression ( ) const
inline

Returns the step increment expression, or nullptr if default.

Definition at line 947 of file qgsvbscript.h.

◆ variableName()

QString QgsVbScriptForStatement::variableName ( ) const
inline

Returns the loop variable identifier name.

Definition at line 932 of file qgsvbscript.h.


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