5#include <Foundation/Algorithm/HashingUtils.h>
6#include <Foundation/Basics.h>
7#include <Foundation/Configuration/Singleton.h>
8#include <Foundation/Configuration/Startup.h>
9#include <Foundation/Containers/HashTable.h>
10#include <Foundation/Reflection/Reflection.h>
11#include <Foundation/Serialization/GraphPatch.h>
12#include <Foundation/Strings/HashedString.h>
28 m_uiTypeVersion = uiTypeVersion;
30 PL_DECLARE_POD_TYPE();
32 plUInt32 m_uiTypeVersion;
38 PL_FORCE_INLINE
static plUInt32 Hash(
const plVersionKey& a)
40 auto typeNameHash = a.m_sType.
GetHash();
48 return a.m_sType == b.m_sType && a.m_uiTypeVersion == b.m_uiTypeVersion;
55 const char* GetTypeName()
const;
56 void SetTypeName(
const char* szName);
57 const char* GetParentTypeName()
const;
58 void SetParentTypeName(
const char* szName);
62 plUInt32 m_uiTypeVersion;
75 void PatchBaseClass(
const char* szType, plUInt32 uiTypeVersion,
bool bForcePatch =
false);
78 void RenameClass(
const char* szTypeName);
81 void RenameClass(
const char* szTypeName, plUInt32 uiVersion);
90 void Patch(plUInt32 uiBaseClassIndex, plUInt32 uiTypeVersion,
bool bForcePatch);
91 void UpdateBaseClasses();
98 plUInt32 m_uiBaseClassIndex = 0;
120 PL_MAKE_SUBSYSTEM_STARTUP_FRIEND(Foundation, GraphVersioning);
123 void UpdatePatches();
Definition AbstractObjectGraph.h:115
Definition AbstractObjectGraph.h:17
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
Definition DynamicArray.h:81
Handles the patching of a node. Is passed into the patch classes to provide utility functions and tra...
Definition GraphVersioning.h:69
Patch base class for plAbstractObjectGraph patches.
Definition GraphPatch.h:20
Singleton that allows version patching of plAbstractObjectGraph.
Definition GraphVersioning.h:106
Definition HashTable.h:333
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
void Assign(const char(&string)[N])
Assigning a new string from a string constant is a slow operation, but the hash computation can happe...
plUInt64 GetHash() const
Returns the hash of the stored string.
Definition HashedString_inl.h:115
static plUInt32 xxHash32(const void *pKey, size_t uiSizeInByte, plUInt32 uiSeed=0)
Calculates the 32bit xxHash of the given key.
Definition HashingUtils.cpp:209
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Hash helper class for plVersionKey.
Definition GraphVersioning.h:37
The data that is broadcast whenever a plugin is (un-) loaded.
Definition Plugin.h:11
A class that overlaps plReflectedTypeDescriptor with the properties needed for patching.
Definition GraphVersioning.h:54
Tuple used for identifying patches and tracking patch progression.
Definition GraphVersioning.h:23