ADTF
Loading...
Searching...
No Matches
a_util::variant::Variant Class Reference

#include <variant.h>

Public Member Functions

 Variant ()
 CTOR: VT_Empty.
 
 Variant (bool value)
 
 Variant (std::int8_t value)
 
 Variant (std::uint8_t value)
 
 Variant (std::int16_t value)
 
 Variant (std::uint16_t value)
 
 Variant (std::int32_t value)
 
 Variant (std::uint32_t value)
 
 Variant (std::int64_t value)
 
 Variant (std::uint64_t value)
 
 Variant (float value)
 
 Variant (double value)
 
 Variant (const char *value)
 
 Variant (const Variant &other)
 
Variantoperator= (const Variant &other)
 
 ~Variant ()
 Non-virtual DTOR.
 
 Variant (Variant &&other) noexcept
 
Variantoperator= (Variant &&other) noexcept
 
VariantType getType () const
 Returns the current underlying data type of the instance.
 
std::size_t getArraySize () const
 
std::size_t getStringSize () const
 
bool isArray () const
 Returns whether the instance stores an array of any kind.
 
bool isEmpty () const
 Returns whether the instance is in the empty state (VT_Empty)
 
void reset ()
 Resets the instance to VT_Empty.
 
void reset (bool value)
 
void reset (std::int8_t value)
 
void reset (std::uint8_t value)
 
void reset (std::int16_t value)
 
void reset (std::uint16_t value)
 
void reset (std::int32_t value)
 
void reset (std::uint32_t value)
 
void reset (std::int64_t value)
 
void reset (std::uint64_t value)
 
void reset (float value)
 
void reset (double value)
 
void reset (const char *value)
 
void reset (const bool *array_storage, std::size_t array_size)
 
void reset (const std::int8_t *array_storage, std::size_t array_size)
 
void reset (const std::uint8_t *array_storage, std::size_t array_size)
 
void reset (const std::int16_t *array_storage, std::size_t array_size)
 
void reset (const std::uint16_t *array_storage, std::size_t array_size)
 
void reset (const std::int32_t *array_storage, std::size_t array_size)
 
void reset (const std::uint32_t *array_storage, std::size_t array_size)
 
void reset (const std::int64_t *array_storage, std::size_t array_size)
 
void reset (const std::uint64_t *array_storage, std::size_t array_size)
 
void reset (const float *array_storage, std::size_t array_size)
 
void reset (const double *array_storage, std::size_t array_size)
 
bool getBool (std::size_t array_index=0) const
 
std::int8_t getInt8 (std::size_t array_index=0) const
 
std::uint8_t getUInt8 (std::size_t array_index=0) const
 
std::int16_t getInt16 (std::size_t array_index=0) const
 
std::uint16_t getUInt16 (std::size_t array_index=0) const
 
std::int32_t getInt32 (std::size_t array_index=0) const
 
std::uint32_t getUInt32 (std::size_t array_index=0) const
 
std::int64_t getInt64 (std::size_t array_index=0) const
 
std::uint64_t getUInt64 (std::size_t array_index=0) const
 
float getFloat (std::size_t array_index=0) const
 
double getDouble (std::size_t array_index=0) const
 
float getFloat32 (std::size_t array_index=0) const
 
double getFloat64 (std::size_t array_index=0) const
 
const char * getString () const
 
bool asBool () const
 
std::int8_t asInt8 () const
 
std::uint8_t asUInt8 () const
 
std::int16_t asInt16 () const
 
std::uint16_t asUInt16 () const
 
std::int32_t asInt32 () const
 
std::uint32_t asUInt32 () const
 
std::int64_t asInt64 () const
 
std::uint64_t asUInt64 () const
 
float asFloat () const
 
double asDouble () const
 
std::string asString () const
 
 operator bool () const
 
 operator std::int8_t () const
 
 operator std::uint8_t () const
 
 operator std::int16_t () const
 
 operator std::uint16_t () const
 
 operator std::int32_t () const
 
 operator std::uint32_t () const
 
 operator std::int64_t () const
 
 operator std::uint64_t () const
 
 operator float () const
 
 operator double () const
 
 operator std::string () const
 
Variantoperator= (bool value)
 
Variantoperator= (std::int8_t value)
 
Variantoperator= (std::uint8_t value)
 
Variantoperator= (std::int16_t value)
 
