QGIS API Documentation 4.3.0-Master (0cef2469b72)
Loading...
Searching...
No Matches
QgsVbScriptUnaryOperatorExpression Class Reference

Represents a unary operation expression. More...

#include <qgsvbscript.h>

Inheritance diagram for QgsVbScriptUnaryOperatorExpression:

Public Types

enum class  UnaryOperator { Not , Minus , Plus }
 Unary operator enumeration. More...
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...

Public Member Functions

 QgsVbScriptUnaryOperatorExpression (UnaryOperator unaryOperator, QgsVbScriptExpression *operand)
 Constructor for QgsVbScriptUnaryOperatorExpression.
void accept (QgsVbScriptVisitor &visitor) const override
 Accepts a visitor to traverse the node.
QgsVbScriptNode * clone () const override
 Creates a copy of the node.
QString dump () const override
 Returns the formatted script representation of the node.
QgsVbScriptNode::NodeType nodeType () const override
 Returns the node type.
QgsVbScriptExpression * 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 QgsVbScriptExpression
 ~QgsVbScriptExpression () override=default
Public Member Functions inherited from QgsVbScriptNode
virtual ~QgsVbScriptNode ()=default

Static Public Attributes

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

Detailed Description

Represents a unary operation expression.

Since
QGIS 4.4

Definition at line 657 of file qgsvbscript.h.

Member Enumeration Documentation

◆ UnaryOperator

Unary operator enumeration.

Enumerator
Not 

Logical Not.

Minus 

Minus operator, -.

Plus 

Plus operator, +.

Definition at line 663 of file qgsvbscript.h.

Constructor & Destructor Documentation

◆ QgsVbScriptUnaryOperatorExpression()

QgsVbScriptUnaryOperatorExpression::QgsVbScriptUnaryOperatorExpression ( UnaryOperator unaryOperator,
QgsVbScriptExpression * operand )

Constructor for QgsVbScriptUnaryOperatorExpression.

Ownership of operand is transferred to this expression.

Definition at line 373 of file qgsvbscript.cpp.

Member Function Documentation

◆ accept()

void QgsVbScriptUnaryOperatorExpression::accept ( QgsVbScriptVisitor & visitor) const
overridevirtual

Accepts a visitor to traverse the node.

Implements QgsVbScriptNode.

Definition at line 396 of file qgsvbscript.cpp.

◆ clone()

QgsVbScriptNode * QgsVbScriptUnaryOperatorExpression::clone ( ) const
overridevirtual

Creates a copy of the node.

Caller takes ownership of the returned object.

Implements QgsVbScriptNode.

Definition at line 391 of file qgsvbscript.cpp.

◆ dump()

QString QgsVbScriptUnaryOperatorExpression::dump ( ) const
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 383 of file qgsvbscript.cpp.

◆ nodeType()

QgsVbScriptNode::NodeType QgsVbScriptUnaryOperatorExpression::nodeType ( ) const
inlineoverridevirtual

Returns the node type.

Implements QgsVbScriptNode.

Definition at line 680 of file qgsvbscript.h.

◆ operand()

QgsVbScriptExpression * QgsVbScriptUnaryOperatorExpression::operand ( ) const
inline

Returns the operand expression.

Definition at line 693 of file qgsvbscript.h.

◆ text()

QString QgsVbScriptUnaryOperatorExpression::text ( ) const

Returns text representation of the operator.

Definition at line 378 of file qgsvbscript.cpp.

◆ unaryOperator()

UnaryOperator QgsVbScriptUnaryOperatorExpression::unaryOperator ( ) const
inline

Returns the unary operator.

Definition at line 688 of file qgsvbscript.h.

Member Data Documentation

◆ UNARY_OPERATOR_TEXT

const char * QgsVbScriptUnaryOperatorExpression::UNARY_OPERATOR_TEXT = { "Not", "-", "+" }
static
Note
not available in Python bindings

Definition at line 33 of file qgsvbscript.h.


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