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
21namespace Scenario
22{
23class IntervalModel;
24namespace Command
25{
27{
28 SCORE_COMMAND_DECL(CommandFactoryName(), RemoveProcessFromInterval, "Remove a process")
29public:
31 const IntervalModel& cst, Id<Process::ProcessModel> processId);
32 void undo(const score::DocumentContext& ctx) const override;
33 void redo(const score::DocumentContext& ctx) const override;
34
35protected:
36 void serializeImpl(DataStreamInput&) const override;
37 void deserializeImpl(DataStreamOutput&) override;
38
39private:
41 Id<Process::ProcessModel> m_processId;
42 QByteArray m_serializedProcessData;
43 Dataflow::SerializedCables m_cables;
44
45 Rack m_smallView;
46 bool m_smallViewVisible{};
47};
48
50{
51 SCORE_COMMAND_DECL(
52 CommandFactoryName(), RemoveProcessAndKeepLinked, "Remove process from chain")
53};
54}
55}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition RemoveProcessFromInterval.hpp:50
Definition RemoveProcessFromInterval.hpp:27
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 score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18