Variantoperator= (std::uint16_t value)
 
Variantoperator= (std::int32_t value)
 
Variantoperator= (std::uint32_t value)
 
Variantoperator= (std::int64_t value)
 
Variantoperator= (std::uint64_t value)
 
Variantoperator= (float value)
 
Variantoperator= (double value)
 
Variantoperator= (const char *value)
 

Friends

bool operator== (const Variant &lhs, const Variant &rhs)
 

Detailed Description

Container type, able to store any primitive data type (and arrays thereof)

Constructor & Destructor Documentation

◆ Variant() [1/14]

a_util::variant::Variant::Variant ( bool value)

CTOR: VT_Bool

Parameters
[in]valueValue of the variant

◆ Variant() [2/14]

a_util::variant::Variant::Variant ( std::int8_t value)

CTOR: VT_Int8

Parameters
[in]valueValue of the variant

◆ Variant() [3/14]

a_util::variant::Variant::Variant ( std::uint8_t value)

CTOR: VT_UInt8

Parameters
[in]valueValue of the variant

◆ Variant() [4/14]

a_util::variant::Variant::Variant ( std::int16_t value)

CTOR: VT_Int16

Parameters
[in]valueValue of the variant

◆ Variant() [5/14]

a_util::variant::Variant::Variant ( std::uint16_t value)

CTOR: VT_UInt16

Parameters
[in]valueValue of the variant

◆ Variant() [6/14]

a_util::variant::Variant::Variant ( std::int32_t value)

CTOR: VT_Int32

Parameters
[in]valueValue of the variant

◆ Variant() [7/14]

a_util::variant::Variant::Variant ( std::uint32_t value)

CTOR: VT_UInt32

Parameters
[in]valueValue of the variant

◆ Variant() [8/14]

a_util::variant::Variant::Variant ( std::int64_t value)

CTOR: VT_Int64

Parameters
[in]valueValue of the variant

◆ Variant() [9/14]

a_util::variant::Variant::Variant ( std::uint64_t value)

CTOR: VT_UInt64

Parameters
[in]valueValue of the variant

◆ Variant() [10/14]

a_util::variant::Variant::Variant ( float value)

CTOR: VT_Float32

Parameters
[in]valueValue of the variant

◆ Variant() [11/14]

a_util::variant::Variant::Variant ( double value)

CTOR: VT_Float64

Parameters
[in]valueValue of the variant

◆ Variant() [12/14]

a_util::variant::Variant::Variant ( const char * value)

CTOR: VT_String

Parameters
[in]valueValue of the variant

◆ Variant() [13/14]

a_util::variant::Variant::Variant ( const Variant & other)

Copy CTOR

Parameters
[in]otherOther variant object to copy construct *this from

◆ Variant() [14/14]

a_util::variant::Variant::Variant ( Variant && other)
noexcept

Move CTOR

Parameters
[in,out]otherMoved-from object *this is constructed from. Left in a valid but unspecified state. Should not be used after this move ctor returns

Member Function Documentation

◆ asBool()

bool a_util::variant::Variant::asBool ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asDouble()

double a_util::variant::Variant::asDouble ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asFloat()

float a_util::variant::Variant::asFloat ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asInt16()

std::int16_t a_util::variant::Variant::asInt16 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asInt32()

std::int32_t a_util::variant::Variant::asInt32 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asInt64()

std::int64_t a_util::variant::Variant::asInt64 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asInt8()

std::int8_t a_util::variant::Variant::asInt8 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asString()

std::string a_util::variant::Variant::asString ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asUInt16()

std::uint16_t a_util::variant::Variant::asUInt16 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asUInt32()

std::uint32_t a_util::variant::Variant::asUInt32 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asUInt64()

std::uint64_t a_util::variant::Variant::asUInt64 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ asUInt8()

std::uint8_t a_util::variant::Variant::asUInt8 ( ) const

Convert the value of the variant

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ getArraySize()

std::size_t a_util::variant::Variant::getArraySize ( ) const

Get the current array size of the instance

Note
For VT_String the array size is always 0

◆ getBool()

bool a_util::variant::Variant::getBool ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getDouble()

double a_util::variant::Variant::getDouble ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getFloat()

float a_util::variant::Variant::getFloat ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getFloat32()

float a_util::variant::Variant::getFloat32 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getFloat64()

double a_util::variant::Variant::getFloat64 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getInt16()

