Nebula
Loading...
Searching...
No Matches
Util::Variant Class Reference

#include <variant.h>

Detailed Description

An "any type" variable.

Since the Variant class has a rich set of assignment and cast operators, a variant variable can most of the time be used like a normal C++ variable.

Public Types

enum  Type {
  Void , Byte , Short , UShort ,
  Int , UInt , Int64 , UInt64 ,
  Float , Double , Bool , Vec2 ,
  Vec3 , Vec4 , Quaternion , String ,
  Mat4 , Transform44 , Blob , Guid ,
  Object , VoidPtr , IntArray , FloatArray ,
  BoolArray , Vec2Array , Vec3Array , Vec4Array ,
  StringArray , Mat4Array , BlobArray , GuidArray ,
  NumTypes
}
 variant types More...
 

Public Member Functions

 Variant ()
 default constructor
 
 Variant (byte rhs)
 byte constructor
 
 Variant (short rhs)
 short constructor
 
 Variant (ushort rhs)
 ushort constructor
 
 Variant (int rhs)
 int constructor
 
 Variant (uint rhs)
 uint constructor
 
 Variant (int64_t rhs)
 int64 constructor
 
 Variant (uint64_t rhs)
 uint64 constructor
 
 Variant (float rhs)
 float constructor
 
 Variant (double rhs)
 double constructor
 
 Variant (bool rhs)
 bool constructor
 
 Variant (const Math::vec2 &v)
 vec2 constructor
 
 Variant (const Math::vec3 &v)
 vec4 constructor
 
 Variant (const Math::vec4 &v)
 vec4 constructor
 
 Variant (const Math::quat &q)
 quaternion constructor
 
 Variant (const Math::mat4 &m)
 mat4 constructor
 
 Variant (const Math::transform44 &m)
 transform44 constructor
 
 Variant (const Util::String &rhs)
 string constructor
 
 Variant (const Util::Blob &blob)
 blob constructor
 
 Variant (const Util::Guid &guid)
 guid constructor
 
 Variant (const char *chrPtr)
 const char constructor
 
 Variant (Core::RefCounted *ptr)
 object constructor
 
 Variant (void *ptr)
 void pointer constructor
 
 Variant (std::nullptr_t)
 null pointer construction
 
 Variant (const Util::Array< int > &rhs)
 int array constructor
 
 Variant (const Util::Array< float > &rhs)
 float array constructor
 
 Variant (const Util::Array< bool > &rhs)
 bool array constructor
 
 Variant (const Util::Array< Math::vec2 > &rhs)
 vec2 array constructor
 
 Variant (const Util::Array< Math::vec3 > &rhs)
 vec3 array constructor
 
 Variant (const Util::Array< Math::vec4 > &rhs)
 vec4 array constructor
 
 Variant (const Util::Array< Math::mat4 > &rhs)
 mat4 array constructor
 
 Variant (const Util::Array< Util::String > &rhs)
 string array constructor
 
 Variant (const Util::Array< Util::Blob > &rhs)
 blob array constructor
 
 Variant (const Util::Array< Util::Guid > &rhs)
 guid array constructor
 
 Variant (const Variant &rhs)
 copy constructor
 
 ~Variant ()
 destructor
 
void SetType (Type t)
 set type of attribute
 
Type GetType () const
 get type
 
void Clear ()
 clear content, resets type to void
 
void operator= (const Variant &rhs)
 assignment operator
 
void operator= (byte val)
 byte assignment operator
 
void operator= (short val)
 short assignment operator
 
void operator= (ushort val)
 ushort assignment operator
 
void operator= (int val)
 int assignment operator
 
void operator= (uint val)
 uint assignment operator
 
void operator= (int64_t val)
 int assignment operator
 
void operator= (uint64_t val)
 uint assignment operator
 
void operator= (float val)
 float assignment operator
 
void operator= (double val)
 double assignment operator
 
void operator= (bool val)
 bool assigment operator
 
void operator= (const Math::vec2 &val)
 vec2 assignment operator
 
void operator= (const Math::vec3 &val)
 vec3 assignment operator
 
void operator= (const Math::vec4 &val)
 vec4 assignment operator
 
void operator= (const Math::quat &val)
 quat assignment operator
 
void operator= (const Math::mat4 &val)
 mat4 assignment operator
 
void operator= (const Math::transform44 &val)
 transform44 assignment operator
 
void operator= (const Util::String &s)
 string assignment operator
 
void operator= (const Util::Blob &val)
 blob assignment operator
 
void operator= (const Util::Guid &val)
 guid assignment operator
 
void operator= (const char *chrPtr)
 char pointer assignment
 
void operator= (Core::RefCounted *ptr)
 object assignment
 
void operator= (void *ptr)
 object assignment
 
void operator= (const Util::Array< int > &rhs)
 int array assignment
 
void operator= (const Util::Array< float > &rhs)
 float array assignment
 
void operator= (const Util::Array< bool > &rhs)
 bool array assignment
 
void operator= (const Util::Array< Math::vec2 > &rhs)
 vec2 array assignment
 
void operator= (const Util::Array< Math::vec3 > &rhs)
 vec3 array assignment
 
void operator= (const Util::Array< Math::vec4 > &rhs)
 vec4 array assignment
 
void operator= (const Util::Array< Math::mat4 > &rhs)
 mat4 array assignment
 
