Loading...
Searching...
No Matches
AddStateProcess.hpp
1#pragma once
2#include <Scenario/Commands/ScenarioCommandFactory.hpp>
3
4#include <score/command/Command.hpp>
5#include <score/model/Identifier.hpp>
6#include <score/model/path/Path.hpp>
7
8#include <score_plugin_scenario_export.h>
9
10// RENAMEME
11
12namespace Process
13{
14class ProcessModel;
15class ProcessFactory;
16}
17namespace Scenario
18{
19class StateModel;
20namespace Command
21{
22class SCORE_PLUGIN_SCENARIO_EXPORT AddStateProcessToState final : public score::Command
23{
24 SCORE_COMMAND_DECL(CommandFactoryName(), AddStateProcessToState, "Add a state process")
25public:
30 const QString& data);
33 UuidKey<Process::ProcessModel> process, const QString& data);
34
35 void undo(const score::DocumentContext& ctx) const override;
36 void redo(const score::DocumentContext& ctx) const override;
37
38 const Id<Process::ProcessModel>& processId() const noexcept
39 {
40 return m_createdProcessId;
41 }
42
43protected:
44 void serializeImpl(DataStreamInput& s) const override;
45 void deserializeImpl(DataStreamOutput& s) override;
46
47private:
48 Path<StateModel> m_path;
50 QString m_data{};
51 Id<Process::ProcessModel> m_createdProcessId{};
52};
53}
54}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition AddStateProcess.hpp:23
Definition StateModel.hpp:63
Definition UuidKey.hpp:343
The id_base_t class.
Definition Identifier.hpp:57
The Command class.
Definition Command.hpp:34
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18