GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
SingletonStorageCollection.h
1 
29 #pragma once
30 
31 #include "core/function/SecureMemoryAllocator.h"
32 
33 namespace GpgFrontend {
34 class SingletonStorage;
35 
36 using SingletonStoragePtr =
37  std::unique_ptr<SingletonStorage, SecureObjectDeleter<SingletonStorage>>;
38 
39 class GPGFRONTEND_CORE_EXPORT SingletonStorageCollection {
40  public:
45  SingletonStorageCollection() noexcept;
46 
52 
58  static auto GetInstance(bool force_refresh) -> SingletonStorageCollection*;
59 
64  static void Destroy();
65 
72  auto GetSingletonStorage(const std::type_info&) -> SingletonStorage*;
73 
74  private:
75  class Impl;
76  SecureUniquePtr<Impl> p_;
77 };
78 
79 } // namespace GpgFrontend
Definition: SingletonStorageCollection.cpp:42
Definition: SingletonStorageCollection.h:39
Definition: SingletonStorage.h:39
Definition: app.cpp:39