3#include <Foundation/Strings/String.h>
4#include <Foundation/Types/Types.h>
21 using StorageType = plUInt8;
99 static constexpr bool forceSharing =
false;
100 static constexpr bool hasReflectedMembers =
false;
103 using StorageType = T;
110#define PL_DECLARE_CUSTOM_VARIANT_TYPE(TYPE) \
112 struct plVariantTypeDeduction<TYPE> \
114 static constexpr plVariantType::Enum value = plVariantType::TypedObject; \
115 static constexpr bool forceSharing = false; \
116 static constexpr bool hasReflectedMembers = true; \
117 static constexpr plVariantClass::Enum classification = plVariantClass::CustomTypeCast; \
119 using StorageType = TYPE; \
122#include <Foundation/Types/Implementation/VariantTypeDeduction_inl.h>
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
Defines a reference to an immutable object owned by an plVariant.
Definition Variant.h:24
A typed raw pointer.
Definition TypedPointer.h:13
Definition VariantType.h:83
Enum
Definition VariantType.h:85
@ CustomTypeCast
Custom object types.
Definition VariantType.h:90
@ PointerCast
Any cast to T*.
Definition VariantType.h:88
@ DirectCast
A standard type.
Definition VariantType.h:87
@ TypedObject
plTypedObject cast. Needed because at no point does and plVariant ever store a plTypedObject so it ca...
Definition VariantType.h:89
A helper struct to convert the C++ type, which is passed as the template argument,...
Definition VariantType.h:97
This enum describes the type of data that is currently stored inside the variant.
Definition VariantType.h:20
Enum
This enum describes the type of data that is currently stored inside the variant. Note that changes t...
Definition VariantType.h:26
@ Matrix3
The variant stores an plMat3. A heap allocation is required to store this data type.
Definition VariantType.h:53
@ DataBuffer
The variant stores an plDataBuffer, a typedef to DynamicArray<plUInt8>. A heap allocation is required...
Definition VariantType.h:58
@ UInt8
The variant stores an plUInt8.
Definition VariantType.h:33
@ ColorGamma
The variant stores an plColorGammaUB value.
Definition VariantType.h:62
@ Vector3I
The variant stores an plVec3I32.
Definition VariantType.h:47
@ Int8
The variant stores an plInt8.
Definition VariantType.h:32
@ TempHashedString
The variant stores an plTempHashedString value.
Definition VariantType.h:64
@ Vector2U
The variant stores an plVec2U32.
Definition VariantType.h:49
@ Bool
The variant stores a bool.
Definition VariantType.h:31
@ Int32
The variant stores an plInt32.
Definition VariantType.h:36
@ Matrix4
The variant stores an plMat4. A heap allocation is required to store this data type.
Definition VariantType.h:54
@ Uuid
The variant stores an plUuid value.
Definition VariantType.h:60
@ Vector3
The variant stores an plVec3.
Definition VariantType.h:44
@ Vector4I
The variant stores an plVec4I32.
Definition VariantType.h:48
@ String
The variant stores a string. A heap allocation is required to store this data type.
Definition VariantType.h:56
@ Double
The variant stores a double.
Definition VariantType.h:41
@ TypedPointer
The variant stores an plTypedPointer value. Reflected type and data queries will match the pointed to...
Definition VariantType.h:71
@ Default
Default value used by plEnum.
Definition VariantType.h:76
@ Time
The variant stores an plTime value.
Definition VariantType.h:59
@ Color
The variant stores an plColor.
Definition VariantType.h:42
@ FirstStandardType
*** Types that are flagged as 'StandardTypes' (see DetermineTypeFlags) ***
Definition VariantType.h:30
@ UInt16
The variant stores an plUInt16.
Definition VariantType.h:35
@ Angle
The variant stores an plAngle value.
Definition VariantType.h:61
@ Float
The variant stores a float.
Definition VariantType.h:40
@ VariantArray
The variant stores an array of plVariant's. A heap allocation is required to store this data type.
Definition VariantType.h:69
@ Vector2I
The variant stores an plVec2I32.
Definition VariantType.h:46
@ VariantDictionary
The variant stores a dictionary (hashmap) of plVariant's. A heap allocation is required to store this...
Definition VariantType.h:70
@ StringView
The variant stores an plStringView.
Definition VariantType.h:57
@ Vector3U
The variant stores an plVec3U32.
Definition VariantType.h:50
@ HashedString
The variant stores an plHashedString value.
Definition VariantType.h:63
@ FirstExtendedType
*** Types that are flagged as 'StandardTypes' (see DetermineTypeFlags) ***
Definition VariantType.h:68
@ Vector2
The variant stores an plVec2.
Definition VariantType.h:43
@ LastExtendedType
Number of values for plVariant::Type.
Definition VariantType.h:73
@ UInt32
The variant stores an plUInt32.
Definition VariantType.h:37
@ Transform
The variant stores an plTransform. A heap allocation is required to store this data type.
Definition VariantType.h:55
@ Quaternion
The variant stores an plQuat.
Definition VariantType.h:52
@ Vector4U
The variant stores an plVec4U32.
Definition VariantType.h:51
@ Invalid
The variant stores no (valid) data at the moment.
Definition VariantType.h:27
@ Int16
The variant stores an plInt16.
Definition VariantType.h:34
@ UInt64
The variant stores an plUInt64.
Definition VariantType.h:39
@ Vector4
The variant stores an plVec4.
Definition VariantType.h:45
@ TypedObject
The variant stores an plTypedObject value. Reflected type and data queries will match the object....
Definition VariantType.h:72
@ Int64
The variant stores an plInt64.
Definition VariantType.h:38