Plasma Engine  2.0
Loading...
Searching...
No Matches
PhantomRttiManager.h
1#pragma once
2
3#include <Foundation/Communication/Event.h>
4#include <Foundation/Containers/IdTable.h>
5#include <ToolsFoundation/Reflection/ReflectedType.h>
6
7class plPhantomRTTI;
8
10{
11 enum class Type
12 {
13 TypeAdded,
14 TypeRemoved,
15 TypeChanged,
16 };
17
19
20 = default;
21
22 Type m_Type = Type::TypeAdded;
23 const plRTTI* m_pChangedType = nullptr;
24};
25
30class PL_TOOLSFOUNDATION_DLL plPhantomRttiManager
31{
32public:
43 static const plRTTI* RegisterType(plReflectedTypeDescriptor& ref_desc);
44
48 static bool UnregisterType(const plRTTI* pRtti);
49
50private:
51 PL_MAKE_SUBSYSTEM_STARTUP_FRIEND(ToolsFoundation, ReflectedTypeManager);
52
53 static void Startup();
54 static void Shutdown();
55 static void PluginEventHandler(const plPluginEvent& e);
56
57public:
59
60private:
61 static plSet<const plRTTI*> s_RegisteredConcreteTypes;
62 static plHashTable<plStringView, plPhantomRTTI*> s_NameToPhantom;
63};
Definition Event.h:177
Definition HashTable.h:333
Definition PhantomRtti.h:7
Manages all plPhantomRTTI types that have been added to him.
Definition PhantomRttiManager.h:31
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
Definition Set.h:238
Definition PhantomRttiManager.h:10
The data that is broadcast whenever a plugin is (un-) loaded.
Definition Plugin.h:11
Stores the description of a reflected type in a serializable form. Used by plPhantomRttiManager to ad...
Definition ReflectedType.h:95