void operator= (const Util::Array< Util::String > &rhs)
 string array assignment
 
void operator= (const Util::Array< Util::Blob > &rhs)
 blob array assignment
 
void operator= (const Util::Array< Util::Guid > &rhs)
 guid array assignment
 
bool operator== (const Variant &rhs) const
 equality operator
 
bool operator== (byte rhs) const
 byte equality operator
 
bool operator== (short rhs) const
 short equality operator
 
bool operator== (ushort rhs) const
 ushort equality operator
 
bool operator== (int rhs) const
 int equality operator
 
bool operator== (uint rhs) const
 uint equality operator
 
bool operator== (int64_t rhs) const
 int equality operator
 
bool operator== (uint64_t rhs) const
 uint equality operator
 
bool operator== (float rhs) const
 float equality operator
 
bool operator== (double rhs) const
 double equality operator
 
bool operator== (bool rhs) const
 bool equality operator
 
bool operator== (const Math::vec2 &rhs) const
 vec2 equality operator
 
bool operator== (const Math::vec4 &rhs) const
 vec4 equality operator
 
bool operator== (const Math::quat &rhs) const
 vec4 equality operator
 
bool operator== (const Util::String &rhs) const
 string equality operator
 
bool operator== (const Util::Guid &rhs) const
 guid equality operator
 
bool operator== (const char *chrPtr) const
 char ptr equality operator
 
bool operator== (Core::RefCounted *ptr) const
 pointer equality operator
 
bool operator== (void *ptr) const
 pointer equality operator
 
bool operator!= (const Variant &rhs) const
 inequality operator
 
bool operator!= (byte rhs) const
 byte inequality operator
 
bool operator!= (short rhs) const
 short inequality operator
 
bool operator!= (ushort rhs) const
 ushort inequality operator
 
bool operator!= (int rhs) const
 int inequality operator
 
bool operator!= (uint rhs) const
 uint inequality operator
 
bool operator!= (int64_t rhs) const
 int inequality operator
 
bool operator!= (uint64_t rhs) const
 uint inequality operator
 
bool operator!= (float rhs) const
 float inequality operator
 
bool operator!= (double rhs) const
 double inequality operator
 
bool operator!= (bool rhs) const
 bool inequality operator
 
bool operator!= (const Math::vec2 &rhs) const
 vec2 inequality operator
 
bool operator!= (const Math::vec4 &rhs) const
 vec4 inequality operator
 
bool operator!= (const Math::quat &rhs) const
 quaternion inequality operator
 
bool operator!= (const Util::String &rhs) const
 string inequality operator
 
bool operator!= (const Util::Guid &rhs) const
 guid inequality operator
 
bool operator!= (const char *chrPtr) const
 char ptr inequality operator
 
bool operator!= (Core::RefCounted *ptr) const
 pointer equality operator
 
bool operator!= (void *ptr) const
 pointer equality operator
 
bool operator> (const Variant &rhs) const
 greater operator
 
bool operator< (const Variant &rhs) const
 less operator
 
bool operator>= (const Variant &rhs) const
 greater equal operator
 
bool operator<= (const Variant &rhs) const
 less equal operator
 
void SetByte (byte val)
 set byte content
 
byte GetByte () const
 get byte content
 
void SetShort (short val)
 set short content
 
short GetShort () const
 get short content
 
void SetUShort (ushort val)
 set ushort content
 
ushort GetUShort () const
 get short content
 
void SetInt (int val)
 set integer content
 
int GetInt () const
 get integer content
 
void SetUInt (uint val)
 set unsigned integer content
 
uint GetUInt () const
 get unsigned integer content
 
void SetInt64 (int64_t val)
 set integer content
 
int64_t GetInt64 () const
 get integer content
 
void SetUInt64 (uint64_t val)
 set unsigned integer content
 
uint64_t GetUInt64 () const
 get unsigned integer content
 
void SetFloat (float val)
 set float content
 
float GetFloat () const
 get float content
 
void SetDouble (double val)
 set double content
 
double GetDouble () const
 get double content
 
void SetBool (bool val)
 set bool content
 
bool GetBool () const
 get bool content
 
void SetString (const Util::String &val)
 set string content
 
const Util::StringGetString () const
 get string content
 
void SetVec2 (const Math::vec2 &val)
 set vec2 content
 
Math::vec2 GetVec2 () const
 get vec2 content
 
void SetVec3 (const Math::vec3 &val)
 set vec4 content
 
Math::vec3 GetVec3 () const
 get vec4 content
 
void SetVec4 (const Math::vec4 &val)
 set vec4 content
 
Math::vec4 GetVec4 () const
 get vec4 content
 
void SetQuat (const Math::quat &val)
 set quaternion content
 
Math::quat GetQuat () const
 get quaternion content
 
void SetMat4 (const Math::mat4 &val)
 set mat4 content
 
const Math::mat4GetMat4 () const
 get mat4 content
 
void SetTransform44 (const Math::transform44 &val)
 set transform44 content
 
const Math::transform44GetTransform44 () const
 get transform44 content
 
void SetBlob (const Util::Blob &val)
 set blob
 
const Util::BlobGetBlob () const
 get blob
 
void SetGuid (const Util::Guid &val)
 set guid content
 
const Util::GuidGetGuid () const
 get guid content
 
void SetObject (Core::RefCounted *ptr)
 set object pointer
 
