Class: QgsVbScriptBinaryOperatorExpression

Represents a binary operation expression.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsVbScriptBinaryOperatorExpression

Base classes

QgsVbScriptExpression

Base class for expression nodes in a VBScript script.

QgsVbScriptNode

Represents an abstract node for a VBScript script.

Constructor

__init__

Enums

BinaryOperator

Binary operator enumeration.

Abstract Methods

clone

Methods

binaryOperator

Returns the binary operator.

leftAssociative

Returns True if operator is left-associative.

leftOperand

Returns the left-hand operand expression.

precedence

Returns operator precedence value.

rightOperand

Returns the right-hand operand expression.

text

Returns text representation of the operator.

class qgis.core.QgsVbScriptBinaryOperatorExpression[source]

Bases: QgsVbScriptExpression

__init__(binaryOperator: QgsVbScriptBinaryOperatorExpression.BinaryOperator, leftOperand: QgsVbScriptExpression | None, rightOperand: QgsVbScriptExpression | None)

Constructor for QgsVbScriptBinaryOperatorExpression.

Ownership of leftOperand and rightOperand is transferred to this expression.

Parameters:
class BinaryOperator(*values)

Bases: Enum

Binary operator enumeration.

  • Plus: Addition +

  • Minus: Subtraction -

  • Multiply: Multiplication *

  • Divide: Division /

  • IntegerDivide: Integer division

  • Modulo: Modulo %

  • Exponent: Exponential ^

  • Concat: String concatenation &

  • Equal: Equality test ==

  • NotEqual: Not equal test !=

  • LessThan: Less than <

  • GreaterThan: Greater than >

  • LessThanOrEqual: Less than or equal to <=

  • GreaterThanOrEqual: Greater than or equal to >=

  • Is: Is comparison

  • LogicalAnd: Logical and

  • LogicalOr: Logical or

  • LogicalXor: Logical xor

  • LogicalImp: Logical imp

  • LogicalEqv: Logical eqv

Concat = 7
Divide = 3
Equal = 8
Exponent = 6
GreaterThan = 11
GreaterThanOrEqual = 13
IntegerDivide = 4
Is = 14
LessThan = 10
LessThanOrEqual = 12
LogicalAnd = 15
LogicalEqv = 19
LogicalImp = 18
LogicalOr = 16
LogicalXor = 17
Minus = 1
Modulo = 5
Multiply = 2
NotEqual = 9
Plus = 0
binaryOperator(self) → QgsVbScriptBinaryOperatorExpression.BinaryOperator[source]

Returns the binary operator.

Return type:

QgsVbScriptBinaryOperatorExpression.BinaryOperator

abstract clone(self) → QgsVbScriptNode | None[source]
Return type:

QgsVbScriptNode|None

leftAssociative(self) → bool[source]

Returns True if operator is left-associative.

Return type:

bool

leftOperand(self) → QgsVbScriptExpression | None[source]

Returns the left-hand operand expression.

Return type:

QgsVbScriptExpression|None

precedence(self) → int[source]

Returns operator precedence value.

Return type:

int

rightOperand(self) → QgsVbScriptExpression | None[source]

Returns the right-hand operand expression.

Return type:

QgsVbScriptExpression|None

text(self) → str[source]

Returns text representation of the operator.

Return type:

str