AusweisApp
Lade ...
Suche ...
Keine Treffer
SingletonCreator.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include "Env.h"
8
9#include <QQmlEngine>
10
11
12namespace governikus
13{
14
15// Use this in SingletonCreator::create only!
16// Avoid another template here to reduce generation
17// of a lot of templated functions in the binary.
18QObject* registerSingletonModel(QObject* pModel);
19
20template<typename T>
22{
23 public:
24 static T* create(const QQmlEngine*, const QJSEngine*)
25 {
26 return static_cast<T*>(registerSingletonModel(Env::getSingleton<T>()));
27 }
28
29
30};
31
32} // namespace governikus
Definition SingletonCreator.h:22
static T * create(const QQmlEngine *, const QJSEngine *)
Definition SingletonCreator.h:24
#define T(v)
Definition http_parser.cpp:237
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
QObject * registerSingletonModel(QObject *pModel)
Definition SingletonCreator.cpp:12
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114