AbstractVariantOperations

Implements an abstract variant operations manager object.

Implements: IVariantOperations

Description

The AbstractVariantOperations class allows you to implement abstract variant operations manager objects.

Instance methods

add

Performs the ‘+’ operation for two variants.

add(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

and

Performs the AND operation for two variants.

and(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

div

Performs the ‘/’ operation for two variants.

div(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

equal

Performs the ‘=’ operation for two variants.

equal(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

get_element

Performs the [] operation for two variants.

get_element(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

in

Performs the IN operation for two variants.

in(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

less

Performs the ‘<’ operation for two variants.

less(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

less_equal

Performs the ‘<=’ operation for two variants.

less_equal(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

lsh

Performs the ‘«’ operation for two variants.

lsh(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

mod

Performs the ‘%’ operation for two variants.

mod(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

more

Performs the ‘>’ operation for two variants.

more(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

more_equal

Performs the ‘>=’ operation for two variants.

more_equal(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

mul

Performs the ‘*’ operation for two variants.

mul(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

negative

Performs the unary ‘-’ operation for a variant.

negative(value: Variant): Variant

  • value: Variant - first operand for this operation.
  • returns: Variant - result variant object.

not

Performs the NOT operation for a variant.

not(value: Variant): Variant

  • value: Variant - first operand for this operation.
  • returns: Variant - result variant object.

not_equal

Performs the ‘<>’ operation for two variants.

not_equal(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

or

Performs the OR operation for two variants.

or(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

pow

Performs the ‘^’ operation for two variants.

pow(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

rsh

Performs the ‘»’ operation for two variants.

rsh(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

sub

Performs the ‘-’ operation for two variants.

sub(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

_type_to_string

Converts variant type to string representation.

_type_to_string(value: VariantType): str

  • value: VariantType - variant type to be converted.
  • returns: str - string representation of the type.

xor

Performs the XOR operation for two variants.

xor(value1: Variant, value2: Variant): Variant

  • value1: Variant - first operand for this operation.
  • value2: Variant - second operand for this operation.
  • returns: Variant - result variant object.

Abstract methods

convert

Converts variant to specified type.

static convert(value: Variant, new_type: VariantType): Variant

  • value: Variant - variant value to be converted.
  • new_type: VariantType - type of object to be returned.
  • returns: Variant - converted Variant value.