std::int16_t a_util::variant::Variant::getInt16 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getInt32()

std::int32_t a_util::variant::Variant::getInt32 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getInt64()

std::int64_t a_util::variant::Variant::getInt64 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getInt8()

std::int8_t a_util::variant::Variant::getInt8 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getString()

const char * a_util::variant::Variant::getString ( ) const

Get current string value

Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type

◆ getStringSize()

std::size_t a_util::variant::Variant::getStringSize ( ) const

Get the current string size of the instance for VT_String, not counting the trailing null byte.

◆ getUInt16()

std::uint16_t a_util::variant::Variant::getUInt16 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getUInt32()

std::uint32_t a_util::variant::Variant::getUInt32 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getUInt64()

std::uint64_t a_util::variant::Variant::getUInt64 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ getUInt8()

std::uint8_t a_util::variant::Variant::getUInt8 ( std::size_t array_index = 0) const

Get current value or alternatively from an array index of the variants value

Parameters
[in]array_indexIndex of the value to retrieve from the array (default: 0). Must be zero, if variant is not an array.
Returns
The value
Exceptions
std::runtime_errorIf variant type is different to the requested type
std::out_of_rangeIf array_index is out of range or the variant is not an array

◆ operator bool()

a_util::variant::Variant::operator bool ( ) const

Explicit conversion of the value of the variant to VT_Bool

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator double()

a_util::variant::Variant::operator double ( ) const

Explicit conversion of the value of the variant to VT_Double

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator float()

a_util::variant::Variant::operator float ( ) const

Explicit conversion of the value of the variant to VT_Float

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::int16_t()

a_util::variant::Variant::operator std::int16_t ( ) const

Explicit conversion of the value of the variant to VT_Int16

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::int32_t()

a_util::variant::Variant::operator std::int32_t ( ) const

Explicit conversion of the value of the variant to VT_Int32

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::int64_t()

a_util::variant::Variant::operator std::int64_t ( ) const

Explicit conversion of the value of the variant to VT_Int64

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::int8_t()

a_util::variant::Variant::operator std::int8_t ( ) const

Explicit conversion of the value of the variant to VT_Int8

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::string()

a_util::variant::Variant::operator std::string ( ) const

Explicit conversion of the value of the variant to VT_String

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::uint16_t()

a_util::variant::Variant::operator std::uint16_t ( ) const

Explicit conversion of the value of the variant to VT_UInt16

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::uint32_t()

a_util::variant::Variant::operator std::uint32_t ( ) const

Explicit conversion of the value of the variant to VT_UInt32

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::uint64_t()

a_util::variant::Variant::operator std::uint64_t ( ) const

Explicit conversion of the value of the variant to VT_UInt64

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator std::uint8_t()

a_util::variant::Variant::operator std::uint8_t ( ) const

Explicit conversion of the value of the variant to VT_UInt8

Returns
The value after conversion to the new type
Exceptions
std::runtime_errorIf variant is either VT_Empty or the type is unknown

◆ operator=() [1/14]

Variant & a_util::variant::Variant::operator= ( bool value)

Assignment operator for implicit type conversion to VT_Bool

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [2/14]

Variant & a_util::variant::Variant::operator= ( const char * value)

Assignment operator for implicit type conversion to VT_String

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [3/14]

Variant & a_util::variant::Variant::operator= ( const Variant & other)

Assignment operator

Parameters
[in]otherOther object to assign *this from
Returns
*this

◆ operator=() [4/14]

Variant & a_util::variant::Variant::operator= ( double value)

Assignment operator for implicit type conversion to VT_Double

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [5/14]

Variant & a_util::variant::Variant::operator= ( float value)

Assignment operator for implicit type conversion to VT_Float

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [6/14]

Variant & a_util::variant::Variant::operator= ( std::int16_t value)

Assignment operator for implicit type conversion to VT_Int16

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [7/14]

Variant & a_util::variant::Variant::operator= ( std::int32_t value)

Assignment operator for implicit type conversion to VT_Int32

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [8/14]

Variant & a_util::variant::Variant::operator= ( std::int64_t value)

Assignment operator for implicit type conversion to VT_Int64

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [9/14]

Variant & a_util::variant::Variant::operator= ( std::int8_t value)

Assignment operator for implicit type conversion to VT_Int8

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [10/14]

Variant & a_util::variant::Variant::operator= ( std::uint16_t value)

