Plasma Engine  2.0
Loading...
Searching...
No Matches
GameObjectContextDocument.h
1#pragma once
2
3#include <EditorFramework/Document/GameObjectDocument.h>
4#include <EditorFramework/EditorFrameworkDLL.h>
5
6struct PL_EDITORFRAMEWORK_DLL plGameObjectContextEvent
7{
8 enum class Type
9 {
10 ContextAboutToBeChanged,
11 ContextChanged,
12 };
13 Type m_Type;
14};
15
16class PL_EDITORFRAMEWORK_DLL plGameObjectContextDocument : public plGameObjectDocument
17{
18 PL_ADD_DYNAMIC_REFLECTION(plGameObjectContextDocument, plGameObjectDocument);
19
20public:
22 plAssetDocEngineConnection engineConnectionType = plAssetDocEngineConnection::FullObjectMirroring);
24
25 plStatus SetContext(plUuid documentGuid, plUuid objectGuid);
26 plUuid GetContextDocumentGuid() const;
27 plUuid GetContextObjectGuid() const;
28 const plDocumentObject* GetContextObject() const;
29
30 mutable plEvent<const plGameObjectContextEvent&> m_GameObjectContextEvents;
31
32protected:
33 virtual void InitializeAfterLoading(bool bFirstTimeCreation) override;
34
35private:
36 void ClearContext();
37
38private:
39 plUuid m_ContextDocument;
40 plUuid m_ContextObject;
41};
Definition DocumentObjectBase.h:11
Represents to content of a document. Every document has exactly one root object under which all objec...
Definition DocumentObjectManager.h:116
Definition Event.h:177
Definition GameObjectContextDocument.h:17
Definition GameObjectDocument.h:95
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
Definition GameObjectContextDocument.h:7
An plResult with an additional message for the reason of failure.
Definition Status.h:12