![]() |
ezEngine Release 26.3
|
Context object that manages object lifetime and relationships during RTTI-based conversion. More...
#include <RttiConverter.h>

Public Member Functions | |
| virtual void | Clear () |
| Clears all cached objects and resets the context state. | |
| virtual ezUuid | GenerateObjectGuid (const ezUuid &parentGuid, const ezAbstractProperty *pProp, ezVariant index, void *pObject) const |
| Generates a guid for a new object. Default implementation generates stable guids derived from parentGuid + property name + index and ignores the address of pObject. | |
| virtual ezInternal::NewInstance< void > | CreateObject (const ezUuid &guid, const ezRTTI *pRtti) |
| virtual void | DeleteObject (const ezUuid &guid) |
| virtual void | RegisterObject (const ezUuid &guid, const ezRTTI *pRtti, void *pObject) |
| virtual void | UnregisterObject (const ezUuid &guid) |
| virtual ezRttiConverterObject | GetObjectByGUID (const ezUuid &guid) const |
| virtual ezUuid | GetObjectGUID (const ezRTTI *pRtti, const void *pObject) const |
| virtual const ezRTTI * | FindTypeByName (ezStringView sName) const |
| template<typename T > | |
| void | GetObjectsByType (ezDynamicArray< T * > &out_objects, ezDynamicArray< ezUuid > *out_pUuids=nullptr) |
| virtual ezUuid | EnqueObject (const ezUuid &guid, const ezRTTI *pRtti, void *pObject) |
| virtual ezRttiConverterObject | DequeueObject () |
| virtual void | OnUnknownTypeError (ezStringView sTypeName) |
Protected Attributes | |
| ezHashTable< ezUuid, ezRttiConverterObject > | m_GuidToObject |
| ezHashTable< const void *, ezUuid > | m_ObjectToGuid |
| ezSet< ezUuid > | m_QueuedObjects |
Context object that manages object lifetime and relationships during RTTI-based conversion.
This class provides the infrastructure for converting between native objects and abstract object graphs. It handles object creation, deletion, GUID management, and type resolution during both serialization and deserialization processes.
Key responsibilities:
The context can be customized by overriding virtual methods to implement:
|
virtual |
Clears all cached objects and resets the context state.
Reimplemented in ezWorldRttiConverterContext.
|
virtual |
Generates a guid for a new object. Default implementation generates stable guids derived from parentGuid + property name + index and ignores the address of pObject.
Reimplemented in ezApplyNativePropertyChangesContext.