Plasma Engine  2.0
Loading...
Searching...
No Matches
StaticRTTI.h
1#pragma once
2
4
5#include <Foundation/Basics.h>
6#include <Foundation/Types/Bitflags.h>
7#include <Foundation/Types/VariantType.h>
8#include <type_traits>
9
10class plRTTI;
12class plVariant;
13
16{
17 using StorageType = plUInt8;
18
19 enum Enum
20 {
21 StandardType = PL_BIT(0),
22 IsEnum = PL_BIT(1),
23 Bitflags = PL_BIT(2),
24 Class = PL_BIT(3),
25
26 Abstract = PL_BIT(4),
27 Phantom = PL_BIT(5),
28 Minimal = PL_BIT(6),
29 Default = 0
30 };
31
32 struct Bits
33 {
34 StorageType StandardType : 1;
35 StorageType IsEnum : 1;
36 StorageType Bitflags : 1;
37 StorageType Class : 1;
38 StorageType Abstract : 1;
39 StorageType Phantom : 1;
40 };
41};
42
43PL_DECLARE_FLAGS_OPERATORS(plTypeFlags)
44
45
46// ****************************************************
47// ***** Templates for accessing static RTTI data *****
48
49namespace plInternal
50{
52 template <typename T>
54 {
55 };
56
57 // Special implementation for types that have no base
58 template <>
60 {
61 static const plRTTI* GetRTTI() { return nullptr; }
62 };
63
64 // Special implementation for void to make function reflection compile void return values without further specialization.
65 template <>
66 struct plStaticRTTI<void>
67 {
68 static const plRTTI* GetRTTI() { return nullptr; }
69 };
70
71 template <typename T>
72 PL_ALWAYS_INLINE const plRTTI* GetStaticRTTI(plTraitInt<1>) // class derived from plReflectedClass
73 {
74 return T::GetStaticRTTI();
75 }
76
77 template <typename T>
78 PL_ALWAYS_INLINE const plRTTI* GetStaticRTTI(plTraitInt<0>) // static rtti
79 {
80 // Since this is pure C++ and no preprocessor macro, calling it with types such as 'int' and 'plInt32' will
81 // actually return the same RTTI object, which would not be possible with a purely macro based solution
82
83 return plStaticRTTI<T>::GetRTTI();
84 }
85
86 template <typename Type>
87 plBitflags<plTypeFlags> DetermineTypeFlags()
88 {
92 if ((type >= plVariantType::FirstStandardType && type <= plVariantType::LastStandardType) || PL_IS_SAME_TYPE(plVariant, Type))
94 else
96
97 if (std::is_abstract<Type>::value)
99
100 return flags;
101 }
102
103 template <>
104 PL_ALWAYS_INLINE plBitflags<plTypeFlags> DetermineTypeFlags<plVariant>()
105 {
107 }
108
109 template <typename T>
111 {
112 static_assert(sizeof(T) == 0, "Type has not been declared as reflectable (use PL_DECLARE_REFLECTABLE_TYPE macro)");
113 };
114} // namespace plInternal
115
117template <typename T>
118PL_ALWAYS_INLINE const plRTTI* plGetStaticRTTI()
119{
120 return plInternal::GetStaticRTTI<T>(plTraitInt<PL_IS_DERIVED_FROM_STATIC(plReflectedClass, T)>());
121}
122
123// **************************************************
124// ***** Macros for declaring types reflectable *****
125
126#define PL_NO_LINKAGE
127
130#define PL_DECLARE_REFLECTABLE_TYPE(Linkage, TYPE) \
131 namespace plInternal \
132 { \
133 template <> \
134 struct Linkage plStaticRTTIWrapper<TYPE> \
135 { \
136 static plRTTI s_RTTI; \
137 }; \
138 \
139 /* This specialization calls the function to get the RTTI data */ \
140 /* This code might get duplicated in different DLLs, but all */ \
141 /* will call the same function, so the RTTI object is unique */ \
142 template <> \
143 struct plStaticRTTI<TYPE> \
144 { \
145 PL_ALWAYS_INLINE static const plRTTI* GetRTTI() \
146 { \
147 return &plStaticRTTIWrapper<TYPE>::s_RTTI; \
148 } \
149 }; \
150 }
151
154#define PL_ALLOW_PRIVATE_PROPERTIES(SELF) friend plRTTI GetRTTI(SELF*)
155
157// internal helper macro
158#define PL_RTTIINFO_DECL(Type, BaseType, Version) \
159 \
160 plStringView GetTypeName(Type*) \
161 { \
162 return #Type; \
163 } \
164 plUInt32 GetTypeVersion(Type*) \
165 { \
166 return Version; \
167 } \
168 \
169 plRTTI GetRTTI(Type*);
170
171// internal helper macro
172#define PL_RTTIINFO_GETRTTI_IMPL_BEGIN(Type, BaseType, AllocatorType) \
173 plRTTI GetRTTI(Type*) \
174 { \
175 using OwnType = Type; \
176 using OwnBaseType = BaseType; \
177 static AllocatorType Allocator; \
178 static plBitflags<plTypeFlags> flags = plInternal::DetermineTypeFlags<Type>(); \
179 static plArrayPtr<const plAbstractProperty*> Properties; \
180 static plArrayPtr<const plAbstractFunctionProperty*> Functions; \
181 static plArrayPtr<const plPropertyAttribute*> Attributes; \
182 static plArrayPtr<plAbstractMessageHandler*> MessageHandlers; \
183 static plArrayPtr<plMessageSenderInfo> MessageSenders;
184
186
200#define PL_BEGIN_STATIC_REFLECTED_TYPE(Type, BaseType, Version, AllocatorType) \
201 PL_RTTIINFO_DECL(Type, BaseType, Version) \
202 plRTTI plInternal::plStaticRTTIWrapper<Type>::s_RTTI = GetRTTI((Type*)0); \
203 PL_RTTIINFO_GETRTTI_IMPL_BEGIN(Type, BaseType, AllocatorType)
204
205
207#define PL_END_STATIC_REFLECTED_TYPE \
208 ; \
209 return plRTTI(GetTypeName((OwnType*)0), plGetStaticRTTI<OwnBaseType>(), sizeof(OwnType), GetTypeVersion((OwnType*)0), \
210 plVariantTypeDeduction<OwnType>::value, flags, &Allocator, Properties, Functions, Attributes, MessageHandlers, MessageSenders, nullptr); \
211 }
212
213
215#define PL_BEGIN_PROPERTIES static const plAbstractProperty* PropertyList[] =
216
217
218
220#define PL_END_PROPERTIES \
221 ; \
222 Properties = PropertyList
223
225#define PL_BEGIN_FUNCTIONS static const plAbstractFunctionProperty* FunctionList[] =
226
227
228
230#define PL_END_FUNCTIONS \
231 ; \
232 Functions = FunctionList
233
235#define PL_BEGIN_ATTRIBUTES static const plPropertyAttribute* AttributeList[] =
236
237
238
240#define PL_END_ATTRIBUTES \
241 ; \
242 Attributes = AttributeList
243
249#define PL_FUNCTION_PROPERTY(Function) (new plFunctionProperty<decltype(&OwnType::Function)>(PL_PP_STRINGIFY(Function), &OwnType::Function))
250
259#define PL_FUNCTION_PROPERTY_EX(PropertyName, Function) (new plFunctionProperty<decltype(&Function)>(PropertyName, &Function))
260
262#define _PL_SCRIPT_FUNCTION_PARAM(type, name) plScriptableFunctionAttribute::ArgType::type, name
263
277#define PL_SCRIPT_FUNCTION_PROPERTY(Function, ...) \
278 PL_FUNCTION_PROPERTY(Function)->AddAttributes(new plScriptableFunctionAttribute(PL_EXPAND_ARGS_PAIR_COMMA(_PL_SCRIPT_FUNCTION_PARAM, ##__VA_ARGS__)))
279
284#define PL_CONSTRUCTOR_PROPERTY(...) (new plConstructorFunctionProperty<OwnType, ##__VA_ARGS__>())
285
286
287// [internal] Helper macro to get the return type of a getter function.
288#define PL_GETTER_TYPE(Class, GetterFunc) decltype(std::declval<Class>().GetterFunc())
289
301#define PL_ACCESSOR_PROPERTY(PropertyName, Getter, Setter) \
302 (new plAccessorProperty<OwnType, PL_GETTER_TYPE(OwnType, OwnType::Getter)>(PropertyName, &OwnType::Getter, &OwnType::Setter))
303
305#define PL_ACCESSOR_PROPERTY_READ_ONLY(PropertyName, Getter) \
306 (new plAccessorProperty<OwnType, PL_GETTER_TYPE(OwnType, OwnType::Getter)>(PropertyName, &OwnType::Getter, nullptr))
307
308// [internal] Helper macro to get the return type of a array getter function.
309#define PL_ARRAY_GETTER_TYPE(Class, GetterFunc) decltype(std::declval<Class>().GetterFunc(0))
310
325#define PL_ARRAY_ACCESSOR_PROPERTY(PropertyName, GetCount, Getter, Setter, Insert, Remove) \
326 (new plAccessorArrayProperty<OwnType, PL_ARRAY_GETTER_TYPE(OwnType, OwnType::Getter)>( \
327 PropertyName, &OwnType::GetCount, &OwnType::Getter, &OwnType::Setter, &OwnType::Insert, &OwnType::Remove))
328
330#define PL_ARRAY_ACCESSOR_PROPERTY_READ_ONLY(PropertyName, GetCount, Getter) \
331 (new plAccessorArrayProperty<OwnType, PL_ARRAY_GETTER_TYPE(OwnType, OwnType::Getter)>( \
332 PropertyName, &OwnType::GetCount, &OwnType::Getter, nullptr, nullptr, nullptr))
333
334#define PL_SET_CONTAINER_TYPE(Class, GetterFunc) decltype(std::declval<Class>().GetterFunc())
335
336#define PL_SET_CONTAINER_SUB_TYPE(Class, GetterFunc) \
337 plContainerSubTypeResolver<plTypeTraits<decltype(std::declval<Class>().GetterFunc())>::NonConstReferenceType>::Type
338
351#define PL_SET_ACCESSOR_PROPERTY(PropertyName, GetValues, Insert, Remove) \
352 (new plAccessorSetProperty<OwnType, plFunctionParameterTypeResolver<0, decltype(&OwnType::Insert)>::ParameterType, \
353 PL_SET_CONTAINER_TYPE(OwnType, GetValues)>(PropertyName, &OwnType::GetValues, &OwnType::Insert, &OwnType::Remove))
354
356#define PL_SET_ACCESSOR_PROPERTY_READ_ONLY(PropertyName, GetValues) \
357 (new plAccessorSetProperty<OwnType, PL_SET_CONTAINER_SUB_TYPE(OwnType, GetValues), PL_SET_CONTAINER_TYPE(OwnType, GetValues)>( \
358 PropertyName, &OwnType::GetValues, nullptr, nullptr))
359
374#define PL_MAP_WRITE_ACCESSOR_PROPERTY(PropertyName, GetContainer, Insert, Remove) \
375 (new plWriteAccessorMapProperty<OwnType, plFunctionParameterTypeResolver<1, decltype(&OwnType::Insert)>::ParameterType, \
376 PL_SET_CONTAINER_TYPE(OwnType, GetContainer)>(PropertyName, &OwnType::GetContainer, &OwnType::Insert, &OwnType::Remove))
377
397#define PL_MAP_ACCESSOR_PROPERTY(PropertyName, GetKeyRange, GetValue, Insert, Remove) \
398 (new plAccessorMapProperty<OwnType, plFunctionParameterTypeResolver<1, decltype(&OwnType::Insert)>::ParameterType, \
399 PL_SET_CONTAINER_TYPE(OwnType, GetKeyRange)>(PropertyName, &OwnType::GetKeyRange, &OwnType::GetValue, &OwnType::Insert, &OwnType::Remove))
400
402#define PL_MAP_ACCESSOR_PROPERTY_READ_ONLY(PropertyName, GetKeyRange, GetValue) \
403 (new plAccessorMapProperty<OwnType, \
404 plTypeTraits<plFunctionParameterTypeResolver<1, decltype(&OwnType::GetValue)>::ParameterType>::NonConstReferenceType, \
405 PL_SET_CONTAINER_TYPE(OwnType, GetKeyRange)>(PropertyName, &OwnType::GetKeyRange, &OwnType::GetValue, nullptr, nullptr))
406
407
408
419#define PL_ENUM_ACCESSOR_PROPERTY(PropertyName, EnumType, Getter, Setter) \
420 (new plEnumAccessorProperty<OwnType, EnumType, PL_GETTER_TYPE(OwnType, OwnType::Getter)>(PropertyName, &OwnType::Getter, &OwnType::Setter))
421
423#define PL_ENUM_ACCESSOR_PROPERTY_READ_ONLY(PropertyName, EnumType, Getter) \
424 (new plEnumAccessorProperty<OwnType, EnumType, PL_GETTER_TYPE(OwnType, OwnType::Getter)>(PropertyName, &OwnType::Getter, nullptr))
425
427#define PL_BITFLAGS_ACCESSOR_PROPERTY(PropertyName, BitflagsType, Getter, Setter) \
428 (new plBitflagsAccessorProperty<OwnType, BitflagsType, PL_GETTER_TYPE(OwnType, OwnType::Getter)>(PropertyName, &OwnType::Getter, &OwnType::Setter))
429
431#define PL_BITFLAGS_ACCESSOR_PROPERTY_READ_ONLY(PropertyName, BitflagsType, Getter) \
432 (new plBitflagsAccessorProperty<OwnType, BitflagsType, PL_GETTER_TYPE(OwnType, OwnType::Getter)>(PropertyName, &OwnType::Getter, nullptr))
433
434
435// [internal] Helper macro to get the type of a class member.
436#define PL_MEMBER_TYPE(Class, Member) decltype(std::declval<Class>().Member)
437
438#define PL_MEMBER_CONTAINER_SUB_TYPE(Class, Member) \
439 plContainerSubTypeResolver<plTypeTraits<decltype(std::declval<Class>().Member)>::NonConstReferenceType>::Type
440
451#define PL_MEMBER_PROPERTY(PropertyName, MemberName) \
452 (new plMemberProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName)>(PropertyName, \
453 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetValue, \
454 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::SetValue, \
455 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetPropertyPointer))
456
458#define PL_MEMBER_PROPERTY_READ_ONLY(PropertyName, MemberName) \
459 (new plMemberProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName)>(PropertyName, \
460 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetValue, nullptr, \
461 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetPropertyPointer))
462
464#define PL_ARRAY_MEMBER_PROPERTY(PropertyName, MemberName) \
465 (new plMemberArrayProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), PL_MEMBER_CONTAINER_SUB_TYPE(OwnType, MemberName)>(PropertyName, \
466 &plArrayPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetConstContainer, \
467 &plArrayPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetContainer))
468
470#define PL_ARRAY_MEMBER_PROPERTY_READ_ONLY(PropertyName, MemberName) \
471 (new plMemberArrayReadOnlyProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), PL_MEMBER_CONTAINER_SUB_TYPE(OwnType, MemberName)>( \
472 PropertyName, &plArrayPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetConstContainer))
473
475#define PL_SET_MEMBER_PROPERTY(PropertyName, MemberName) \
476 (new plMemberSetProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), PL_MEMBER_CONTAINER_SUB_TYPE(OwnType, MemberName)>(PropertyName, \
477 &plSetPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetConstContainer, \
478 &plSetPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetContainer))
479
481#define PL_SET_MEMBER_PROPERTY_READ_ONLY(PropertyName, MemberName) \
482 (new plMemberSetProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), PL_MEMBER_CONTAINER_SUB_TYPE(OwnType, MemberName)>( \
483 PropertyName, &plSetPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetConstContainer, nullptr))
484
486#define PL_MAP_MEMBER_PROPERTY(PropertyName, MemberName) \
487 (new plMemberMapProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), PL_MEMBER_CONTAINER_SUB_TYPE(OwnType, MemberName)>(PropertyName, \
488 &plMapPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetConstContainer, \
489 &plMapPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetContainer))
490
492#define PL_MAP_MEMBER_PROPERTY_READ_ONLY(PropertyName, MemberName) \
493 (new plMemberMapProperty<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), PL_MEMBER_CONTAINER_SUB_TYPE(OwnType, MemberName)>( \
494 PropertyName, &plMapPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetConstContainer, nullptr))
495
508#define PL_ENUM_MEMBER_PROPERTY(PropertyName, EnumType, MemberName) \
509 (new plEnumMemberProperty<OwnType, EnumType, PL_MEMBER_TYPE(OwnType, MemberName)>(PropertyName, \
510 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetValue, \
511 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::SetValue, \
512 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetPropertyPointer))
513
515#define PL_ENUM_MEMBER_PROPERTY_READ_ONLY(PropertyName, EnumType, MemberName) \
516 (new plEnumMemberProperty<OwnType, EnumType, PL_MEMBER_TYPE(OwnType, MemberName)>(PropertyName, \
517 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetValue, nullptr, \
518 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetPropertyPointer))
519
521#define PL_BITFLAGS_MEMBER_PROPERTY(PropertyName, BitflagsType, MemberName) \
522 (new plBitflagsMemberProperty<OwnType, BitflagsType, PL_MEMBER_TYPE(OwnType, MemberName)>(PropertyName, \
523 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetValue, \
524 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::SetValue, \
525 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetPropertyPointer))
526
528#define PL_BITFLAGS_MEMBER_PROPERTY_READ_ONLY(PropertyName, BitflagsType, MemberName) \
529 (new plBitflagsMemberProperty<OwnType, BitflagsType, PL_MEMBER_TYPE(OwnType, MemberName)>(PropertyName, \
530 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetValue, nullptr, \
531 &plPropertyAccessor<OwnType, PL_MEMBER_TYPE(OwnType, MemberName), &OwnType::MemberName>::GetPropertyPointer))
532
533
534
541#define PL_CONSTANT_PROPERTY(PropertyName, Value) (new plConstantProperty<decltype(Value)>(PropertyName, Value))
542
543
544
545// [internal] Helper macro
546#define PL_ENUM_VALUE_TO_CONSTANT_PROPERTY(name) PL_CONSTANT_PROPERTY(PL_PP_STRINGIFY(name), (Storage)name),
547
550#define PL_ENUM_CONSTANTS(...) PL_EXPAND_ARGS(PL_ENUM_VALUE_TO_CONSTANT_PROPERTY, ##__VA_ARGS__)
551
554#define PL_ENUM_CONSTANT(Value) PL_CONSTANT_PROPERTY(PL_PP_STRINGIFY(Value), (Storage)Value)
555
558#define PL_BITFLAGS_CONSTANTS(...) PL_EXPAND_ARGS(PL_ENUM_VALUE_TO_CONSTANT_PROPERTY, ##__VA_ARGS__)
559
562#define PL_BITFLAGS_CONSTANT(Value) PL_CONSTANT_PROPERTY(PL_PP_STRINGIFY(Value), (Storage)Value)
563
564
565
572#define PL_BEGIN_STATIC_REFLECTED_ENUM(Type, Version) \
573 PL_BEGIN_STATIC_REFLECTED_TYPE(Type, plEnumBase, Version, plRTTINoAllocator) \
574 ; \
575 using Storage = Type::StorageType; \
576 PL_BEGIN_PROPERTIES \
577 { \
578 PL_CONSTANT_PROPERTY(PL_PP_STRINGIFY(Type::Default), (Storage)Type::Default),
579
580#define PL_END_STATIC_REFLECTED_ENUM \
581 } \
582 PL_END_PROPERTIES \
583 ; \
584 flags |= plTypeFlags::IsEnum; \
585 flags.Remove(plTypeFlags::Class); \
586 PL_END_STATIC_REFLECTED_TYPE
587
588
595#define PL_BEGIN_STATIC_REFLECTED_BITFLAGS(Type, Version) \
596 PL_BEGIN_STATIC_REFLECTED_TYPE(Type, plBitflagsBase, Version, plRTTINoAllocator) \
597 ; \
598 using Storage = Type::StorageType; \
599 PL_BEGIN_PROPERTIES \
600 { \
601 PL_CONSTANT_PROPERTY(PL_PP_STRINGIFY(Type::Default), (Storage)Type::Default),
602
603#define PL_END_STATIC_REFLECTED_BITFLAGS \
604 } \
605 PL_END_PROPERTIES \
606 ; \
607 flags |= plTypeFlags::Bitflags; \
608 flags.Remove(plTypeFlags::Class); \
609 PL_END_STATIC_REFLECTED_TYPE
610
611
612
615#define PL_BEGIN_MESSAGEHANDLERS static plAbstractMessageHandler* HandlerList[] =
616
617
619#define PL_END_MESSAGEHANDLERS \
620 ; \
621 MessageHandlers = HandlerList
622
623
632#define PL_MESSAGE_HANDLER(MessageType, FunctionName) \
633 new plInternal::MessageHandler<PL_IS_CONST_MESSAGE_HANDLER(OwnType, MessageType, &OwnType::FunctionName)>::Impl<OwnType, MessageType, \
634 &OwnType::FunctionName>()
635
636
639#define PL_BEGIN_MESSAGESENDERS static plMessageSenderInfo SenderList[] =
640
641
643#define PL_END_MESSAGESENDERS \
644 ; \
645 MessageSenders = SenderList;
646
653#define PL_MESSAGE_SENDER(MemberName) \
654 { \
655 #MemberName, plGetStaticRTTI<PL_MEMBER_TYPE(OwnType, MemberName)::MessageType>() \
656 }
Dummy type to pass to templates and macros that expect a base type for a class that has no base.
Definition Types.h:133
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
PL_ALWAYS_INLINE void Add(const plBitflags< T > &rhs)
Sets the given flag.
Definition Bitflags.h:151
[internal] Helper struct for accessing static RTTI data.
Definition StaticRTTI.h:54
Definition StaticRTTI.h:111
Type traits.
Definition TypeTraits.h:12
Definition StaticRTTI.h:33
Flags that describe a reflected type.
Definition StaticRTTI.h:16
Enum
Definition StaticRTTI.h:20
@ Minimal
Does not contain any property, function or attribute information. Used only for versioning.
Definition StaticRTTI.h:28
@ Bitflags
bitflags struct used for plBitflags.
Definition StaticRTTI.h:23
@ IsEnum
enum struct used for plEnum.
Definition StaticRTTI.h:22
@ Abstract
Type is abstract.
Definition StaticRTTI.h:26
@ StandardType
Anything that can be stored inside an plVariant except for pointers and containers.
Definition StaticRTTI.h:21
@ Class
A class or struct. The above flags are mutually exclusive.
Definition StaticRTTI.h:24
@ Phantom
De-serialized type information that cannot be created on this process.
Definition StaticRTTI.h:27
A helper struct to convert the C++ type, which is passed as the template argument,...
Definition VariantType.h:97
Enum
This enum describes the type of data that is currently stored inside the variant. Note that changes t...
Definition VariantType.h:26
@ FirstStandardType
*** Types that are flagged as 'StandardTypes' (see DetermineTypeFlags) ***
Definition VariantType.h:30