Core::RefCountedGetObject () const
 get object pointer
 
void SetVoidPtr (void *ptr)
 set opaque void pointer
 
void * GetVoidPtr () const
 get void pointer
 
void SetIntArray (const Util::Array< int > &val)
 set int array content
 
const Util::Array< int > & GetIntArray () const
 get int array content
 
void SetFloatArray (const Util::Array< float > &val)
 set float array content
 
const Util::Array< float > & GetFloatArray () const
 get float array content
 
void SetBoolArray (const Util::Array< bool > &val)
 set bool array content
 
const Util::Array< bool > & GetBoolArray () const
 get bool array content
 
void SetVec2Array (const Util::Array< Math::vec2 > &val)
 set vec2 array content
 
const Util::Array< Math::vec2 > & GetVec2Array () const
 get vec2 array content
 
void SetVec3Array (const Util::Array< Math::vec3 > &val)
 set vec4 array content
 
const Util::Array< Math::vec3 > & GetVec3Array () const
 get vec4 array content
 
void SetVec4Array (const Util::Array< Math::vec4 > &val)
 set vec4 array content
 
const Util::Array< Math::vec4 > & GetVec4Array () const
 get vec4 array content
 
void SetMat4Array (const Util::Array< Math::mat4 > &val)
 set mat4 array content
 
const Util::Array< Math::mat4 > & GetMat4Array () const
 get mat4 array content
 
void SetStringArray (const Util::Array< Util::String > &val)
 set string array content
 
const Util::Array< Util::String > & GetStringArray () const
 get string array content
 
void SetGuidArray (const Util::Array< Util::Guid > &val)
 set guid array content
 
const Util::Array< Util::Guid > & GetGuidArray () const
 get guid array content
 
void SetBlobArray (const Util::Array< Util::Blob > &val)
 set blob array content
 
const Util::Array< Util::Blob > & GetBlobArray () const
 get blob array content
 
template<typename TYPE >
TYPE Get () const
 Templated get method.
 
Util::String ToString () const
 convert value to string
 
bool SetParseString (const Util::String &string)
 set value from string, if type doesn't match, returns false
 
const SizeT Size () const
 get size of data
 
const void * AsVoidPtr () const
 get pointer to data
 
template<>
byte Get () const
 
template<>
short Get () const
 
template<>
int Get () const
 
template<>
uint Get () const
 
template<>
int64_t Get () const
 
template<>
uint64_t Get () const
 
template<>
bool Get () const
 
template<>
double Get () const
 
template<>
float Get () const
 
template<>
Math::vec2 Get () const
 
template<>
Math::vec3 Get () const
 
template<>
Math::vec4 Get () const
 
template<>
Math::quat Get () const
 
template<>
Math::mat4 Get () const
 
template<>
Math::transform44 Get () const
 
template<>
Util::String Get () const
 
template<>
Util::Guid Get () const
 
template<>
Util::Blob Get () const
 
template<>
Util::Array< int > Get () const
 
template<>
Util::Array< float > Get () const
 
template<>
Util::Array< bool > Get () const
 
template<>
Util::Array< Math::vec2Get () const
 
template<>
Util::Array< Math::vec3Get () const
 
template<>
Util::Array< Math::vec4Get () const
 
template<>
Util::Array< Math::mat4Get () const
 
template<>
Util::Array< Util::StringGet () const
 
template<>
Util::Array< Util::GuidGet () const
 
template<>
Util::Array< Util::BlobGet () const
 

Static Public Member Functions

static Variant FromString (const Util::String &string)
 create from string
 
static Util::String TypeToString (Type t)
 convert type to string
 
static Type StringToType (const Util::String &str)
 convert string to type
 

Private Member Functions

void Delete ()
 delete current content
 
void Copy (const Variant &rhs)
 copy current content
 

Private Attributes

Type type
 
union { 
 
   byte   i8 
 
   short   i16 
 
   ushort   ui16 
 
   int   i 
 
   uint   u 
 
   int64_t   i64 
 
   uint64_t   u64 
 
   bool   b 
 
   double   d 
 
   float   f [4] 
 
   Math::mat4 *   m 
 
   Math::transform44 *   t 
 
   Util::String *   string 
 
   Util::Guid *   guid 
 
   Util::Blob *   blob 
 
   void *   voidPtr 
 
   Core::RefCounted *   object 
 
   Util::Array< int > *   intArray 
 
   Util::Array< float > *   floatArray 
 
   Util::Array< bool > *   boolArray 
 
   Util::Array< Math::vec2 > *   vec2Array 
 
   Util::Array< Math::vec3 > *   float3Array 
 
   Util::Array< Math::vec4 > *   vec4Array 
 
   Util::Array< Math::mat4 > *   mat4Array 
 
   Util::Array< Util::String > *   stringArray 
 
   Util::Array< Util::Guid > *   guidArray 
 
   Util::Array< Util::Blob > *   blobArray 
 
};  
 

Member Enumeration Documentation

◆ Type

variant types

Enumerator
Void 
Byte 
Short 
UShort 
Int 
UInt 
Int64 
UInt64 
Float 
Double 
Bool 
Vec2 
Vec3 
Vec4 
Quaternion 
String 
Mat4 
Transform44 
Blob 
Guid 
Object 
VoidPtr 
IntArray 
FloatArray 
BoolArray 
Vec2Array 
Vec3Array 
Vec4Array 
StringArray 
Mat4Array 
BlobArray 
GuidArray 
NumTypes 

