Loading...
Searching...
No Matches
BaseScenarioDisplayedElements_StateWrappers.hpp
1#pragma once
2#include <Scenario/Commands/MoveBaseEvent.hpp>
3#include <Scenario/Document/BaseScenario/BaseScenario.hpp>
4#include <Scenario/Palette/Tools/SmartTool.hpp>
5#include <Scenario/Palette/Tools/States/MoveAndMergeState.hpp>
6#include <Scenario/Palette/Tools/States/MoveStates.hpp>
7#include <Scenario/Palette/Transitions/EventTransitions.hpp>
8#include <Scenario/Palette/Transitions/IntervalTransitions.hpp>
9#include <Scenario/Palette/Transitions/StateTransitions.hpp>
10#include <Scenario/Palette/Transitions/TimeSyncTransitions.hpp>
11
12namespace Scenario
13{
15{
16public:
17 template <typename Scenario_T, typename ToolPalette_T>
18 static auto make(const ToolPalette_T& palette, QState* waitState, QState& sm)
19 {
20 // We cannot move the interval
21 return nullptr;
22 }
23};
24
26{
27public:
28 template <typename Scenario_T, typename ToolPalette_T>
29 static auto make(const ToolPalette_T& palette, QState* waitState, QState& sm)
30 {
32 auto moveEvent = new Scenario::MoveEventState<
33 Command::MoveBaseEvent<Scenario_T>, Scenario_T, ToolPalette_T>{
34 palette, palette.model(), palette.context().context.commandStack,
35 palette.context().context.objectLocker, &sm};
36
37 score::make_transition<Scenario::ClickOnEndState_Transition<Scenario_T>>(
38 waitState, moveEvent, *moveEvent);
39
40 score::make_transition<Scenario::ClickOnEndEvent_Transition<Scenario_T>>(
41 waitState, moveEvent, *moveEvent);
42 moveEvent->addTransition(moveEvent, finishedState(), waitState);
43 return moveEvent;
44 }
45};
46
48{
49public:
50 template <typename Scenario_T, typename ToolPalette_T>
51 static auto make(const ToolPalette_T& palette, QState* waitState, QState& sm)
52 {
54 auto moveTimeSync = new Scenario::MoveTimeSyncState<
55 Command::MoveBaseEvent<Scenario_T>, Scenario_T, ToolPalette_T>{
56 palette, palette.model(), palette.context().context.commandStack,
57 palette.context().context.objectLocker, &sm};
58
59 score::make_transition<Scenario::ClickOnEndTimeSync_Transition<Scenario_T>>(
60 waitState, moveTimeSync, *moveTimeSync);
61 moveTimeSync->addTransition(moveTimeSync, finishedState(), waitState);
62 return moveTimeSync;
63 }
64};
65}
Definition MoveBaseEvent.hpp:30
Definition BaseScenarioDisplayedElements_StateWrappers.hpp:15
Definition BaseScenarioDisplayedElements_StateWrappers.hpp:26
static auto make(const ToolPalette_T &palette, QState *waitState, QState &sm)
Definition BaseScenarioDisplayedElements_StateWrappers.hpp:29
Definition MoveAndMergeState.hpp:95
Definition BaseScenarioDisplayedElements_StateWrappers.hpp:48
static auto make(const ToolPalette_T &palette, QState *waitState, QState &sm)
Definition BaseScenarioDisplayedElements_StateWrappers.hpp:51
Definition MoveStates.hpp:116
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13