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