AusweisApp
Lade ...
Suche ...
Keine Treffer
WorkflowController.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
9
10#include <QSharedPointer>
11#include <QStateMachine>
12
13class test_AppController;
14
15namespace governikus
16{
17
19 : public QObject
20{
21 Q_OBJECT
22 friend class ::test_AppController;
23
24 private:
25 QStateMachine mStateMachine;
26 const QSharedPointer<WorkflowContext> mContext;
27
28 protected:
29 template<typename T>
30 [[nodiscard]] T* addState()
31 {
32 auto* state = StateBuilder::createState<T>(mContext);
33 mStateMachine.addState(state);
34 return state;
35 }
36
37
38 template<typename T>
39 [[nodiscard]] T* addInitialState()
40 {
41 auto* state = addState<T>();
42 mStateMachine.setInitialState(state);
43 return state;
44 }
45
46 public:
47 explicit WorkflowController(const QSharedPointer<WorkflowContext>& pContext);
48
49 void run();
50
51 Q_SIGNALS:
53
54};
55
56} // namespace governikus
static T * createState(const QSharedPointer< C > &pContext)
Definition StateBuilder.h:40
Definition WorkflowController.h:20
WorkflowController(const QSharedPointer< WorkflowContext > &pContext)
Definition WorkflowController.cpp:11
T * addInitialState()
Definition WorkflowController.h:39
T * addState()
Definition WorkflowController.h:30
void run()
Definition WorkflowController.cpp:19
#define T(v)
Definition http_parser.cpp:237
state
Definition http_parser.cpp:280
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17