Assignment operator for implicit type conversion to VT_UInt16

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [11/14]

Variant & a_util::variant::Variant::operator= ( std::uint32_t value)

Assignment operator for implicit type conversion to VT_UInt32

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [12/14]

Variant & a_util::variant::Variant::operator= ( std::uint64_t value)

Assignment operator for implicit type conversion to VT_UInt64

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [13/14]

Variant & a_util::variant::Variant::operator= ( std::uint8_t value)

Assignment operator for implicit type conversion to VT_UInt8

Parameters
[in]valueOther value to assign *this from
Returns
*this

◆ operator=() [14/14]

Variant & a_util::variant::Variant::operator= ( Variant && other)
noexcept

Move assignment

Parameters
[in,out]otherMoved-from object *this is assigned from. Left in a valid but unspecified state. Should not be used after this assignment operator returns.
Return values
*this

◆ reset() [1/23]

void a_util::variant::Variant::reset ( bool value)

Resets the instance to VT_Bool

Parameters
[in]valueValue of the variant

◆ reset() [2/23]

void a_util::variant::Variant::reset ( const bool * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_Bool

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [3/23]

void a_util::variant::Variant::reset ( const char * value)

Resets the instance to VT_String

Parameters
[in]valueValue of the variant

◆ reset() [4/23]

void a_util::variant::Variant::reset ( const double * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_Double

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [5/23]

void a_util::variant::Variant::reset ( const float * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_Float

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [6/23]

void a_util::variant::Variant::reset ( const std::int16_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_Int16

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [7/23]

void a_util::variant::Variant::reset ( const std::int32_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_Int32

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [8/23]

void a_util::variant::Variant::reset ( const std::int64_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_Int64

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [9/23]

void a_util::variant::Variant::reset ( const std::int8_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_Int8

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [10/23]

void a_util::variant::Variant::reset ( const std::uint16_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_UInt16

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [11/23]

void a_util::variant::Variant::reset ( const std::uint32_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_UInt32

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [12/23]

void a_util::variant::Variant::reset ( const std::uint64_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_UInt64

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [13/23]

void a_util::variant::Variant::reset ( const std::uint8_t * array_storage,
std::size_t array_size )

Resets the instance to an array of VT_UInt8

Parameters
[in]array_storagePointer to begin of the array
[in]array_sizeSize of the array array_storage points to
Exceptions
std::invalid_argumentif either array_storage is nullptr or array_size is zero

◆ reset() [14/23]

void a_util::variant::Variant::reset ( double value)

Resets the instance to VT_Double

Parameters
[in]valueValue of the variant

◆ reset() [15/23]

void a_util::variant::Variant::reset ( float value)

Resets the instance to VT_Float

Parameters
[in]valueValue of the variant

◆ reset() [16/23]

void a_util::variant::Variant::reset ( std::int16_t value)

Resets the instance to VT_Int16

Parameters
[in]valueValue of the variant

◆ reset() [17/23]

void a_util::variant::Variant::reset ( std::int32_t value)

Resets the instance to VT_Int32

Parameters
[in]valueValue of the variant

◆ reset() [18/23]

void a_util::variant::Variant::reset ( std::int64_t value)

Resets the instance to VT_Int64

Parameters
[in]valueValue of the variant

◆ reset() [19/23]

void a_util::variant::Variant::reset ( std::int8_t value)

Resets the instance to VT_Int8

Parameters
[in]valueValue of the variant

◆ reset() [20/23]

void a_util::variant::Variant::reset ( std::uint16_t value)

Resets the instance to VT_UInt16

Parameters
[in]valueValue of the variant

◆ reset() [21/23]

void a_util::variant::Variant::reset ( std::uint32_t value)

Resets the instance to VT_UInt32

Parameters
[in]valueValue of the variant

◆ reset() [22/23]

void a_util::variant::Variant::reset ( std::uint64_t value)

Resets the instance to VT_UInt64

Parameters
[in]valueValue of the variant

◆ reset() [23/23]

void a_util::variant::Variant::reset ( std::uint8_t value)

Resets the instance to VT_UInt8

Parameters
[in]valueValue of the variant

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const Variant & lhs,
const Variant & rhs )
friend

Compare for equality

Parameters
[in]lhsLeft hand side operand
[in]rhsRight hand side operand
Returns
true if both are equal, false otherwise

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