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

Represents a variable reassignment statement. More...

#include <qgsesriarcadescript.h>

Inheritance diagram for QgsEsriArcadeAssignmentStatement:

Public Types

enum class  AssignmentOperator {
  Assign , PlusAssign , MinusAssign , MultiplyAssign ,
  DivideAssign
}
 Assignment operator types. More...
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...

Public Member Functions

 QgsEsriArcadeAssignmentStatement (AssignmentOperator assignmentOperator, QgsEsriArcadeExpression *target, QgsEsriArcadeExpression *value)
 Constructor for QgsEsriArcadeAssignmentStatement.
void accept (QgsEsriArcadeVisitor &visitor) const override
 Accepts a visitor to traverse the node.
AssignmentOperator assignmentOperator () const
 Returns the assignment operator.
QgsEsriArcadeNode * clone () const override
 Creates a copy of the node.
QString dump () const override
 Returns the formatted script representation of the node.
QgsEsriArcadeNode::NodeType nodeType () const override
 Returns the node type.
QgsEsriArcadeExpression * target () const
 Returns the target expression being assigned to.
QgsEsriArcadeExpression * value () const
 Returns the assigned value expression.
Public Member Functions inherited from QgsEsriArcadeStatement
 ~QgsEsriArcadeStatement () override=default
Public Member Functions inherited from QgsEsriArcadeNode
virtual ~QgsEsriArcadeNode ()=default

Static Public Attributes

static const char * ASSIGNMENT_OPERATOR_TEXT [] = { "=", "+=", "-=", "*=", "/=" }

Detailed Description

Represents a variable reassignment statement.

For example, age = "35 years";.

Since
QGIS 4.4

Definition at line 339 of file qgsesriarcadescript.h.

Member Enumeration Documentation

◆ AssignmentOperator

Assignment operator types.

Enumerator
Assign 

Standard assignment a = 10.

PlusAssign 

Add and assign a += 10.

MinusAssign 

Subtract and assign a -= 10.

MultiplyAssign 

Multiply and assign a *= 10.

DivideAssign 

Divide and assign a /= 10.

Definition at line 345 of file qgsesriarcadescript.h.

Constructor & Destructor Documentation

◆ QgsEsriArcadeAssignmentStatement()

QgsEsriArcadeAssignmentStatement::QgsEsriArcadeAssignmentStatement ( AssignmentOperator assignmentOperator,
QgsEsriArcadeExpression * target,
QgsEsriArcadeExpression * value )

Constructor for QgsEsriArcadeAssignmentStatement.

Ownership of target and value is transferred to this statement.

Definition at line 113 of file qgsesriarcadescript.cpp.

Member Function Documentation

◆ accept()

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

Accepts a visitor to traverse the node.

Implements QgsEsriArcadeNode.

Definition at line 131 of file qgsesriarcadescript.cpp.

◆ assignmentOperator()

AssignmentOperator QgsEsriArcadeAssignmentStatement::assignmentOperator ( ) const
inline

Returns the assignment operator.

Definition at line 382 of file qgsesriarcadescript.h.

◆ clone()

QgsEsriArcadeNode * QgsEsriArcadeAssignmentStatement::clone ( ) const
overridevirtual

Creates a copy of the node.

Caller takes ownership of the returned object.

Implements QgsEsriArcadeNode.

Definition at line 124 of file qgsesriarcadescript.cpp.

◆ dump()

QString QgsEsriArcadeAssignmentStatement::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 119 of file qgsesriarcadescript.cpp.

◆ nodeType()

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

Returns the node type.

Implements QgsEsriArcadeNode.

Definition at line 364 of file qgsesriarcadescript.h.

◆ target()

QgsEsriArcadeExpression * QgsEsriArcadeAssignmentStatement::target ( ) const
inline

Returns the target expression being assigned to.

Definition at line 372 of file qgsesriarcadescript.h.

◆ value()

QgsEsriArcadeExpression * QgsEsriArcadeAssignmentStatement::value ( ) const
inline

Returns the assigned value expression.

Definition at line 377 of file qgsesriarcadescript.h.

Member Data Documentation

◆ ASSIGNMENT_OPERATOR_TEXT

const char * QgsEsriArcadeAssignmentStatement::ASSIGNMENT_OPERATOR_TEXT = { "=", "+=", "-=", "*=", "/=" }
static
Note
not available in Python bindings

Definition at line 35 of file qgsesriarcadescript.h.


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