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

Represents a unary operation expression. More...

#include <qgsesriarcadescript.h>

Inheritance diagram for QgsEsriArcadeUnaryOperatorExpression:

Public Types

enum class  UnaryOperator {
  Not , Minus , Plus , BitwiseNot ,
  PreIncrement , PreDecrement , PostIncrement , PostDecrement
}
 Unary operator enumeration. 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

 QgsEsriArcadeUnaryOperatorExpression (UnaryOperator unaryOperator, QgsEsriArcadeExpression *operand)
 Constructor for QgsEsriArcadeUnaryOperatorExpression.
void accept (QgsEsriArcadeVisitor &visitor) const override
 Accepts a visitor to traverse the node.
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 * operand () const
 Returns the operand expression.
QString text () const
 Returns text representation of the operator.
UnaryOperator unaryOperator () const
 Returns the unary operator.
Public Member Functions inherited from QgsEsriArcadeExpression
 ~QgsEsriArcadeExpression () override=default
Public Member Functions inherited from QgsEsriArcadeNode
virtual ~QgsEsriArcadeNode ()=default

Static Public Attributes

static const char * UNARY_OPERATOR_TEXT [] = { "!", "-", "+", "~", "++", "--", "++", "--" }

Detailed Description

Represents a unary operation expression.

Since
QGIS 4.4

Definition at line 779 of file qgsesriarcadescript.h.

Member Enumeration Documentation

◆ UnaryOperator

Unary operator enumeration.

Enumerator
Not 

Not operator, !

Minus 

Minus operator, -.

Plus 

Plus operator, +.

BitwiseNot 

Bitwise not, eg "~7".

PreIncrement 

Preincrement operator, eg "++x".

PreDecrement 

Prederement operator, eg "--x".

PostIncrement 

Postincrement operator, eg "x++".

PostDecrement 

Postdecrement operator, eg "x--".

Definition at line 785 of file qgsesriarcadescript.h.

Constructor & Destructor Documentation

◆ QgsEsriArcadeUnaryOperatorExpression()

QgsEsriArcadeUnaryOperatorExpression::QgsEsriArcadeUnaryOperatorExpression ( UnaryOperator unaryOperator,
QgsEsriArcadeExpression * operand )

Constructor for QgsEsriArcadeUnaryOperatorExpression.

Ownership of operand is transferred to this expression.

Definition at line 432 of file qgsesriarcadescript.cpp.

Member Function Documentation

◆ accept()

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

Accepts a visitor to traverse the node.

Implements QgsEsriArcadeNode.

Definition at line 455 of file qgsesriarcadescript.cpp.

◆ clone()

QgsEsriArcadeNode * QgsEsriArcadeUnaryOperatorExpression::clone ( ) const
overridevirtual

Creates a copy of the node.

Caller takes ownership of the returned object.

Implements QgsEsriArcadeNode.

Definition at line 450 of file qgsesriarcadescript.cpp.

◆ dump()

QString QgsEsriArcadeUnaryOperatorExpression::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 442 of file qgsesriarcadescript.cpp.

◆ nodeType()

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

Returns the node type.

Implements QgsEsriArcadeNode.

Definition at line 807 of file qgsesriarcadescript.h.

◆ operand()

QgsEsriArcadeExpression * QgsEsriArcadeUnaryOperatorExpression::operand ( ) const
inline

Returns the operand expression.

Definition at line 820 of file qgsesriarcadescript.h.

◆ text()

QString QgsEsriArcadeUnaryOperatorExpression::text ( ) const

Returns text representation of the operator.

Definition at line 437 of file qgsesriarcadescript.cpp.

◆ unaryOperator()

UnaryOperator QgsEsriArcadeUnaryOperatorExpression::unaryOperator ( ) const
inline

Returns the unary operator.

Definition at line 815 of file qgsesriarcadescript.h.

Member Data Documentation

◆ UNARY_OPERATOR_TEXT

const char * QgsEsriArcadeUnaryOperatorExpression::UNARY_OPERATOR_TEXT = { "!", "-", "+", "~", "++", "--", "++", "--" }
static
Note
not available in Python bindings

Definition at line 33 of file qgsesriarcadescript.h.


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