ScenarioGlobalCommandManager.hpp
1 #pragma once
2 #include <Scenario/Process/Algorithms/Accessors.hpp>
3 
4 #include <QList>
5 
6 #include <score_plugin_scenario_export.h>
7 class BaseScenario;
8 namespace Scenario
9 {
10 class IntervalModel;
11 class StateModel;
12 class ProcessModel;
13 class BaseScenarioContainer;
14 class ScenarioInterface;
15 } // namespace Scenario
16 namespace score
17 {
18 class CommandStackFacade;
19 } // namespace score
20 
21 namespace Scenario
22 {
23 // Remove elements : only makes sense where elements can be removed,
24 // i.e. with a Scenario
25 void removeSelection(const Scenario::ProcessModel&, const score::DocumentContext& ctx);
26 void removeSelection(const BaseScenario&, const score::DocumentContext& ctx);
27 
28 void removeSelection(const score::DocumentContext& ctx);
29 // Clearing content should be available for other plug-ins, e.g. loop
30 SCORE_PLUGIN_SCENARIO_EXPORT void clearContentFromSelection(
31  const Scenario::ScenarioInterface& iface, const score::DocumentContext& stack);
32 
33 void mergeTimeSyncs(const Scenario::ProcessModel&, const score::CommandStackFacade&);
34 void mergeEvents(const Scenario::ProcessModel&, const score::CommandStackFacade&);
35 
36 // MOVEME : these are useful.
37 template <typename T>
39 {
40  const Scenario::ProcessModel* scenario;
41  bool operator()(const T* lhs, const T* rhs) const
42  {
43  return Scenario::date(*lhs, *scenario) < Scenario::date(*rhs, *scenario);
44  }
45 };
46 
47 struct SCORE_PLUGIN_SCENARIO_EXPORT EndDateComparator
48 {
49  const Scenario::ProcessModel* scenario;
50  bool operator()(const IntervalModel* lhs, const IntervalModel* rhs) const;
51 };
52 }
Definition: IntervalModel.hpp:50
The core hierarchical and temporal process of score.
Definition: ScenarioModel.hpp:37
Definition: ScenarioInterface.hpp:20
A small abstraction layer over the score::CommandStack.
Definition: CommandStackFacade.hpp:20
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: ScenarioGlobalCommandManager.hpp:48
Definition: ScenarioGlobalCommandManager.hpp:39
Definition: DocumentContext.hpp:18