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