Loading...
Searching...
No Matches
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/AggregateCommand.hpp>
8#include <score/command/Command.hpp>
9#include <score/model/Identifier.hpp>
10#include <score/model/path/Path.hpp>
11#include <score/tools/std/Optional.hpp>
12
13#include <QByteArray>
14struct DataStreamInput;
15struct DataStreamOutput;
16namespace Process
17{
18class ProcessModel;
19}
20
21#include <score_plugin_scenario_export.h>
22
23namespace Scenario
24{
25class IntervalModel;
26namespace Command
27{
28class SCORE_PLUGIN_SCENARIO_TEST_EXPORT RemoveProcessFromInterval final : public score::Command
29{
30 SCORE_COMMAND_DECL(CommandFactoryName(), RemoveProcessFromInterval, "Remove a process")
31public:
33 const IntervalModel& cst, Id<Process::ProcessModel> processId);
34 void undo(const score::DocumentContext& ctx) const override;
35 void redo(const score::DocumentContext& ctx) const override;
36
37protected:
38 void serializeImpl(DataStreamInput&) const override;
39 void deserializeImpl(DataStreamOutput&) override;
40
41private:
43 Id<Process::ProcessModel> m_processId;
44 QByteArray m_serializedProcessData;
45 Dataflow::SerializedCables m_cables;
46
47 Rack m_smallView;
48 bool m_smallViewVisible{};
49};
50
52{
53 SCORE_COMMAND_DECL(
54 CommandFactoryName(), RemoveProcessAndKeepLinked, "Remove process from chain")
55};
56
58{
59 SCORE_COMMAND_DECL(
60 CommandFactoryName(), RemoveMultipleProcessesFromInterval, "Remove processes")
61};
62}
63}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition RemoveProcessFromInterval.hpp:58
Definition RemoveProcessFromInterval.hpp:52
Definition RemoveProcessFromInterval.hpp:29
Definition IntervalModel.hpp:50
The id_base_t class.
Definition Identifier.hpp:59
Allows for grouping of multiple commands in a single one.
Definition AggregateCommand.hpp:15
The Command class.
Definition Command.hpp:34
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
Main plug-in of score.
Definition ConnectionsList.hpp:22
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18