Constructor & Destructor Documentation

◆ Variant() [1/35]

Util::Variant::Variant ( )
inline

default constructor

◆ Variant() [2/35]

Util::Variant::Variant ( byte rhs)
inline

byte constructor

◆ Variant() [3/35]

Util::Variant::Variant ( short rhs)
inline

short constructor

◆ Variant() [4/35]

Util::Variant::Variant ( ushort rhs)
inline

ushort constructor

◆ Variant() [5/35]

Util::Variant::Variant ( int rhs)
inline

int constructor

◆ Variant() [6/35]

Util::Variant::Variant ( uint rhs)
inline

uint constructor

◆ Variant() [7/35]

Util::Variant::Variant ( int64_t rhs)
inline

int64 constructor

◆ Variant() [8/35]

Util::Variant::Variant ( uint64_t rhs)
inline

uint64 constructor

◆ Variant() [9/35]

Util::Variant::Variant ( float rhs)
inline

float constructor

◆ Variant() [10/35]

Util::Variant::Variant ( double rhs)
inline

double constructor

◆ Variant() [11/35]

Util::Variant::Variant ( bool rhs)
inline

bool constructor

◆ Variant() [12/35]

Util::Variant::Variant ( const Math::vec2 & v)
inline

vec2 constructor

◆ Variant() [13/35]

Util::Variant::Variant ( const Math::vec3 & v)
inline

vec4 constructor

◆ Variant() [14/35]

Util::Variant::Variant ( const Math::vec4 & v)
inline

vec4 constructor

◆ Variant() [15/35]

Util::Variant::Variant ( const Math::quat & q)
inline

quaternion constructor

◆ Variant() [16/35]

Util::Variant::Variant ( const Math::mat4 & m)
inline

mat4 constructor

◆ Variant() [17/35]

Util::Variant::Variant ( const Math::transform44 & m)
inline

transform44 constructor

◆ Variant() [18/35]

Util::Variant::Variant ( const Util::String & rhs)
inline

string constructor

◆ Variant() [19/35]

Util::Variant::Variant ( const Util::Blob & blob)
inline

blob constructor

◆ Variant() [20/35]

Util::Variant::Variant ( const Util::Guid & guid)
inline

guid constructor

◆ Variant() [21/35]

Util::Variant::Variant ( const char * chrPtr)
inline

const char constructor

◆ Variant() [22/35]

Util::Variant::Variant ( Core::RefCounted * ptr)
inline

object constructor

◆ Variant() [23/35]

Util::Variant::Variant ( void * ptr)
inline

void pointer constructor

◆ Variant() [24/35]

Util::Variant::Variant ( std::nullptr_t )
inline

null pointer construction

◆ Variant() [25/35]

Util::Variant::Variant ( const Util::Array< int > & rhs)
inline

int array constructor

◆ Variant() [26/35]

Util::Variant::Variant ( const Util::Array< float > & rhs)
inline

float array constructor

◆ Variant() [27/35]

Util::Variant::Variant ( const Util::Array< bool > & rhs)
inline

bool array constructor

◆ Variant() [28/35]

Util::Variant::Variant ( const Util::Array< Math::vec2 > & rhs)
inline

vec2 array constructor

◆ Variant() [29/35]

Util::Variant::Variant ( const Util::Array< Math::vec3 > & rhs)
inline

vec3 array constructor

◆ Variant() [30/35]

Util::Variant::Variant ( const Util::Array< Math::vec4 > & rhs)
inline

vec4 array constructor

◆ Variant() [31/35]

Util::Variant::Variant ( const Util::Array< Math::mat4 > & rhs)
inline

mat4 array constructor

◆ Variant() [32/35]

Util::Variant::Variant ( const Util::Array< Util::String > & rhs)
inline

string array constructor

◆ Variant() [33/35]

Util::Variant::Variant ( const Util::Array< Util::Blob > & rhs)
inline

blob array constructor

◆ Variant() [34/35]

Util::Variant::Variant ( const Util::Array< Util::Guid > & rhs)
inline

guid array constructor

◆ Variant() [35/35]

Util::Variant::Variant ( const Variant & rhs)
inline

copy constructor

◆ ~Variant()

Util::Variant::~Variant ( )
inline

destructor

Member Function Documentation

◆ AsVoidPtr()

const void * Util::Variant::AsVoidPtr ( ) const
inline

get pointer to data

◆ Clear()

void Util::Variant::Clear ( )
inline

clear content, resets type to void

◆ Copy()

void Util::Variant::Copy ( const Variant & rhs)
inlineprivate

copy current content

◆ Delete()

void Util::Variant::Delete ( )
inlineprivate

delete current content

◆ FromString()

Variant Util::Variant::FromString ( const Util::String & string)
inlinestatic

create from string

Only some types can be inferred from string, everything else will be treated as a raw string.

◆ Get() [1/29]

template<typename TYPE >
TYPE Util::Variant::Get ( ) const
inline

Templated get method.

◆ Get() [2/29]

template<>
byte Util::Variant::Get ( ) const
inline

◆ Get() [3/29]

template<>
short Util::Variant::Get ( ) const
inline

◆ Get() [4/29]

template<>
int Util::Variant::Get ( ) const
inline

