2#include <score/model/path/Path.hpp>
4#include <QAbstractTransition>
19 static constexpr const int user_type = N;
21 : QEvent{QEvent::Type(QEvent::User + N)}
26template <
typename Element,
int N>
44template <
typename Po
intType>
58template <
typename Event>
62 using event_type = Event;
63 using QAbstractTransition::QAbstractTransition;
66 bool eventTest(QEvent* e)
override
68 return e->type() == QEvent::Type(QEvent::User + Event::user_type);
71 void onTransition(QEvent* event)
override { }
74template <
typename State,
typename T>
83 State& state()
const {
return m_state; }
90 typename Transition,
typename SourceState,
typename TargetState,
typename... Args>
91Transition* make_transition(SourceState source, TargetState dest, Args&&... args)
93 Transition* t =
new Transition{std::forward<Args>(args)...};
94 t->setTargetState(dest);
95 source->addTransition(t);
103 static constexpr const int value = 100;
107 static constexpr const int value = 200;
111 static constexpr const int value = 300;
121using Press_Event = NumberedEvent<1>;
122using Move_Event = NumberedEvent<2>;
123using Release_Event = NumberedEvent<3>;
124using Cancel_Event = NumberedEvent<4>;
125using Shift_Event = NumberedEvent<5>;
127using Press_Transition = MatchedTransition<Press_Event>;
128using Move_Transition = MatchedTransition<Move_Event>;
129using Release_Transition = MatchedTransition<Release_Event>;
130using Cancel_Transition = MatchedTransition<Cancel_Event>;
131using ShiftTransition = MatchedTransition<Shift_Event>;
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition StateMachineUtils.hpp:60
Definition StateMachineUtils.hpp:76
Utilities for OSSIA data structures.
Definition DeviceInterface.hpp:33
Base toolkit upon which the software is built.
Definition Application.cpp:90
Definition StateMachineUtils.hpp:18
Definition StateMachineUtils.hpp:28
Definition StateMachineUtils.hpp:46