Plasma Engine  2.0
Loading...
Searching...
No Matches
SyncObject.h
1#pragma once
2
3#include <EditorEngineProcessFramework/EditorEngineProcessFrameworkDLL.h>
4#include <Foundation/Reflection/Reflection.h>
5#include <Foundation/Utilities/EnumerableClass.h>
6#include <ToolsFoundation/ToolsFoundationDLL.h>
7
8class plWorld;
9
10class PL_EDITORENGINEPROCESSFRAMEWORK_DLL plEditorEngineSyncObject : public plReflectedClass
11{
12 PL_ADD_DYNAMIC_REFLECTION(plEditorEngineSyncObject, plReflectedClass);
13
14public:
17
18 void Configure(plUuid ownerGuid, plDelegate<void(plEditorEngineSyncObject*)> onDestruction);
19
20 plUuid GetDocumentGuid() const;
21 void SetModified(bool b = true) { m_bModified = b; }
22 bool GetModified() const { return m_bModified; }
23
24 plUuid GetGuid() const { return m_SyncObjectGuid; }
25
26 // \brief One-time setup on the engine side.
27 // \returns Whether the sync object is pickable via uiNextComponentPickingID.
28 virtual bool SetupForEngine(plWorld* pWorld, plUInt32 uiNextComponentPickingID) { return false; }
29 virtual void UpdateForEngine(plWorld* pWorld) {}
30
31private:
32 PL_ALLOW_PRIVATE_PROPERTIES(plEditorEngineSyncObject);
33
34 friend class plAssetDocument;
35
36 bool m_bModified;
37 plUuid m_SyncObjectGuid;
38 plUuid m_OwnerGuid;
39
40 plDelegate<void(plEditorEngineSyncObject*)> m_OnDestruction;
41};
Definition AssetDocument.h:42
Definition SyncObject.h:11
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
A generic delegate class which supports static functions and member functions.
Definition Delegate.h:76