◆ Get() [5/29]

template<>
uint Util::Variant::Get ( ) const
inline

◆ Get() [6/29]

template<>
int64_t Util::Variant::Get ( ) const
inline

◆ Get() [7/29]

template<>
uint64_t Util::Variant::Get ( ) const
inline

◆ Get() [8/29]

template<>
bool Util::Variant::Get ( ) const
inline

◆ Get() [9/29]

template<>
double Util::Variant::Get ( ) const
inline

◆ Get() [10/29]

template<>
float Util::Variant::Get ( ) const
inline

◆ Get() [11/29]

template<>
Math::vec2 Util::Variant::Get ( ) const
inline

◆ Get() [12/29]

template<>
Math::vec3 Util::Variant::Get ( ) const
inline

◆ Get() [13/29]

template<>
Math::vec4 Util::Variant::Get ( ) const
inline

◆ Get() [14/29]

template<>
Math::quat Util::Variant::Get ( ) const
inline

◆ Get() [15/29]

template<>
Math::mat4 Util::Variant::Get ( ) const
inline

◆ Get() [16/29]

template<>
Math::transform44 Util::Variant::Get ( ) const
inline

◆ Get() [17/29]

template<>
Util::String Util::Variant::Get ( ) const
inline

◆ Get() [18/29]

template<>
Util::Guid Util::Variant::Get ( ) const
inline

◆ Get() [19/29]

template<>
Util::Blob Util::Variant::Get ( ) const
inline

◆ Get() [20/29]

template<>
Util::Array< int > Util::Variant::Get ( ) const
inline

◆ Get() [21/29]

template<>
Util::Array< float > Util::Variant::Get ( ) const
inline

◆ Get() [22/29]

template<>
Util::Array< bool > Util::Variant::Get ( ) const
inline

◆ Get() [23/29]

template<>
Util::Array< Math::vec2 > Util::Variant::Get ( ) const
inline

◆ Get() [24/29]

template<>
Util::Array< Math::vec3 > Util::Variant::Get ( ) const
inline

◆ Get() [25/29]

template<>
Util::Array< Math::vec4 > Util::Variant::Get ( ) const
inline

◆ Get() [26/29]

template<>
Util::Array< Math::mat4 > Util::Variant::Get ( ) const
inline

◆ Get() [27/29]

template<>
Util::Array< Util::String > Util::Variant::Get ( ) const
inline

◆ Get() [28/29]

template<>
Util::Array< Util::Guid > Util::Variant::Get ( ) const
inline

◆ Get() [29/29]

template<>
Util::Array< Util::Blob > Util::Variant::Get ( ) const
inline

◆ GetBlob()

const Util::Blob & Util::Variant::GetBlob ( ) const
inline

get blob

◆ GetBlobArray()

const Util::Array< Util::Blob > & Util::Variant::GetBlobArray ( ) const
inline

get blob array content

◆ GetBool()

bool Util::Variant::GetBool ( ) const
inline

get bool content

◆ GetBoolArray()

const Util::Array< bool > & Util::Variant::GetBoolArray ( ) const
inline

get bool array content

◆ GetByte()

byte Util::Variant::GetByte ( ) const
inline

get byte content

◆ GetDouble()

double Util::Variant::GetDouble ( ) const
inline

get double content

◆ GetFloat()

float Util::Variant::GetFloat ( ) const
inline

get float content

◆ GetFloatArray()

const Util::Array< float > & Util::Variant::GetFloatArray ( ) const
inline

get float array content

◆ GetGuid()

const Util::Guid & Util::Variant::GetGuid ( ) const
inline

get guid content

◆ GetGuidArray()

const Util::Array< Util::Guid > & Util::Variant::GetGuidArray ( ) const
inline

get guid array content

◆ GetInt()

int Util::Variant::GetInt ( ) const
inline

get integer content

◆ GetInt64()

int64_t Util::Variant::GetInt64 ( ) const
inline

get integer content

◆ GetIntArray()

const Util::Array< int > & Util::Variant::GetIntArray ( ) const
inline

get int array content

◆ GetMat4()

const Math::mat4 & Util::Variant::GetMat4 ( ) const
inline

get mat4 content

◆ GetMat4Array()

const Util::Array< Math::mat4 > & Util::Variant::GetMat4Array ( ) const
inline

get mat4 array content

◆ GetObject()

Core::RefCounted * Util::Variant::GetObject ( ) const
inline

get object pointer

◆ GetQuat()

Math::quat Util::Variant::GetQuat ( ) const
inline

get quaternion content

◆ GetShort()

short Util::Variant::GetShort ( ) const
inline

get short content

◆ GetString()

const Util::String & Util::Variant::GetString ( ) const
inline

get string content

◆ GetStringArray()

const Util::Array< Util::String > & Util::Variant::GetStringArray ( ) const
inline

get string array content

◆ GetTransform44()

const Math::transform44 & Util::Variant::GetTransform44 ( ) const
inline

get transform44 content

◆ GetType()

Variant::Type Util::Variant::GetType ( ) const
inline

get type

◆ GetUInt()

uint Util::Variant::GetUInt ( ) const
inline

get unsigned integer content

◆ GetUInt64()

uint64_t Util::Variant::GetUInt64 ( ) const
inline

get unsigned integer content

◆ GetUShort()

ushort Util::Variant::GetUShort ( ) const
inline

