Plasma Engine  2.0
Loading...
Searching...
No Matches
StateMachineGraph.h
1#pragma once
2
3#include <ToolsFoundation/NodeObject/DocumentNodeManager.h>
4
5class plStateMachinePin : public plPin
6{
7 PL_ADD_DYNAMIC_REFLECTION(plStateMachinePin, plPin);
8
9public:
10 plStateMachinePin(Type type, const plDocumentObject* pObject);
11};
12
14{
15public:
18
19 bool IsInitialState(const plDocumentObject* pObject) const;
20 const plDocumentObject* GetInitialState() const;
21
22 bool IsAnyState(const plDocumentObject* pObject) const;
23
24private:
25 virtual bool InternalIsNode(const plDocumentObject* pObject) const override;
26 virtual plStatus InternalCanConnect(const plPin& source, const plPin& target, CanConnectResult& out_Result) const override;
27
28 virtual void InternalCreatePins(const plDocumentObject* pObject, NodeInternal& node) override;
29
30 virtual void GetCreateableTypes(plHybridArray<const plRTTI*, 32>& Types) const override;
31 virtual const plRTTI* GetConnectionType() const override;
32
33 void StructureEventHandler(const plDocumentObjectStructureEvent& e);
34};
35
37{
38 PL_ADD_DYNAMIC_REFLECTION(plStateMachine_SetInitialStateCommand, plCommand);
39
40public:
42
43public: // Properties
44 plUuid m_NewInitialStateObject;
45
46private:
47 virtual plStatus DoInternal(bool bRedo) override;
48 virtual plStatus UndoInternal(bool bFireEvents) override;
49 virtual void CleanupInternal(CommandState state) override {}
50
51private:
52 plDocumentObject* m_pOldInitialStateObject = nullptr;
53 plDocumentObject* m_pNewInitialStateObject = nullptr;
54};
Interface for a command.
Definition Command.h:15
Definition DocumentNodeManager.h:141
CanConnectResult
Definition DocumentNodeManager.h:165
Definition DocumentObjectBase.h:11
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition DocumentNodeManager.h:59
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
Definition StateMachineGraph.h:37
Definition StateMachineGraph.h:14
Definition StateMachineGraph.h:6
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
Definition DocumentNodeManager.h:210
Used by plDocumentObjectManager::m_StructureEvents.
Definition DocumentObjectManager.h:45
An plResult with an additional message for the reason of failure.
Definition Status.h:12