Public Member Functions |
| Variant () |
| Construct empty.
|
| Variant (int value) |
| Construct from integer.
|
| Variant (unsigned value) |
| Construct from unsigned integer.
|
| Variant (const StringHash &value) |
| Construct from a string hash (convert to integer.)
|
| Variant (const ShortStringHash &value) |
| Construct from a short string hash (convert to integer.)
|
| Variant (bool value) |
| Construct from a bool.
|
| Variant (float value) |
| Construct from a float.
|
| Variant (const Vector2 &value) |
| Construct from a Vector2.
|
| Variant (const Vector3 &value) |
| Construct from a Vector3.
|
| Variant (const Vector4 &value) |
| Construct from a Vector4.
|
| Variant (const Quaternion &value) |
| Construct from a quaternion.
|
| Variant (const Color &value) |
| Construct from a color.
|
| Variant (const String &value) |
| Construct from a string.
|
| Variant (const char *value) |
| Construct from a C string.
|
| Variant (const PODVector< unsigned char > &value) |
| Construct from a buffer.
|
| Variant (void *value) |
| Construct from a pointer.
|
| Variant (const ResourceRef &value) |
| Construct from a resource reference.
|
| Variant (const ResourceRefList &value) |
| Construct from a resource reference list.
|
| Variant (const VariantVector &value) |
| Construct from a variant vector.
|
| Variant (const VariantMap &value) |
| Construct from a variant map.
|
| Variant (const IntRect &value) |
| Construct from an integer rect.
|
| Variant (const IntVector2 &value) |
| Construct from an IntVector2.
|
| Variant (const String &type, const String &value) |
| Construct from type and value.
|
| Variant (VariantType type, const String &value) |
| Construct from type and value.
|
| Variant (const char *type, const char *value) |
| Construct from type and value.
|
| Variant (VariantType type, const char *value) |
| Construct from type and value.
|
| Variant (const Variant &value) |
| Copy-construct from another variant.
|
| ~Variant () |
| Destruct.
|
void | Clear () |
| Reset to empty.
|
Variant & | operator= (const Variant &rhs) |
| Assign from another variant.
|
Variant & | operator= (int rhs) |
| Assign from an integer.
|
Variant & | operator= (unsigned rhs) |
| Assign from an unsigned integer.
|
Variant & | operator= (const StringHash &rhs) |
| Assign from a StringHash (convert to integer.)
|
Variant & | operator= (const ShortStringHash &rhs) |
| Assign from a ShortStringHash (convert to integer)
|
Variant & | operator= (bool rhs) |
| Assign from a bool.
|
Variant & | operator= (float rhs) |
| Assign from a float.
|
Variant & | operator= (const Vector2 &rhs) |
| Assign from a Vector2.
|
Variant & | operator= (const Vector3 &rhs) |
| Assign from a Vector3.
|
Variant & | operator= (const Vector4 &rhs) |
| Assign from a Vector4.
|
Variant & | operator= (const Quaternion &rhs) |
| Assign from a quaternion.
|
Variant & | operator= (const Color &rhs) |
| Assign from a color.
|
Variant & | operator= (const String &rhs) |
| Assign from a string.
|
Variant & | operator= (const char *rhs) |
| Assign from a C string.
|
Variant & | operator= (const PODVector< unsigned char > &rhs) |
| Assign from a buffer.
|
Variant & | operator= (void *rhs) |
| Assign from a pointer.
|
Variant & | operator= (const ResourceRef &rhs) |
| Assign from a resource reference.
|
Variant & | operator= (const ResourceRefList &rhs) |
| Assign from a resource reference list.
|
Variant & | operator= (const VariantVector &rhs) |
| Assign from a variant vector.
|
Variant & | operator= (const VariantMap &rhs) |
| Assign from a variant map.
|
Variant & | operator= (const IntRect &rhs) |
| Assign from an integer rect.
|
Variant & | operator= (const IntVector2 &rhs) |
| Assign from an IntVector2.
|
bool | operator== (const Variant &rhs) const |
| Test for equality with another variant.
|
bool | operator!= (const Variant &rhs) const |
| Test for inequality with another variant.
|
bool | operator== (int rhs) const |
| Test for equality with an integer. To return true, both the type and value must match.
|
bool | operator== (unsigned rhs) const |
| Test for equality with an unsigned integer. To return true, both the type and value must match.
|
bool | operator== (bool rhs) const |
| Test for equality with a bool. To return true, both the type and value must match.
|
bool | operator== (float rhs) const |
| Test for equality with a float. To return true, both the type and value must match.
|
bool | operator== (const Vector2 &rhs) const |
| Test for equality with a Vector2. To return true, both the type and value must match.
|
bool | operator== (const Vector3 &rhs) const |
| Test for equality with a Vector3. To return true, both the type and value must match.
|
bool | operator== (const Vector4 &rhs) const |
| Test for equality with a Vector4. To return true, both the type and value must match.
|
bool | operator== (const Quaternion &rhs) const |
| Test for equality with a quaternion. To return true, both the type and value must match.
|
bool | operator== (const Color &rhs) const |
| Test for equality with a color. To return true, both the type and value must match.
|
bool | operator== (const String &rhs) const |
| Test for equality with a string. To return true, both the type and value must match.
|
bool | operator== (const PODVector< unsigned char > &rhs) const |
| Test for equality with a buffer. To return true, both the type and value must match.
|
bool | operator== (void *rhs) const |
| Test for equality with a pointer. To return true, both the type and value must match.
|
bool | operator== (const ResourceRef &rhs) const |
| Test for equality with a resource reference. To return true, both the type and value must match.
|
bool | operator== (const ResourceRefList &rhs) const |
| Test for equality with a resource reference list. To return true, both the type and value must match.
|
bool | operator== (const VariantVector &rhs) const |
| Test for equality with a variant vector. To return true, both the type and value must match.
|
bool | operator== (const VariantMap &rhs) const |
| Test for equality with a variant map. To return true, both the type and value must match.
|
bool | operator== (const IntRect &rhs) const |
| Test for equality with an integer rect. To return true, both the type and value must match.
|
bool | operator== (const IntVector2 &rhs) const |
| Test for equality with an IntVector2. To return true, both the type and value must match.
|
bool | operator== (const StringHash &rhs) const |
| Test for equality with a StringHash. To return true, both the type and value must match.
|
bool | operator== (const ShortStringHash &rhs) const |
| Test for equality with a ShortStringHash. To return true, both the type and value must match.
|
bool | operator!= (int rhs) const |
| Test for inequality with an integer.
|
bool | operator!= (unsigned rhs) const |
| Test for inequality with an unsigned integer.
|
bool | operator!= (bool rhs) const |
| Test for inequality with a bool.
|
bool | operator!= (float rhs) const |
| Test for inequality with a float.
|
bool | operator!= (const Vector2 &rhs) const |
| Test for inequality with a Vector2.
|
bool | operator!= (const Vector3 &rhs) const |
| Test for inequality with a Vector3.
|
bool | operator!= (const Vector4 &rhs) const |
| Test for inequality with an Vector4.
|
bool | operator!= (const Quaternion &rhs) const |
| Test for inequality with a Quaternion.
|
bool | operator!= (const String &rhs) const |
| Test for inequality with a string.
|
bool | operator!= (const PODVector< unsigned char > &rhs) const |
| Test for inequality with a buffer.
|
bool | operator!= (void *rhs) const |
| Test for inequality with a pointer.
|
bool | operator!= (const ResourceRef &rhs) const |
| Test for inequality with a resource reference.
|
bool | operator!= (const ResourceRefList &rhs) const |
| Test for inequality with a resource reference list.
|
bool | operator!= (const VariantVector &rhs) const |
| Test for inequality with a variant vector.
|
bool | operator!= (const VariantMap &rhs) const |
| Test for inequality with a variant map.
|
bool | operator!= (const IntRect &rhs) const |
| Test for inequality with an integer rect.
|
bool | operator!= (const IntVector2 &rhs) const |
| Test for inequality with an IntVector2.
|
bool | operator!= (const StringHash &rhs) const |
| Test for inequality with a StringHash.
|
bool | operator!= (const ShortStringHash &rhs) const |
| Test for inequality with a ShortStringHash.
|
void | FromString (const String &type, const String &value) |
| Set from typename and value strings. Pointers will be set to null, and VariantBuffer or VariantMap types are not supported.
|
void | FromString (const char *type, const char *value) |
| Set from typename and value strings. Pointers will be set to null, and VariantBuffer or VariantMap types are not supported.
|
void | FromString (VariantType type, const String &value) |
| Set from type and value string. Pointers will be set to null, and VariantBuffer or VariantMap types are not supported.
|
void | FromString (VariantType type, const char *value) |
| Set from type and value string. Pointers will be set to null, and VariantBuffer or VariantMap types are not supported.
|
void | SetBuffer (const void *data, unsigned size) |
| Set buffer type from a memory area.
|
int | GetInt () const |
| Return int or zero on type mismatch.
|
int | GetUInt () const |
| Return unsigned int or zero on type mismatch.
|
StringHash | GetStringHash () const |
| Return StringHash or zero on type mismatch.
|
ShortStringHash | GetShortStringHash () const |
| Return ShortStringHash or zero on type mismatch.
|
bool | GetBool () const |
| Return bool or false on type mismatch.
|
float | GetFloat () const |
| Return float or zero on type mismatch.
|
const Vector2 & | GetVector2 () const |
| Return Vector2 or zero on type mismatch.
|
const Vector3 & | GetVector3 () const |
| Return Vector3 or zero on type mismatch.
|
const Vector4 & | GetVector4 () const |
| Return Vector4 or zero on type mismatch.
|
const Quaternion & | GetQuaternion () const |
| Return quaternion or identity on type mismatch.
|
const Color & | GetColor () const |
| Return color or default on type mismatch.
|
const String & | GetString () const |
| Return string or empty on type mismatch.
|
const PODVector< unsigned char > & | GetBuffer () const |
| Return buffer or empty on type mismatch.
|
void * | GetPtr () const |
| Return pointer or null on type mismatch.
|
const ResourceRef & | GetResourceRef () const |
| Return a resource reference or empty on type mismatch.
|
const ResourceRefList & | GetResourceRefList () const |
| Return a resource reference list or empty on type mismatch.
|
const VariantVector & | GetVariantVector () const |
| Return a variant vector or empty on type mismatch.
|
const VariantMap & | GetVariantMap () const |
| Return a variant map or empty on type mismatch.
|
const IntRect & | GetIntRect () const |
| Return an integer rect or empty on type mismatch.
|
const IntVector2 & | GetIntVector2 () const |
| Return an IntVector2 or empty on type mismatch.
|
template<class T > |
T | Get () const |
| Return the value, template version.
|
VariantType | GetType () const |
| Return value's type.
|
const String & | GetTypeName () const |
| Return value's type name.
|
String | ToString () const |
| Convert value to string. Pointers are returned as null, and VariantBuffer or VariantMap are not supported and return empty.
|