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

Represents a while loop statement. More...

#include <qgsvbscript.h>

Inheritance diagram for QgsVbScriptWhileStatement:

Public Types

enum class  LoopType {
  WhileWend , DoWhile , DoUntil , DoLoopWhile ,
  DoLoopUntil
}
 Type of while or do loop. More...
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...

Public Member Functions

 QgsVbScriptWhileStatement (LoopType loopType, QgsVbScriptExpression *condition, QgsVbScriptBlockStatement *body)
 Constructor for QgsVbScriptWhileStatement.
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.
QgsVbScriptExpression * condition () const
 Returns the loop condition expression.
QString dump () const override
 Returns the formatted script representation of the node.
LoopType loopType () const
 Returns the loop variant type.
QgsVbScriptNode::NodeType nodeType () const override
 Returns the node type.
Public Member Functions inherited from QgsVbScriptStatement
 ~QgsVbScriptStatement () override=default
Public Member Functions inherited from QgsVbScriptNode
virtual ~QgsVbScriptNode ()=default

Detailed Description

Represents a while loop statement.

Since
QGIS 4.4

Definition at line 1024 of file qgsvbscript.h.

Member Enumeration Documentation

◆ LoopType

Type of while or do loop.

Enumerator
WhileWend 

While ... Wend loop.

DoWhile 

Do While ... Loop.

DoUntil 

Do Until ... Loop.

DoLoopWhile 

Do ... Loop While.

DoLoopUntil 

Do ... Loop Until.

Definition at line 1030 of file qgsvbscript.h.

Constructor & Destructor Documentation

◆ QgsVbScriptWhileStatement()

QgsVbScriptWhileStatement::QgsVbScriptWhileStatement ( LoopType loopType,
QgsVbScriptExpression * condition,
QgsVbScriptBlockStatement * body )

Constructor for QgsVbScriptWhileStatement.

Ownership of condition and body is transferred to this statement.

Definition at line 630 of file qgsvbscript.cpp.

Member Function Documentation

◆ accept()

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

Accepts a visitor to traverse the node.

Implements QgsVbScriptNode.

Definition at line 664 of file qgsvbscript.cpp.

◆ body()

QgsVbScriptBlockStatement * QgsVbScriptWhileStatement::body ( ) const
inline

Returns the loop body block statement.

Definition at line 1064 of file qgsvbscript.h.

◆ clone()

QgsVbScriptNode * QgsVbScriptWhileStatement::clone ( ) const
overridevirtual

Creates a copy of the node.

Caller takes ownership of the returned object.

Implements QgsVbScriptNode.

Definition at line 657 of file qgsvbscript.cpp.

◆ condition()

QgsVbScriptExpression * QgsVbScriptWhileStatement::condition ( ) const
inline

Returns the loop condition expression.

Definition at line 1059 of file qgsvbscript.h.

◆ dump()

QString QgsVbScriptWhileStatement::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 636 of file qgsvbscript.cpp.

◆ loopType()

LoopType QgsVbScriptWhileStatement::loopType ( ) const
inline

Returns the loop variant type.

Definition at line 1054 of file qgsvbscript.h.

◆ nodeType()

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

Returns the node type.

Implements QgsVbScriptNode.

Definition at line 1046 of file qgsvbscript.h.


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