Loading...
Searching...
No Matches
ScenarioGlobalCommandManager.hpp
1#pragma once
2#include <Scenario/Process/Algorithms/Accessors.hpp>
3
4#include <QList>
5
6#include <score_plugin_scenario_export.h>
7class BaseScenario;
8namespace Scenario
9{
10class IntervalModel;
11class StateModel;
12class ProcessModel;
13class BaseScenarioContainer;
14class ScenarioInterface;
15} // namespace Scenario
16namespace score
17{
18class CommandStackFacade;
19} // namespace score
20
21namespace Scenario
22{
23// Remove elements : only makes sense where elements can be removed,
24// i.e. with a Scenario
25void removeSelection(const Scenario::ProcessModel&, const score::DocumentContext& ctx);
26void removeSelection(const BaseScenario&, const score::DocumentContext& ctx);
27
28void removeSelection(const score::DocumentContext& ctx);
29// Clearing content should be available for other plug-ins, e.g. loop
30SCORE_PLUGIN_SCENARIO_EXPORT void clearContentFromSelection(
31 const Scenario::ScenarioInterface& iface, const score::DocumentContext& stack);
32
33void mergeTimeSyncs(const Scenario::ProcessModel&, const score::CommandStackFacade&);
34void mergeEvents(const Scenario::ProcessModel&, const score::CommandStackFacade&);
35
36// MOVEME : these are useful.
37template <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
47struct 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:13
Base toolkit upon which the software is built.
Definition Application.cpp:90
Definition ScenarioGlobalCommandManager.hpp:48
Definition ScenarioGlobalCommandManager.hpp:39
Definition DocumentContext.hpp:18