Class Variant¶
- Defined in File Variant.h
Class Documentation¶
-
class
Variant
¶ storage container for data types as e.g. int, float, string, etc.
Allows storage of multiple data types in one base class. used to construct a map of `arbitrarry’ data types.
Public Types
Public Functions
-
Variant
()¶
-
~Variant
()¶
-
const std::type_info &
getTypeInfo
() const¶
-
const char *
getTypeName
() const¶
-
size_t
copyToBuffer
(void *buffer)¶
-
size_t
getSize
() const¶ returns size of used data type in bytes
-
template <class T>
Tto
() const¶
-
Type
getType
() const¶
-
bool
isValid
()¶
-
VARIANT_ADD_TYPE_DECL_POD
(Bool, TYPE_BOOL, bool)¶
-
char
VARIANT_ADD_TYPE_DECL_POD
(UChar, TYPE_UCHAR, unsigned char)¶
-
char int16_t VARIANT_ADD_TYPE_DECL_POD(UInt16, TYPE_UINT16, uint16_t)
-
char int16_t int32_t VARIANT_ADD_TYPE_DECL_POD(UInt32, TYPE_UINT32, uint32_t)
-
char int16_t int32_t int64_t VARIANT_ADD_TYPE_DECL_POD(UInt64, TYPE_UINT64, uint64_t)
-
char int16_t int32_t int64_t float VARIANT_ADD_TYPE_DECL_POD(Double, TYPE_DOUBLE, double)
-
Variant
(const char *s)¶
-
std::string
toString
() const¶
-
operator std::string
() const¶
-
bool
operator!=
(const char *a) const¶
-
void
clear
()¶
Public Members
-
TYPE_CHAR
-
char
TYPE_INT16
¶
-
char int16_t TYPE_INT32
-
char int16_t int32_t TYPE_INT64
-
char int16_t int32_t int64_t TYPE_FLOAT
-
char int16_t int32_t int64_t float TYPE_STRING
-
bool
_Bool
¶
-
char
_Char
¶
-
unsigned char
_UChar
¶
-
int16_t
_Int16
¶
-
uint16_t
_UInt16
¶
-
int32_t
_Int32
¶
-
uint32_t
_UInt32
¶
-
int64_t
_Int64
¶
-
uint64_t
_UInt64
¶
-
double
_Double
¶
-
float
_Float
¶
-
std::string *
_String
¶
Public Static Functions
-
const char *
getTypeName
(Type type)¶
-
class
bad_conversion
: public exception¶
-