get short content

◆ GetVec2()

Math::vec2 Util::Variant::GetVec2 ( ) const
inline

get vec2 content

◆ GetVec2Array()

const Util::Array< Math::vec2 > & Util::Variant::GetVec2Array ( ) const
inline

get vec2 array content

◆ GetVec3()

Math::vec3 Util::Variant::GetVec3 ( ) const
inline

get vec4 content

◆ GetVec3Array()

const Util::Array< Math::vec3 > & Util::Variant::GetVec3Array ( ) const
inline

get vec4 array content

◆ GetVec4()

Math::vec4 Util::Variant::GetVec4 ( ) const
inline

get vec4 content

◆ GetVec4Array()

const Util::Array< Math::vec4 > & Util::Variant::GetVec4Array ( ) const
inline

get vec4 array content

◆ GetVoidPtr()

void * Util::Variant::GetVoidPtr ( ) const

get void pointer

◆ operator!=() [1/19]

bool Util::Variant::operator!= ( bool rhs) const
inline

bool inequality operator

◆ operator!=() [2/19]

bool Util::Variant::operator!= ( byte rhs) const
inline

byte inequality operator

◆ operator!=() [3/19]

bool Util::Variant::operator!= ( const char * chrPtr) const
inline

char ptr inequality operator

◆ operator!=() [4/19]

bool Util::Variant::operator!= ( const Math::quat & rhs) const
inline

quaternion inequality operator

◆ operator!=() [5/19]

bool Util::Variant::operator!= ( const Math::vec2 & rhs) const
inline

vec2 inequality operator

◆ operator!=() [6/19]

bool Util::Variant::operator!= ( const Math::vec4 & rhs) const
inline

vec4 inequality operator

◆ operator!=() [7/19]

bool Util::Variant::operator!= ( const Util::Guid & rhs) const
inline

guid inequality operator

◆ operator!=() [8/19]

bool Util::Variant::operator!= ( const Util::String & rhs) const
inline

string inequality operator

◆ operator!=() [9/19]

bool Util::Variant::operator!= ( const Variant & rhs) const
inline

inequality operator

◆ operator!=() [10/19]

bool Util::Variant::operator!= ( Core::RefCounted * ptr) const
inline

pointer equality operator

◆ operator!=() [11/19]

bool Util::Variant::operator!= ( double rhs) const
inline

double inequality operator

◆ operator!=() [12/19]

bool Util::Variant::operator!= ( float rhs) const
inline

float inequality operator

◆ operator!=() [13/19]

bool Util::Variant::operator!= ( int rhs) const
inline

int inequality operator

◆ operator!=() [14/19]

bool Util::Variant::operator!= ( int64_t rhs) const
inline

int inequality operator

◆ operator!=() [15/19]

bool Util::Variant::operator!= ( short rhs) const
inline

short inequality operator

◆ operator!=() [16/19]

bool Util::Variant::operator!= ( uint rhs) const
inline

uint inequality operator

◆ operator!=() [17/19]

bool Util::Variant::operator!= ( uint64_t rhs) const
inline

uint inequality operator

◆ operator!=() [18/19]

bool Util::Variant::operator!= ( ushort rhs) const
inline

ushort inequality operator

◆ operator!=() [19/19]

bool Util::Variant::operator!= ( void * ptr) const
inline

pointer equality operator

◆ operator<()

bool Util::Variant::operator< ( const Variant & rhs) const
inline

less operator

◆ operator<=()

bool Util::Variant::operator<= ( const Variant & rhs) const
inline

less equal operator

◆ operator=() [1/33]

void Util::Variant::operator= ( bool val)
inline

bool assigment operator

◆ operator=() [2/33]

void Util::Variant::operator= ( byte val)
inline

byte assignment operator

◆ operator=() [3/33]

void Util::Variant::operator= ( const char * chrPtr)
inline

char pointer assignment

◆ operator=() [4/33]

void Util::Variant::operator= ( const Math::mat4 & val)
inline

mat4 assignment operator

◆ operator=() [5/33]

void Util::Variant::operator= ( const Math::quat & val)
inline

quat assignment operator

◆ operator=() [6/33]

void Util::Variant::operator= ( const Math::transform44 & val)
inline

transform44 assignment operator

◆ operator=() [7/33]

void Util::Variant::operator= ( const Math::vec2 & val)
inline

vec2 assignment operator

◆ operator=() [8/33]

void Util::Variant::operator= ( const Math::vec3 & val)
inline

vec3 assignment operator

◆ operator=() [9/33]

void Util::Variant::operator= ( const Math::vec4 & val)
inline

vec4 assignment operator

◆ operator=() [10/33]

void Util::Variant::operator= ( const Util::Array< bool > & rhs)
inline

bool array assignment

◆ operator=() [11/33]

void Util::Variant::operator= ( const Util::Array< float > & rhs)
inline

float array assignment

◆ operator=() [12/33]

void Util::Variant::operator= ( const Util::Array< int > & rhs)
inline

int array assignment

◆ operator=() [13/33]

void Util::Variant::operator= ( const Util::Array< Math::mat4 > & rhs)
inline

mat4 array assignment

◆ operator=() [14/33]

void Util::Variant::operator= ( const Util::Array< Math::vec2 > & rhs)
inline

vec2 array assignment

◆ operator=() [15/33]

