Loading...
Searching...
No Matches
AddLayerInNewSlot.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#include <score/tools/std/Optional.hpp>
8
9struct DataStreamInput;
10struct DataStreamOutput;
11namespace Process
12{
13class ProcessModel;
14}
15
16namespace Scenario
17{
18class IntervalModel;
19namespace Command
20{
24class SCORE_PLUGIN_SCENARIO_EXPORT AddLayerInNewSlot final : public score::Command
25{
26 SCORE_COMMAND_DECL(CommandFactoryName(), AddLayerInNewSlot, "Add a new layer")
27public:
29 Path<IntervalModel>&& intervalPath, Id<Process::ProcessModel> process);
30
31 void undo(const score::DocumentContext& ctx) const override;
32 void redo(const score::DocumentContext& ctx) const override;
33
34 Id<Process::ProcessModel> processId() const { return m_processId; }
35
36protected:
37 void serializeImpl(DataStreamInput&) const override;
38 void deserializeImpl(DataStreamOutput&) override;
39
40private:
42 Id<Process::ProcessModel> m_processId{};
43};
44}
45}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
The AddLayerInNewSlot class.
Definition AddLayerInNewSlot.hpp:25
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