QGIS API Documentation 4.3.0-Master (bd2f5e21fd1)
Loading...
Searching...
No Matches
QgsEsriArcadeBlockStatement Class Reference

Represents a sequence or block of statements enclosed in braces. More...

#include <qgsesriarcadescript.h>

Inheritance diagram for QgsEsriArcadeBlockStatement:

Public Member Functions

 QgsEsriArcadeBlockStatement ()=default
 QgsEsriArcadeBlockStatement (const QList< QgsEsriArcadeStatement * > &statements)
 Constructor for QgsEsriArcadeBlockStatement with an existing statement list.
 ~QgsEsriArcadeBlockStatement () override
void accept (QgsEsriArcadeVisitor &visitor) const override
 Accepts a visitor to traverse the node.
void appendStatement (QgsEsriArcadeStatement *statement)
 Appends a statement to the block.
QgsEsriArcadeNode * clone () const override
 Creates a copy of the node.
int count () const
 Returns the number of statements in this block.
QString dump () const override
 Returns the formatted script representation of the node.
QgsEsriArcadeNode::NodeType nodeType () const override
 Returns the node type.
QList< QgsEsriArcadeStatement * > statements () const
 Returns the list of statements contained within this block.
Public Member Functions inherited from QgsEsriArcadeStatement
 ~QgsEsriArcadeStatement () override=default
Public Member Functions inherited from QgsEsriArcadeNode
virtual ~QgsEsriArcadeNode ()=default

Additional Inherited Members

Public Types inherited from QgsEsriArcadeNode
enum class  NodeType {
  BlockStatement , VariableDeclarationStatement , ReturnStatement , AssignmentStatement ,
  FunctionDeclarationStatement , ExpressionStatement , LiteralExpression , VariableReferenceExpression ,
  ProfileVariableReferenceExpression , MemberAccessExpression , BinaryOperatorExpression , UnaryOperatorExpression ,
  FunctionCallExpression , IndexExpression , ArrayLiteralExpression , DictionaryLiteralExpression ,
  IfStatement , ForStatement , ForInStatement , WhileStatement ,
  BreakStatement , ContinueStatement
}
 Node type identifier. More...

Detailed Description

Represents a sequence or block of statements enclosed in braces.

Since
QGIS 4.4

Definition at line 234 of file qgsesriarcadescript.h.

Constructor & Destructor Documentation

◆ QgsEsriArcadeBlockStatement() [1/2]

QgsEsriArcadeBlockStatement::QgsEsriArcadeBlockStatement ( )
default

◆ QgsEsriArcadeBlockStatement() [2/2]

QgsEsriArcadeBlockStatement::QgsEsriArcadeBlockStatement ( const QList< QgsEsriArcadeStatement * > & statements)
explicit

Constructor for QgsEsriArcadeBlockStatement with an existing statement list.

Ownership of all statements is transferred to this block.

Definition at line 41 of file qgsesriarcadescript.cpp.

◆ ~QgsEsriArcadeBlockStatement()

QgsEsriArcadeBlockStatement::~QgsEsriArcadeBlockStatement ( )
override

Definition at line 45 of file qgsesriarcadescript.cpp.

Member Function Documentation

◆ accept()

void QgsEsriArcadeBlockStatement::accept ( QgsEsriArcadeVisitor & visitor) const
overridevirtual

Accepts a visitor to traverse the node.

Implements QgsEsriArcadeNode.

Definition at line 77 of file qgsesriarcadescript.cpp.

◆ appendStatement()

void QgsEsriArcadeBlockStatement::appendStatement ( QgsEsriArcadeStatement * statement)

Appends a statement to the block.

Ownership of statement is transferred to this block.

Definition at line 50 of file qgsesriarcadescript.cpp.

◆ clone()

QgsEsriArcadeNode * QgsEsriArcadeBlockStatement::clone ( ) const
overridevirtual

Creates a copy of the node.

Caller takes ownership of the returned object.

Implements QgsEsriArcadeNode.

Definition at line 66 of file qgsesriarcadescript.cpp.

◆ count()

int QgsEsriArcadeBlockStatement::count ( ) const
inline

Returns the number of statements in this block.

Definition at line 268 of file qgsesriarcadescript.h.

◆ dump()

QString QgsEsriArcadeBlockStatement::dump ( ) const
overridevirtual

Returns the formatted script representation of the node.

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

Implements QgsEsriArcadeNode.

Definition at line 55 of file qgsesriarcadescript.cpp.

◆ nodeType()

QgsEsriArcadeNode::NodeType QgsEsriArcadeBlockStatement::nodeType ( ) const
inlineoverridevirtual

Returns the node type.

Implements QgsEsriArcadeNode.

Definition at line 248 of file qgsesriarcadescript.h.

◆ statements()

QList< QgsEsriArcadeStatement * > QgsEsriArcadeBlockStatement::statements ( ) const
inline

Returns the list of statements contained within this block.

Definition at line 263 of file qgsesriarcadescript.h.


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