void Util::Variant::operator= ( const Util::Array< Math::vec3 > & rhs)
inline

vec3 array assignment

◆ operator=() [16/33]

void Util::Variant::operator= ( const Util::Array< Math::vec4 > & rhs)
inline

vec4 array assignment

◆ operator=() [17/33]

void Util::Variant::operator= ( const Util::Array< Util::Blob > & rhs)
inline

blob array assignment

◆ operator=() [18/33]

void Util::Variant::operator= ( const Util::Array< Util::Guid > & rhs)
inline

guid array assignment

◆ operator=() [19/33]

void Util::Variant::operator= ( const Util::Array< Util::String > & rhs)
inline

string array assignment

◆ operator=() [20/33]

void Util::Variant::operator= ( const Util::Blob & val)
inline

blob assignment operator

◆ operator=() [21/33]

void Util::Variant::operator= ( const Util::Guid & val)
inline

guid assignment operator

◆ operator=() [22/33]

void Util::Variant::operator= ( const Util::String & s)
inline

string assignment operator

◆ operator=() [23/33]

void Util::Variant::operator= ( const Variant & rhs)
inline

assignment operator

◆ operator=() [24/33]

void Util::Variant::operator= ( Core::RefCounted * ptr)
inline

object assignment

◆ operator=() [25/33]

void Util::Variant::operator= ( double val)
inline

double assignment operator

◆ operator=() [26/33]

void Util::Variant::operator= ( float val)
inline

float assignment operator

◆ operator=() [27/33]

void Util::Variant::operator= ( int val)
inline

int assignment operator

◆ operator=() [28/33]

void Util::Variant::operator= ( int64_t val)
inline

int assignment operator

◆ operator=() [29/33]

void Util::Variant::operator= ( short val)
inline

short assignment operator

◆ operator=() [30/33]

void Util::Variant::operator= ( uint val)
inline

uint assignment operator

◆ operator=() [31/33]

void Util::Variant::operator= ( uint64_t val)
inline

uint assignment operator

◆ operator=() [32/33]

void Util::Variant::operator= ( ushort val)
inline

ushort assignment operator

◆ operator=() [33/33]

void Util::Variant::operator= ( void * ptr)
inline

object assignment

◆ operator==() [1/19]

bool Util::Variant::operator== ( bool rhs) const
inline

bool equality operator

◆ operator==() [2/19]

bool Util::Variant::operator== ( byte rhs) const
inline

byte equality operator

◆ operator==() [3/19]

bool Util::Variant::operator== ( const char * chrPtr) const
inline

char ptr equality operator

◆ operator==() [4/19]

bool Util::Variant::operator== ( const Math::quat & rhs) const
inline

vec4 equality operator

◆ operator==() [5/19]

bool Util::Variant::operator== ( const Math::vec2 & rhs) const
inline

vec2 equality operator

◆ operator==() [6/19]

bool Util::Variant::operator== ( const Math::vec4 & rhs) const
inline

vec4 equality operator

◆ operator==() [7/19]

bool Util::Variant::operator== ( const Util::Guid & rhs) const
inline

guid equality operator

◆ operator==() [8/19]

bool Util::Variant::operator== ( const Util::String & rhs) const
inline

string equality operator

◆ operator==() [9/19]

bool Util::Variant::operator== ( const Variant & rhs) const
inline

equality operator

◆ operator==() [10/19]

bool Util::Variant::operator== ( Core::RefCounted * ptr) const
inline

pointer equality operator

◆ operator==() [11/19]

bool Util::Variant::operator== ( double rhs) const
inline

double equality operator

◆ operator==() [12/19]

bool Util::Variant::operator== ( float rhs) const
inline

float equality operator

◆ operator==() [13/19]

bool Util::Variant::operator== ( int rhs) const
inline

int equality operator

◆ operator==() [14/19]

bool Util::Variant::operator== ( int64_t rhs) const
inline

int equality operator

◆ operator==() [15/19]

bool Util::Variant::operator== ( short rhs) const
inline

short equality operator

◆ operator==() [16/19]

bool Util::Variant::operator== ( uint rhs) const
inline

uint equality operator

◆ operator==() [17/19]

bool Util::Variant::operator== ( uint64_t rhs) const
inline

uint equality operator

◆ operator==() [18/19]

bool Util::Variant::operator== ( ushort rhs) const
inline

ushort equality operator

◆ operator==() [19/19]

bool Util::Variant::operator== ( void * ptr) const
inline

pointer equality operator

◆ operator>()

bool Util::Variant::operator> ( const Variant & rhs) const
inline

greater operator

◆ operator>=()

bool Util::Variant::operator>= ( const Variant & rhs) const
inline

greater equal operator

◆ SetBlob()

void Util::Variant::SetBlob ( const Util::Blob & val)
inline

set blob

◆ SetBlobArray()

void Util::Variant::SetBlobArray ( const Util::Array< Util::Blob > & val)
inline

set blob array content

◆ SetBool()

void Util::Variant::SetBool ( bool val)
inline

set bool content

◆ SetBoolArray()

void Util::Variant::SetBoolArray ( const Util::Array< bool > & val)
inline

set bool array content

◆ SetByte()

void Util::Variant::SetByte ( byte val)
inline

set byte content

◆ SetDouble()

void Util::Variant::SetDouble ( double val)
inline

set double content

◆ SetFloat()

