ADTF
cVariant

Variant class which can handle all base data types. More...

Public Member Functions

 cVariant ()
 Constructor that initializes an empty cVariant object.
 
 cVariant (const cVariant &oVariant)
 Constructor that initializes the variant with an existing cVariant object. More...
 
 cVariant (tBool Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tInt8 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tUInt8 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tInt16 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tUInt16 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tInt32 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tUInt32 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tInt64 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tUInt64 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tFloat32 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (tFloat64 Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (const cString &Value)
 Constructor that initializes the variant with a certain type and value. More...
 
 cVariant (const tChar *Value)
 Constructor that initializes the variant with a certain type and value. More...
 
virtual ~cVariant ()
 Destructor.
 
tVoid Clear ()
 Frees all internal buffers used by the cVariant object and mark the instance as empty. More...
 
tVariantType GetType () const
 This function returns the variant type. More...
 
tSize GetArraySize () const
 This function returns the size of an array type variant. More...
 
tVoid Set (const cVariant &oVariant)
 Assigns a new value to a cVariant object. More...
 
tVoid Set (tBool Value)
 Sets the variant value and the type. More...
 
tVoid Set (tInt8 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tUInt8 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tInt16 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tUInt16 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tInt32 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tUInt32 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tInt64 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tUInt64 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tFloat32 Value)
 Sets the variant value and the type. More...
 
tVoid Set (tFloat64 Value)
 Sets the variant value and the type. More...
 
tVoid Set (const cString &Value)
 Sets the variant value and the type. More...
 
tVoid Set (const tChar *Value)
 Sets the variant value and the type. More...
 
tVoid Set (tInt8 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tUInt8 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tInt16 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tUInt16 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tInt32 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tUInt32 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tInt64 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tUInt64 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tFloat32 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tVoid Set (tFloat64 *pArray, tSize nSize)
 Assigns an array as variant value and sets the variant type. More...
 
tBool GetBool (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tInt8 GetInt8 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tUInt8 GetUInt8 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tInt16 GetInt16 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tUInt16 GetUInt16 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tInt32 GetInt32 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tUInt32 GetUInt32 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tInt64 GetInt64 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tUInt64 GetUInt64 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tInt GetInt (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tUInt GetUInt (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tFloat32 GetFloat32 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tFloat64 GetFloat64 (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tFloat64 GetFloat (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
const tCharGetStringPtr (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
cString GetString (tBool *pIsOk=nullptr) const
 Get variant value as TYPE. More...
 
tInt32 AsInt (tBool *pIsOk=nullptr) const
 Converts the variant value to tInt if neccessary. More...
 
tFloat64 AsFloat (tBool *pIsOk=nullptr) const
 Converts the variant value to tFloat64 if neccessary. More...
 
cString AsString (tBool *pIsOk=nullptr) const
 Converts the variant value to cString if neccessary. More...
 
const tBoolGetBoolArray () const
 Get pointer to the array buffer. More...
 
const tInt8GetInt8Array () const
 Get pointer to the array buffer. More...
 
const tUInt8GetUInt8Array () const
 Get pointer to the array buffer. More...
 
const tInt16GetInt16Array () const
 Get pointer to the array buffer. More...
 
const tUInt16GetUInt16Array () const
 Get pointer to the array buffer. More...
 
const tInt32GetInt32Array () const
 Get pointer to the array buffer. More...
 
const tUInt32GetUInt32Array () const
 Get pointer to the array buffer. More...
 
const tInt64GetInt64Array () const
 Get pointer to the array buffer. More...
 
const tUInt64GetUInt64Array () const
 Get pointer to the array buffer. More...
 
const tIntGetIntArray () const
 Get pointer to the array buffer. More...
 
const tUIntGetUIntArray () const
 Get pointer to the array buffer. More...
 
const tFloat32GetFloat32Array () const
 Get pointer to the array buffer. More...
 
const tFloat64GetFloat64Array () const
 Get pointer to the array buffer. More...
 
tVoidGetArray () const
 Get pointer to the array buffer. More...
 
tBool IsArray () const
 This function checks, if the variant is an array. More...
 
tBool IsInt () const
 This function checks, if the variant is an integer, that is (U)Int(8/16/32/64) More...
 
tBool IsFloat () const
 This function checks, if the variant is a float, that is tFloat(32,64). More...
 
tBool IsBool () const
 This function checks, if the variant is a bool. More...
 
tBool IsString () const
 This function checks, if the variant is a string. More...
 
tBool IsIntArray () const
 This function checks, if the variant is an integer [ (U)Int(8/16/32/64) ] array. More...
 
tBool IsFloatArray () const
 This function checks, if the variant is a float [ tFloat(32/36) ] array. More...
 
tBool IsStringArray () const
 This function checks, if the variant is a string array. More...
 
tBool IsEmpty () const
 This function checks, if the variant object is empty. More...
 
 operator tBool () const
 Get variant value as TYPE. More...
 
 operator tInt8 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tUInt8 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tInt16 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tUInt16 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tInt32 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tUInt32 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tInt64 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tUInt64 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tFloat32 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator tFloat64 () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator const cString () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
 operator const tChar * () const
 The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent). More...
 
cVariantoperator= (const cVariant &Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tBool Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tInt8 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tUInt8 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tInt16 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tUInt16 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tInt32 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tUInt32 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tInt64 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tUInt64 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tFloat32 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tFloat64 Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const cString &Value)
 Sets the variant value and the type. More...
 
cVariantoperator= (const tChar *Value)
 Sets the variant value and the type. More...
 

Static Public Member Functions

static tResult Serialize (cVariant &oVariant, tVoid *pWriteBuffer, tSize szSize, tSize *pszWriteSize=nullptr)
 Serialization method. More...
 
static tResult Deserialize (cVariant &oVariant, tVoid *pReadBuffer, tSize szSize, tSize *pszReadSize=nullptr)
 Deserialization method. More...
 

Static Public Attributes

static const cVariant vEmpty
 Empty variant.
 

Protected Member Functions

tVoid Initialize ()
 Initializes the object. More...
 
tVoid Free ()
 Frees internally used memory structures. More...
 

Protected Attributes

tVariantType m_Type
 The actual type of this instance.
 
union {
   tBool   bool_val
 The actual instance is a tBool.
 
   tInt8   int8_val
 The actual instance is a tInt8.
 
   tUInt8   uint8_val
 The actual instance is a tUInt8.
 
   tInt16   int16_val
 The actual instance is a tInt16.
 
   tUInt16   uint16_val
 The actual instance is a tUIn16.
 
   tInt32   int32_val
 The actual instance is a tInt32.
 
   tUInt32   uint32_val
 The actual instance is a tUIn32.
 
   tInt64   int64_val
 The actual instance is a tInt64.
 
   tUInt64   uint64_val
 The actual instance is a tUInt64.
 
   tFloat32   float32_val
 The actual instance is a tFloat32.
 
   tFloat64   float64_val
 The actual instance is a tFloat64.
 
   tBool *   bool_array
 The actual instance is a tBool array.
 
   tInt8 *   int8_array
 The actual instance is a tInt8 array.
 
   tUInt8 *   uint8_array
 The actual instance is a tUInt8 array.
 
   tInt16 *   int16_array
 The actual instance is a tInt16 array.
 
   tUInt16 *   uint16_array
 The actual instance is a tUIn16 array.
 
   tInt32 *   int32_array
 The actual instance is a tInt32 array.
 
   tUInt32 *   uint32_array
 The actual instance is a tUIn32 array.
 
   tInt64 *   int64_array
 The actual instance is a tInt64 array.
 
   tUInt64 *   uint64_array
 The actual instance is a tUInt64 array.
 
   tFloat32 *   float32_array
 The actual instance is a tFloat32 array.
 
   tFloat64 *   float64_array
 The actual instance is a tFloat64 array.
 
m_Data
 The actual data. More...
 
cString m_strBuffer
 Internal buffer.
 
tSize m_nArraySize
 Size of array.
 

Static Protected Attributes

static const tUInt8 m_ui8Version
 Not yet used.
 

Detailed Description

Variant class which can handle all base data types.

The variant is classified using the type set to m_Type which is initialized with one of the tVariantType values.

Definition at line 43 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/core/variant.h.

Constructor & Destructor Documentation

◆ cVariant() [1/14]

cVariant ( const cVariant oVariant)

Constructor that initializes the variant with an existing cVariant object.

Parameters
oVariant[in] An existing cVariant object to be copied into this object.

◆ cVariant() [2/14]

cVariant ( tBool  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [3/14]

cVariant ( tInt8  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [4/14]

cVariant ( tUInt8  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [5/14]

cVariant ( tInt16  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [6/14]

cVariant ( tUInt16  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [7/14]

cVariant ( tInt32  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [8/14]

cVariant ( tUInt32  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [9/14]

cVariant ( tInt64  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [10/14]

cVariant ( tUInt64  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [11/14]

cVariant ( tFloat32  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [12/14]

cVariant ( tFloat64  Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [13/14]

cVariant ( const cString Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

◆ cVariant() [14/14]

cVariant ( const tChar Value)

Constructor that initializes the variant with a certain type and value.

Parameters
Value[in] Value to initialize the variant with.

Member Function Documentation

◆ AsFloat()

tFloat64 AsFloat ( tBool pIsOk = nullptr) const

Converts the variant value to tFloat64 if neccessary.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
tFloat64 value of the cVariant object.

◆ AsInt()

tInt32 AsInt ( tBool pIsOk = nullptr) const

Converts the variant value to tInt if neccessary.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
tInt32 value of the cVariant object.

◆ AsString()

cString AsString ( tBool pIsOk = nullptr) const

Converts the variant value to cString if neccessary.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
cString object of the cVariant object.

◆ Clear()

tVoid Clear ( )

Frees all internal buffers used by the cVariant object and mark the instance as empty.

Returns
void

◆ Deserialize()

static tResult Deserialize ( cVariant oVariant,
tVoid pReadBuffer,
tSize  szSize,
tSize pszReadSize = nullptr 
)
static

Deserialization method.

Parameters
oVariant[out] Variant to deserialize.
pReadBuffer[in] Buffer to read from.
szSize[in] Size of buffer.
pszReadSize[out] Read bytes.
Returns
Standard result code.

◆ Free()

tVoid Free ( )
protected

Frees internally used memory structures.

Returns
void

◆ GetArray()

tVoid* GetArray ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetArraySize()

tSize GetArraySize ( ) const

This function returns the size of an array type variant.

Returns
Returns the number of elements of the variant array.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetBool()

tBool GetBool ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetBoolArray()

const tBool* GetBoolArray ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetFloat()

tFloat64 GetFloat ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetFloat32()

tFloat32 GetFloat32 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetFloat32Array()

const tFloat32* GetFloat32Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetFloat64()

tFloat64 GetFloat64 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetFloat64Array()

const tFloat64* GetFloat64Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetInt()

tInt GetInt ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetInt16()

tInt16 GetInt16 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetInt16Array()

const tInt16* GetInt16Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetInt32()

tInt32 GetInt32 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetInt32Array()

const tInt32* GetInt32Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetInt64()

tInt64 GetInt64 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetInt64Array()

const tInt64* GetInt64Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetInt8()

tInt8 GetInt8 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetInt8Array()

const tInt8* GetInt8Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetIntArray()

const tInt* GetIntArray ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetString()

cString GetString ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetStringPtr()

const tChar* GetStringPtr ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetType()

tVariantType GetType ( ) const

This function returns the variant type.

Returns
tVariantType value containing the type identifier of the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetUInt()

tUInt GetUInt ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetUInt16()

tUInt16 GetUInt16 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetUInt16Array()

const tUInt16* GetUInt16Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetUInt32()

tUInt32 GetUInt32 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetUInt32Array()

const tUInt32* GetUInt32Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetUInt64()

tUInt64 GetUInt64 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetUInt64Array()

const tUInt64* GetUInt64Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetUInt8()

tUInt8 GetUInt8 ( tBool pIsOk = nullptr) const

Get variant value as TYPE.

Parameters
pIsOk[out] Bool value to check if the conversion was successful.
Returns
Value of the cVariant object.

◆ GetUInt8Array()

const tUInt8* GetUInt8Array ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetUIntArray()

const tUInt* GetUIntArray ( ) const

Get pointer to the array buffer.

Returns
Pointer to array managed by the cVariant object.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ Initialize()

tVoid Initialize ( )
protected

Initializes the object.

Returns
void

◆ IsArray()

tBool IsArray ( ) const

This function checks, if the variant is an array.

Returns
bool value that is tTrue, if the object is an array.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsBool()

tBool IsBool ( ) const

This function checks, if the variant is a bool.

Returns
bool value that is tTrue if the object is a tBool.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsEmpty()

tBool IsEmpty ( ) const

This function checks, if the variant object is empty.

Returns
bool value that is tTrue, if the string object is empty.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsFloat()

tBool IsFloat ( ) const

This function checks, if the variant is a float, that is tFloat(32,64).

Returns
bool value that is tTrue, if the object is a float.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsFloatArray()

tBool IsFloatArray ( ) const

This function checks, if the variant is a float [ tFloat(32/36) ] array.

Returns
bool value that is tTrue, if the object is a float array.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsInt()

tBool IsInt ( ) const

This function checks, if the variant is an integer, that is (U)Int(8/16/32/64)

Returns
bool value that is tTrue, if the object is an as defined above.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsIntArray()

tBool IsIntArray ( ) const

This function checks, if the variant is an integer [ (U)Int(8/16/32/64) ] array.

Returns
bool value that is tTrue, if the object is an int array.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsString()

tBool IsString ( ) const

This function checks, if the variant is a string.

Returns
bool value that is tTrue, if the object is a string.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsStringArray()

tBool IsStringArray ( ) const

This function checks, if the variant is a string array.

Returns
bool value that is tTrue, if the object is a string array.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ operator const cString()

operator const cString ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator const tChar *()

operator const tChar * ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tBool()

operator tBool ( ) const

Get variant value as TYPE.

Returns
Value of the cVariant object.

◆ operator tFloat32()

operator tFloat32 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tFloat64()

operator tFloat64 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tInt16()

operator tInt16 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tInt32()

operator tInt32 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tInt64()

operator tInt64 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tInt8()

operator tInt8 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tUInt16()

operator tUInt16 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tUInt32()

operator tUInt32 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tUInt64()

operator tUInt64 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator tUInt8()

operator tUInt8 ( ) const

The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

◆ operator=() [1/14]

cVariant& operator= ( const cString Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [2/14]

cVariant& operator= ( const cVariant Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
Reference to current object

◆ operator=() [3/14]

cVariant& operator= ( const tBool  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [4/14]

cVariant& operator= ( const tChar Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [5/14]

cVariant& operator= ( const tFloat32  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [6/14]

cVariant& operator= ( const tFloat64  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [7/14]

cVariant& operator= ( const tInt16  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [8/14]

cVariant& operator= ( const tInt32  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [9/14]

cVariant& operator= ( const tInt64  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [10/14]

cVariant& operator= ( const tInt8  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [11/14]

cVariant& operator= ( const tUInt16  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [12/14]

cVariant& operator= ( const tUInt32  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [13/14]

cVariant& operator= ( const tUInt64  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ operator=() [14/14]

cVariant& operator= ( const tUInt8  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Serialize()

static tResult Serialize ( cVariant oVariant,
tVoid pWriteBuffer,
tSize  szSize,
tSize pszWriteSize = nullptr 
)
static

Serialization method.

Parameters
oVariant[in] Variant to serialize.
pWriteBuffer[out] Buffer to write to.
szSize[in] Size of buffer.
pszWriteSize[out] Written bytes.
Returns
Standard result code.

◆ Set() [1/24]

tVoid Set ( const cString Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [2/24]

tVoid Set ( const cVariant oVariant)

Assigns a new value to a cVariant object.

Parameters
oVariant[in] Variant value to be assigned.
Returns
void

◆ Set() [3/24]

tVoid Set ( const tChar Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [4/24]

tVoid Set ( tBool  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [5/24]

tVoid Set ( tFloat32 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [6/24]

tVoid Set ( tFloat32  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [7/24]

tVoid Set ( tFloat64 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [8/24]

tVoid Set ( tFloat64  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [9/24]

tVoid Set ( tInt16 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [10/24]

tVoid Set ( tInt16  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [11/24]

tVoid Set ( tInt32 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [12/24]

tVoid Set ( tInt32  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [13/24]

tVoid Set ( tInt64 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [14/24]

tVoid Set ( tInt64  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [15/24]

tVoid Set ( tInt8 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [16/24]

tVoid Set ( tInt8  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [17/24]

tVoid Set ( tUInt16 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [18/24]

tVoid Set ( tUInt16  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [19/24]

tVoid Set ( tUInt32 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [20/24]

tVoid Set ( tUInt32  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [21/24]

tVoid Set ( tUInt64 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [22/24]

tVoid Set ( tUInt64  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

◆ Set() [23/24]

tVoid Set ( tUInt8 pArray,
tSize  nSize 
)

Assigns an array as variant value and sets the variant type.

Parameters
pArray[in] Array to be assigned to the variant.
nSize[in] Element count of the array.
Returns
void

◆ Set() [24/24]

tVoid Set ( tUInt8  Value)

Sets the variant value and the type.

Parameters
Value[in] Value to be assigned to the variant.
Returns
void

Member Data Documentation

◆ 

union { ... } m_Data

The actual data.

The actual data