AddLayerModelToSlot.hpp
1 #pragma once
2 #include <Scenario/Commands/ScenarioCommandFactory.hpp>
3 #include <Scenario/Document/Interval/IntervalModel.hpp>
4 
5 #include <score/command/Command.hpp>
6 #include <score/model/Identifier.hpp>
7 #include <score/model/path/Path.hpp>
8 #include <score/tools/std/Optional.hpp>
9 
10 #include <score_plugin_scenario_export.h>
11 struct DataStreamInput;
12 struct DataStreamOutput;
13 namespace Process
14 {
15 class ProcessModel;
16 }
17 
18 namespace Scenario
19 {
20 namespace Command
21 {
27 class SCORE_PLUGIN_SCENARIO_EXPORT AddLayerModelToSlot final : public score::Command
28 {
29  SCORE_COMMAND_DECL(CommandFactoryName(), AddLayerModelToSlot, "Add a layer to a slot")
30 public:
32  AddLayerModelToSlot(const SlotPath& slot, const Process::ProcessModel& process);
33 
34  void undo(const score::DocumentContext& ctx) const override;
35  void redo(const score::DocumentContext& ctx) const override;
36 
37 protected:
38  void serializeImpl(DataStreamInput&) const override;
39  void deserializeImpl(DataStreamOutput&) override;
40 
41 private:
42  SlotPath m_slot;
43  Id<Process::ProcessModel> m_processId;
44 };
45 }
46 }
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
The AddLayerToSlot class.
Definition: AddLayerModelToSlot.hpp:28
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: Slot.hpp:54
Definition: DocumentContext.hpp:18