Loading...
Searching...
No Matches
RemoveStateProcess.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>
9namespace Process
10{
11class ProcessModel;
12class ProcessFactory;
13}
14namespace Scenario
15{
16class StateModel;
17namespace Command
18{
19
20class SCORE_PLUGIN_SCENARIO_EXPORT RemoveStateProcess final : public score::Command
21{
22 SCORE_COMMAND_DECL(CommandFactoryName(), RemoveStateProcess, "Remove a state process")
23public:
25 const Scenario::StateModel& state, Id<Process::ProcessModel> processId);
26
27 void undo(const score::DocumentContext& ctx) const override;
28 void redo(const score::DocumentContext& ctx) const override;
29
30protected:
31 void serializeImpl(DataStreamInput& s) const override;
32 void deserializeImpl(DataStreamOutput& s) override;
33
34private:
35 Path<StateModel> m_path;
37
38 Id<Process::ProcessModel> m_processId{};
39 QByteArray m_data;
40};
41}
42}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition RemoveStateProcess.hpp:21
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