AusweisApp2
GenericContextContainer.h
gehe zur Dokumentation dieser Datei
1
10#pragma once
11
13
14
15namespace governikus
16{
17
18template<typename ContextClass>
20{
21 private:
22 const QSharedPointer<ContextClass> mTypedContext;
23
24 public:
25 explicit GenericContextContainer(const QSharedPointer<WorkflowContext>& pContext)
26 : mTypedContext(pContext.staticCast<ContextClass>())
27 {
28 Q_ASSERT(pContext.objectCast<ContextClass>());
29 }
30
31
32 [[nodiscard]] QSharedPointer<ContextClass> getContext() const
33 {
34 return mTypedContext;
35 }
36
37
38};
39
40} // namespace governikus
Definition: GenericContextContainer.h:20
QSharedPointer< ContextClass > getContext() const
Definition: GenericContextContainer.h:32
GenericContextContainer(const QSharedPointer< WorkflowContext > &pContext)
Definition: GenericContextContainer.h:25
A simple template renderer.
Definition: ActivationContext.h:15