RemoveProcessFromInterval.hpp
1 #pragma once
2 #include <Scenario/Commands/ScenarioCommandFactory.hpp>
3 #include <Scenario/Document/Interval/Slot.hpp>
4 
5 #include <Dataflow/Commands/CableHelpers.hpp>
6 
7 #include <score/command/Command.hpp>
8 #include <score/model/Identifier.hpp>
9 #include <score/model/path/Path.hpp>
10 #include <score/tools/std/Optional.hpp>
11 
12 #include <QByteArray>
13 struct DataStreamInput;
14 struct DataStreamOutput;
15 namespace Process
16 {
17 class ProcessModel;
18 }
19 
20 namespace Scenario
21 {
22 class IntervalModel;
23 namespace Command
24 {
26 {
27  SCORE_COMMAND_DECL(CommandFactoryName(), RemoveProcessFromInterval, "Remove a process")
28 public:
30  const IntervalModel& cst, Id<Process::ProcessModel> processId);
31  void undo(const score::DocumentContext& ctx) const override;
32  void redo(const score::DocumentContext& ctx) const override;
33 
34 protected:
35  void serializeImpl(DataStreamInput&) const override;
36  void deserializeImpl(DataStreamOutput&) override;
37 
38 private:
39  Path<IntervalModel> m_path;
40  Id<Process::ProcessModel> m_processId;
41  QByteArray m_serializedProcessData;
42  Dataflow::SerializedCables m_cables;
43 
44  Rack m_smallView;
45  bool m_smallViewVisible{};
46 };
47 }
48 }
The Path class is a typesafe wrapper around ObjectPath.
Definition: Path.hpp:52
Definition: RemoveProcessFromInterval.hpp:26
Definition: IntervalModel.hpp:50
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:14
Definition: DataStreamHelpers.hpp:99
Definition: DataStreamHelpers.hpp:103
Definition: DocumentContext.hpp:18