Urho3D
Classes | Typedefs | Enumerations | Functions | Variables
Variant.h File Reference
#include "../Container/HashMap.h"
#include "../Container/Ptr.h"
#include "../Math/Color.h"
#include "../Math/Matrix3.h"
#include "../Math/Matrix3x4.h"
#include "../Math/Rect.h"
#include "../Math/StringHash.h"
#include <typeinfo>

Classes

struct  Urho3D::ResourceRef
 Typed resource reference. More...
 
struct  Urho3D::ResourceRefList
 List of typed resource references. More...
 
class  Urho3D::CustomVariantValue
 Custom variant value. This type is not abstract to store it in the VariantValue by value. More...
 
struct  Urho3D::CustomVariantValueTraits< T >
 Custom variant value type traits. Specialize the template to implement custom type behavior. More...
 
class  Urho3D::CustomVariantValueImpl< T >
 Custom variant value implementation. More...
 
union  Urho3D::VariantValue
 Union for the possible variant values. Objects exceeding the VARIANT_VALUE_SIZE are allocated on the heap. More...
 
class  Urho3D::Variant
 Variable that supports a fixed set of types. More...
 

Typedefs

using Urho3D::VariantVector = Vector< Variant >
 Vector of variants.
 
using Urho3D::StringVector = Vector< String >
 Vector of strings.
 
using Urho3D::VariantMap = HashMap< StringHash, Variant >
 Map of variants.
 

Enumerations

enum  Urho3D::VariantType {
  VAR_NONE = 0 , VAR_INT , VAR_BOOL , VAR_FLOAT ,
  VAR_VECTOR2 , VAR_VECTOR3 , VAR_VECTOR4 , VAR_QUATERNION ,
  VAR_COLOR , VAR_STRING , VAR_BUFFER , VAR_VOIDPTR ,
  VAR_RESOURCEREF , VAR_RESOURCEREFLIST , VAR_VARIANTVECTOR , VAR_VARIANTMAP ,
  VAR_INTRECT , VAR_INTVECTOR2 , VAR_PTR , VAR_MATRIX3 ,
  VAR_MATRIX3X4 , VAR_MATRIX4 , VAR_DOUBLE , VAR_STRINGVECTOR ,
  VAR_RECT , VAR_INTVECTOR3 , VAR_INT64 , VAR_CUSTOM_HEAP ,
  VAR_CUSTOM_STACK , MAX_VAR_TYPES
}
 Variant's supported types.
 

Functions

template<typename T >
CustomVariantValueImpl< T > Urho3D::MakeCustomValue (const T &value)
 Make custom variant value.
 
template<typename T >
VariantType Urho3D::GetVariantType ()
 Return variant type from type.
 
template<>
VariantType Urho3D::GetVariantType< int > ()
 
template<>
VariantType Urho3D::GetVariantType< unsigned > ()
 
template<>
VariantType Urho3D::GetVariantType< c32 > ()
 
template<>
VariantType Urho3D::GetVariantType< long long > ()
 
template<>
VariantType Urho3D::GetVariantType< unsigned long long > ()
 
template<>
VariantType Urho3D::GetVariantType< bool > ()
 
template<>
VariantType Urho3D::GetVariantType< float > ()
 
template<>
VariantType Urho3D::GetVariantType< double > ()
 
template<>
VariantType Urho3D::GetVariantType< Vector2 > ()
 
template<>
VariantType Urho3D::GetVariantType< Vector3 > ()
 
template<>
VariantType Urho3D::GetVariantType< Vector4 > ()
 
template<>
VariantType Urho3D::GetVariantType< Quaternion > ()
 
template<>
VariantType Urho3D::GetVariantType< Color > ()
 
template<>
VariantType Urho3D::GetVariantType< String > ()
 
template<>
VariantType Urho3D::GetVariantType< StringHash > ()
 
template<>
VariantType Urho3D::GetVariantType< Vector< byte > > ()
 
template<>
VariantType Urho3D::GetVariantType< ResourceRef > ()
 
template<>
VariantType Urho3D::GetVariantType< ResourceRefList > ()
 
template<>
VariantType Urho3D::GetVariantType< VariantVector > ()
 
template<>
VariantType Urho3D::GetVariantType< StringVector > ()
 
template<>
VariantType Urho3D::GetVariantType< VariantMap > ()
 
template<>
VariantType Urho3D::GetVariantType< Rect > ()
 
template<>
VariantType Urho3D::GetVariantType< IntRect > ()
 
template<>
VariantType Urho3D::GetVariantType< IntVector2 > ()
 
template<>
VariantType Urho3D::GetVariantType< IntVector3 > ()
 
template<>
VariantType Urho3D::GetVariantType< Matrix3 > ()
 
template<>
VariantType Urho3D::GetVariantType< Matrix3x4 > ()
 
template<>
VariantType Urho3D::GetVariantType< Matrix4 > ()
 

Variables

static const unsigned Urho3D::VARIANT_VALUE_SIZE = sizeof(void*) * 4
 Size of variant value. 16 bytes on 32-bit platform, 32 bytes on 64-bit platform.