Implements: IVariantOperations
Description
The AbstractVariantOperations class allows you to implement abstract variant operations manager objects.
Constructors
InheritAbstractVariantOperations
Implements an abstractd variant operations manager object.
InheritAbstractVariantOperations(overrides IVariantOperationsOverrides) *AbstractVariantOperations
- overrides: IVariantOperationsOverrides - Variant operation overrides
Methods
Add
Performs the ‘+’ operation for two variants.
(c *AbstractVariantOperations) Add(value1 *Variant, value2 *Variant) (*Variant, error)
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
And
Performs the AND operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Convert
Converts a variant to a specified type.
Convert(value *Variant, newType VariantType) (*Variant, error)
- value: *Variant - variant value to be converted.
- newType: VariantType - type of object to be returned (VariantType).
- returns: (*Variant, error) - converted Variant value.
Div
Performs the ‘/’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Equal
Performs the ‘=’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
GetElement
Performs the [] operation for two variants.
GetElement(value1 *Variant, value2 *Variant) (*Variant, error)
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
In
Performs the IN operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Less
Performs the ‘<’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
LessEqual
Performs the ‘<=’ operation for two variants.
LessEqual(value1 *Variant, value2 *Variant) (*Variant, error)
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Lsh
Performs the ‘«’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Mod
Performs the ‘%’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
More
Performs the ‘>’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
MoreEqual
Performs the ‘>=’ operation for two variants.
MoreEqual(value1 *Variant, value2 *Variant) (*Variant, error)
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Mul
Performs the ‘*’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Negative
Performs the unary ‘-’ operation for a variant.
- value: *Variant - first operand for this operation.
- returns: (*Variant, error) - result variant object.
Not
Performs the NOT operation for a variant.
- value: *Variant - first operand for this operation.
- returns: (*Variant, error) - result variant object.
NotEqual
Performs the ‘<>’ operation for two variants.
NotEqual(value1 *Variant, value2 *Variant) (*Variant, error)
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Or
Performs the OR operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Pow
Performs the ‘^’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Rsh
Performs the ‘»’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
Sub
Performs the ‘-’ operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.
typeToString
Converts a variant type to string representation.
typeToString(value int) string
- value: string - variant type to be converted (VariantType).
- returns: string - string representation of the type.
Xor
Performs the XOR operation for two variants.
- value1: *Variant - first operand for this operation.
- value2: *Variant - second operand for this operation.
- returns: (*Variant, error) - result variant object.