void Util::Variant::SetFloat ( float val)
inline

set float content

◆ SetFloatArray()

void Util::Variant::SetFloatArray ( const Util::Array< float > & val)
inline

set float array content

◆ SetGuid()

void Util::Variant::SetGuid ( const Util::Guid & val)
inline

set guid content

◆ SetGuidArray()

void Util::Variant::SetGuidArray ( const Util::Array< Util::Guid > & val)
inline

set guid array content

◆ SetInt()

void Util::Variant::SetInt ( int val)
inline

set integer content

◆ SetInt64()

void Util::Variant::SetInt64 ( int64_t val)
inline

set integer content

◆ SetIntArray()

void Util::Variant::SetIntArray ( const Util::Array< int > & val)
inline

set int array content

◆ SetMat4()

void Util::Variant::SetMat4 ( const Math::mat4 & val)
inline

set mat4 content

◆ SetMat4Array()

void Util::Variant::SetMat4Array ( const Util::Array< Math::mat4 > & val)
inline

set mat4 array content

◆ SetObject()

void Util::Variant::SetObject ( Core::RefCounted * ptr)
inline

set object pointer

◆ SetParseString()

bool Util::Variant::SetParseString ( const Util::String & string)

set value from string, if type doesn't match, returns false

◆ SetQuat()

void Util::Variant::SetQuat ( const Math::quat & val)
inline

set quaternion content

◆ SetShort()

void Util::Variant::SetShort ( short val)
inline

set short content

◆ SetString()

void Util::Variant::SetString ( const Util::String & val)
inline

set string content

◆ SetStringArray()

void Util::Variant::SetStringArray ( const Util::Array< Util::String > & val)
inline

set string array content

◆ SetTransform44()

void Util::Variant::SetTransform44 ( const Math::transform44 & val)
inline

set transform44 content

◆ SetType()

void Util::Variant::SetType ( Type t)
inline

set type of attribute

◆ SetUInt()

void Util::Variant::SetUInt ( uint val)
inline

set unsigned integer content

◆ SetUInt64()

void Util::Variant::SetUInt64 ( uint64_t val)
inline

set unsigned integer content

◆ SetUShort()

void Util::Variant::SetUShort ( ushort val)
inline

set ushort content

◆ SetVec2()

void Util::Variant::SetVec2 ( const Math::vec2 & val)
inline

set vec2 content

◆ SetVec2Array()

void Util::Variant::SetVec2Array ( const Util::Array< Math::vec2 > & val)
inline

set vec2 array content

◆ SetVec3()

void Util::Variant::SetVec3 ( const Math::vec3 & val)
inline

set vec4 content

◆ SetVec3Array()

void Util::Variant::SetVec3Array ( const Util::Array< Math::vec3 > & val)
inline

set vec4 array content

◆ SetVec4()

void Util::Variant::SetVec4 ( const Math::vec4 & val)
inline

set vec4 content

◆ SetVec4Array()

void Util::Variant::SetVec4Array ( const Util::Array< Math::vec4 > & val)
inline

set vec4 array content

◆ SetVoidPtr()

void Util::Variant::SetVoidPtr ( void * ptr)

set opaque void pointer

◆ Size()

const SizeT Util::Variant::Size ( ) const
inline

get size of data

◆ StringToType()

Variant::Type Util::Variant::StringToType ( const Util::String & str)
inlinestatic

convert string to type

◆ ToString()

Util::String Util::Variant::ToString ( ) const
inline

convert value to string

◆ TypeToString()

Util::String Util::Variant::TypeToString ( Type t)
inlinestatic

convert type to string

Member Data Documentation

◆ [union]

union { ... } Util::Variant

◆ b

bool Util::Variant::b

◆ blob

Util::Blob* Util::Variant::blob

◆ blobArray

Util::Array<Util::Blob>* Util::Variant::blobArray

◆ boolArray

Util::Array<bool>* Util::Variant::boolArray

◆ d

double Util::Variant::d

◆ f

float Util::Variant::f[4]

◆ float3Array

Util::Array<Math::vec3>* Util::Variant::float3Array

◆ floatArray

Util::Array<float>* Util::Variant::floatArray

◆ guid

Util::Guid* Util::Variant::guid

◆ guidArray

Util::Array<Util::Guid>* Util::Variant::guidArray

◆ i

int Util::Variant::i

◆ i16

short Util::Variant::i16

◆ i64

int64_t Util::Variant::i64

◆ i8

byte Util::Variant::i8

◆ intArray

Util::Array<int>* Util::Variant::intArray

◆ m

Math::mat4* Util::Variant::m

◆ mat4Array

Util::Array<Math::mat4>* Util::Variant::mat4Array

◆ object

Core::RefCounted* Util::Variant::object

◆ string

Util::String* Util::Variant::string

◆ stringArray

Util::Array<Util::String>* Util::Variant::stringArray

◆ t

Math::transform44* Util::Variant::t

◆ type

Type Util::Variant::type
private

◆ u

uint Util::Variant::u

◆ u64

uint64_t Util::Variant::u64

◆ ui16

ushort Util::Variant::ui16

◆ vec2Array

Util::Array<Math::vec2>* Util::Variant::vec2Array

◆ vec4Array

Util::Array<Math::vec4>* Util::Variant::vec4Array

◆ voidPtr

void* Util::Variant::voidPtr

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