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. Note that most default C++ types allow default conversions from
Variant
to the corresponding type. Types that require an explicit call viatoTargetType()
are: complex (float and double), Vector3, and vector<Variant>.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_LONGDOUBLE
-
enumerator TYPE_COMPLEXF
-
enumerator TYPE_COMPLEXD
-
enumerator TYPE_STRING
-
enumerator TYPE_VECTOR3F
-
enumerator TYPE_VECTOR3D
-
enumerator TYPE_VECTOR3C
-
enumerator TYPE_VECTOR
-
enumerator TYPE_NONE
-
typedef std::complex<float> complex_f
-
typedef std::complex<double> complex_d
Public Functions
-
Variant()
-
Variant(const char *s)
-
~Variant()
-
const char *getTypeName() const
-
const std::type_info &getTypeInfo() const
-
std::string toString(const std::string &delimiter = "\t") const
-
std::complex<float> toComplexFloat() const
-
std::complex<double> toComplexDouble() const
-
bool isValid() const
-
size_t size() const
-
size_t getSizeOf() const
-
size_t getSize() const
-
void resize(size_t i)
-
size_t copyToBuffer(void *buffer)
-
inline operator std::string() const
-
bool operator!=(const char *a) const
- VARIANT_ADD_TYPE_DECL_POD (Bool, TYPE_BOOL, bool, bool) VARIANT_ADD_TYPE_DECL_POD(Char
- char VARIANT_ADD_TYPE_DECL_POD (UChar, TYPE_UCHAR, unsigned char, uchar) VARIANT_ADD_TYPE_DECL_POD(Int16
- char int16 VARIANT_ADD_TYPE_DECL_POD (UInt16, TYPE_UINT16, uint16_t, uint16) VARIANT_ADD_TYPE_DECL_POD(Int32
- char int16 int32 VARIANT_ADD_TYPE_DECL_POD (UInt32, TYPE_UINT32, uint32_t, uint32) VARIANT_ADD_TYPE_DECL_POD(Int64
- char int16 int32 int64 VARIANT_ADD_TYPE_DECL_POD (UInt64, TYPE_UINT64, uint64_t, uint64) VARIANT_ADD_TYPE_DECL_POD(Float
- char int16 int32 int64 float VARIANT_ADD_TYPE_DECL_POD (Double, TYPE_DOUBLE, double, double) VARIANT_ADD_TYPE_DECL_POD(LongDouble
- char int16 int32 int64 float long ldouble VARIANT_ADD_TYPE_DECL_PTR (ComplexFloat, TYPE_COMPLEXF, std::complex< float >, complex_f) VARIANT_ADD_TYPE_DECL_PTR(ComplexDouble
- char int16 int32 int64 float long ldouble complex_d VARIANT_ADD_TYPE_DECL_PTR (String, TYPE_STRING, std::string, string) VARIANT_ADD_TYPE_DECL_PTR(Vector3f
- char int16 int32 int64 float long ldouble complex_d vector3f VARIANT_ADD_TYPE_DECL_PTR (Vector3d, TYPE_VECTOR3D, Vector3d, vector3d) VARIANT_ADD_TYPE_DECL_PTR(Vector3c
- char int16 int32 int64 float long ldouble complex_d vector3f vector3c VARIANT_ADD_TYPE_DECL_PTR (Vector, TYPE_VECTOR, vector_t, vector) VARIANT_ADD_ITER_DECL_PTR(Vector
Public Members
-
bool _t_bool
-
char _t_char
-
unsigned char _t_uchar
-
uint16_t _t_uint16
-
int32_t _t_int32
-
uint32_t _t_uint32
-
int64_t _t_int64
-
uint64_t _t_uint64
-
float _t_float
-
double _t_double
-
long double _t_ldouble
-
std::string *_t_string
- TYPE_CHAR
- char
-
char TYPE_INT16
-
char int16_t
- char int16 TYPE_INT32
- char int16 int32_t
- char int16 int32 TYPE_INT64
- char int16 int32 int64_t
- char int16 int32 int64 TYPE_FLOAT
- char int16 int32 int64 float
- char int16 int32 int64 float TYPE_LONGDOUBLE
- char int16 int32 int64 float long double
- char int16 int32 int64 float long ldouble TYPE_COMPLEXD
- char int16 int32 int64 float long ldouble complex_d TYPE_VECTOR3F
- char int16 int32 int64 float long ldouble complex_d Vector3f
- char int16 int32 int64 float long ldouble complex_d vector3f TYPE_VECTOR3C
- char int16 int32 int64 float long ldouble complex_d vector3f Vector3c
- char int16 int32 int64 float long ldouble complex_d vector3f vector3c TYPE_VECTOR
Public Static Functions
-
enum Type