Class Variant
Defined in File Variant.h
Nested Relationships
Nested Types
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 arbitrary data types.
Public Types
-
enum Type
Values:
-
enumerator TYPE_NONE
-
enumerator TYPE_BOOL
-
enumerator TYPE_CHAR
-
enumerator TYPE_UCHAR
-
enumerator TYPE_INT16
-
enumerator TYPE_UINT16
-
enumerator TYPE_INT32
-
enumerator TYPE_UINT32
-
enumerator TYPE_INT64
-
enumerator TYPE_UINT64
-
enumerator TYPE_FLOAT
-
enumerator TYPE_DOUBLE
-
enumerator TYPE_STRING
-
enumerator TYPE_NONE
Public Functions
-
Variant()
-
~Variant()
-
const std::type_info &getTypeInfo() const
-
inline const char *getTypeName() const
-
size_t copyToBuffer(void *buffer)
-
size_t getSize() const
returns size of used data type in bytes
-
inline bool isValid()
- VARIANT_ADD_TYPE_DECL_POD (Bool, TYPE_BOOL, bool) VARIANT_ADD_TYPE_DECL_POD(Char
- char VARIANT_ADD_TYPE_DECL_POD (UChar, TYPE_UCHAR, unsigned char) VARIANT_ADD_TYPE_DECL_POD(Int16
- char int16_t VARIANT_ADD_TYPE_DECL_POD (UInt16, TYPE_UINT16, uint16_t) VARIANT_ADD_TYPE_DECL_POD(Int32
- char int16_t int32_t VARIANT_ADD_TYPE_DECL_POD (UInt32, TYPE_UINT32, uint32_t) VARIANT_ADD_TYPE_DECL_POD(Int64
- char int16_t int32_t int64_t VARIANT_ADD_TYPE_DECL_POD (UInt64, TYPE_UINT64, uint64_t) VARIANT_ADD_TYPE_DECL_POD(Float
- char int16_t int32_t int64_t float VARIANT_ADD_TYPE_DECL_POD (Double, TYPE_DOUBLE, double) VARIANT_ADD_TYPE_DECL_PTR(String
- char int16_t int32_t int64_t float std::string Variant (const char *s)
-
std::string toString() const
-
inline operator std::string() const
-
inline 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
-
class bad_conversion : public exception
-
enum Type