QGIS API Documentation 4.3.0-Master (bd2f5e21fd1)
Loading...
Searching...
No Matches
QgsEsriArcadeNode Class Referenceabstract

Represents an abstract node for an Esri Arcade script. More...

#include <qgsesriarcadescript.h>

Inheritance diagram for QgsEsriArcadeNode:

Public Types

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...

Public Member Functions

virtual ~QgsEsriArcadeNode ()=default
virtual void accept (QgsEsriArcadeVisitor &visitor) const =0
 Accepts a visitor to traverse the node.
virtual QgsEsriArcadeNode * clone () const =0
 Creates a copy of the node.
virtual QString dump () const =0
 Returns the formatted script representation of the node.
virtual QgsEsriArcadeNode::NodeType nodeType () const =0
 Returns the node type.

Detailed Description

Represents an abstract node for an Esri Arcade script.

Arcade node subclasses are either:

  • statements (inheriting QgsEsriArcadeStatement), such as a variable declaration, if statement, for loop.
  • or expressions (inheriting QgsEsriArcadeExpression), which are a portion of a statement representing an expression. For example 1+2, Upper('A string'), or literals like 255 or 'a string'.
Since
QGIS 4.4

Definition at line 59 of file qgsesriarcadescript.h.

Member Enumeration Documentation

◆ NodeType

enum class QgsEsriArcadeNode::NodeType
strong

Node type identifier.

Enumerator
BlockStatement 

Block statement (a list of statements grouped together in a block).

VariableDeclarationStatement 

Variable declaration statement.

ReturnStatement 

Return statement.

AssignmentStatement 

Variable assignment statement.

FunctionDeclarationStatement 

Function declaration.

ExpressionStatement 

Expression.

LiteralExpression 

Literal.

VariableReferenceExpression 

Reference to a standard variable.

ProfileVariableReferenceExpression 

Reference to a profile variable (eg $feature).

MemberAccessExpression 

Member access via bracket or notation (eg $feature.ATTRIBUTE or $feature["ATTRIBUTE"]).

BinaryOperatorExpression 

Binary Operator.

UnaryOperatorExpression 

Operator.

FunctionCallExpression 

Function call.

IndexExpression 

Index operator.

ArrayLiteralExpression 

A literal array, where the element values may be expressions themselves (eg [1, 2, 3/4]).

DictionaryLiteralExpression 

A literal dictionary, eg {key: 1, other_key: 2}.

IfStatement 

If statement.

ForStatement 

For loop.

ForInStatement 

For x in y loop.

WhileStatement 

While loop.

BreakStatement 

Break statement.

ContinueStatement 

Continue statement.

Definition at line 142 of file qgsesriarcadescript.h.

Constructor & Destructor Documentation

◆ ~QgsEsriArcadeNode()

virtual QgsEsriArcadeNode::~QgsEsriArcadeNode ( )
virtualdefault

Member Function Documentation

◆ accept()

◆ clone()

◆ dump()

◆ nodeType()


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