|
QGIS API Documentation 4.3.0-Master (0cef2469b72)
|
Represents an if statement. More...
#include <qgsvbscript.h>

Public Member Functions | |
| QgsVbScriptIfStatement (QgsVbScriptExpression *condition, QgsVbScriptBlockStatement *trueBlock, QgsVbScriptBlockStatement *falseBlock=nullptr, bool isInline=false) | |
| Constructor for QgsVbScriptIfStatement. | |
| void | accept (QgsVbScriptVisitor &visitor) const override |
| Accepts a visitor to traverse the node. | |
| QgsVbScriptNode * | clone () const override |
| Creates a copy of the node. | |
| QgsVbScriptExpression * | condition () const |
| Returns the condition expression. | |
| QString | dump () const override |
| Returns the formatted script representation of the node. | |
| QgsVbScriptBlockStatement * | falseBlock () const |
Returns the statement block executed when the condition evaluates to false, or nullptr if none. | |
| bool | isInline () const |
Returns true if this statement was declared as a single-line inline If. | |
| QgsVbScriptNode::NodeType | nodeType () const override |
| Returns the node type. | |
| QgsVbScriptBlockStatement * | trueBlock () const |
Returns the statement block executed when the condition evaluates to true. | |
| 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... | |
| QgsVbScriptIfStatement::QgsVbScriptIfStatement | ( | QgsVbScriptExpression * | condition, |
| QgsVbScriptBlockStatement * | trueBlock, | ||
| QgsVbScriptBlockStatement * | falseBlock = nullptr, | ||
| bool | isInline = false ) |
Constructor for QgsVbScriptIfStatement.
Ownership of condition, trueBlock, and falseBlock is transferred to this statement.
Definition at line 513 of file qgsvbscript.cpp.
|
overridevirtual |
Accepts a visitor to traverse the node.
Implements QgsVbScriptNode.
Definition at line 556 of file qgsvbscript.cpp.
|
overridevirtual |
Creates a copy of the node.
Caller takes ownership of the returned object.
Implements QgsVbScriptNode.
Definition at line 548 of file qgsvbscript.cpp.
|
inline |
Returns the condition expression.
Definition at line 871 of file qgsvbscript.h.
|
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 520 of file qgsvbscript.cpp.
|
inline |
Returns the statement block executed when the condition evaluates to false, or nullptr if none.
Definition at line 881 of file qgsvbscript.h.
|
inline |
Returns true if this statement was declared as a single-line inline If.
Definition at line 886 of file qgsvbscript.h.
|
inlineoverridevirtual |
|
inline |
Returns the statement block executed when the condition evaluates to true.
Definition at line 876 of file qgsvbscript.h.