AddProcessToInterval.hpp
1 #pragma once
2 #include <Process/Process.hpp>
3 #include <Process/ProcessFactory.hpp>
4 #include <Process/ProcessList.hpp>
5 
6 #include <Scenario/Commands/Interval/AddOnlyProcessToInterval.hpp>
7 #include <Scenario/Commands/ScenarioCommandFactory.hpp>
8 #include <Scenario/Document/Interval/IntervalModel.hpp>
9 #include <Scenario/Document/Interval/Slot.hpp>
10 #include <Scenario/Document/State/ItemModel/MessageItemModel.hpp>
11 #include <Scenario/Document/State/StateModel.hpp>
12 #include <Scenario/Process/Algorithms/Accessors.hpp>
13 #include <Scenario/Process/ScenarioInterface.hpp>
14 #include <Scenario/Process/ScenarioModel.hpp>
15 #include <Scenario/Settings/ScenarioSettingsModel.hpp>
16 
17 #include <score/application/ApplicationContext.hpp>
18 #include <score/command/AggregateCommand.hpp>
19 #include <score/command/Command.hpp>
20 #include <score/model/EntityMap.hpp>
21 #include <score/model/Identifier.hpp>
22 #include <score/model/path/Path.hpp>
23 #include <score/model/path/PathSerialization.hpp>
24 #include <score/plugins/InterfaceList.hpp>
25 #include <score/plugins/StringFactoryKey.hpp>
27 #include <score/tools/IdentifierGeneration.hpp>
28 #include <score/tools/std/Optional.hpp>
29 
30 #include <QString>
31 
32 #include <vector>
33 
34 namespace Scenario
35 {
36 namespace Command
37 {
38 class SCORE_PLUGIN_SCENARIO_EXPORT LoadLayerInInterval final : public score::Command
39 {
40  SCORE_COMMAND_DECL(
41  CommandFactoryName(), LoadLayerInInterval, "Load a process in an interval")
42 
43 public:
44  LoadLayerInInterval(const IntervalModel& interval, const rapidjson::Value& dat);
46 
47  void undo(const score::DocumentContext& ctx) const override;
48  void redo(const score::DocumentContext& ctx) const override;
49 
50  const Path<IntervalModel>& intervalPath() const;
51  const Id<Process::ProcessModel>& processId() const;
52 
53 private:
54  void serializeImpl(DataStreamInput& s) const override;
55  void deserializeImpl(DataStreamOutput& s) override;
56  LoadOnlyLayerInInterval m_addProcessCommand;
57  bool m_addedSlot{};
58 };
59 
60 class SCORE_PLUGIN_SCENARIO_EXPORT AddProcessInNewBoxMacro final
62 {
63  SCORE_COMMAND_DECL(
64  CommandFactoryName(), AddProcessInNewBoxMacro, "Add a process in a new box")
65 
66 public:
68 };
69 
70 class SCORE_PLUGIN_SCENARIO_EXPORT DropProcessInIntervalMacro final
72 {
73  SCORE_COMMAND_DECL(
74  CommandFactoryName(), DropProcessInIntervalMacro, "Drop a process in an interval")
75 };
76 
77 class SCORE_PLUGIN_SCENARIO_EXPORT DropProcessInStateMacro final
79 {
80  SCORE_COMMAND_DECL(
81  CommandFactoryName(), DropProcessInStateMacro, "Drop a process in a state")
82 };
83 }
84 }
The Path class is a typesafe wrapper around ObjectPath.
Definition: Path.hpp:52
Definition: AddProcessToInterval.hpp:62
Definition: AddProcessToInterval.hpp:72
Definition: AddProcessToInterval.hpp:79
Definition: AddProcessToInterval.hpp:39
Definition: AddOnlyProcessToInterval.hpp:66
Definition: IntervalModel.hpp:50
The id_base_t class.
Definition: Identifier.hpp:57
Allows for grouping of multiple commands in a single one.
Definition: AggregateCommand.hpp:15
The Command class.
Definition: Command.hpp:34
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