21 #ifndef GF_SINGLETON_H    22 #define GF_SINGLETON_H    27 #include "Portability.h"    30 #ifndef DOXYGEN_SHOULD_SKIP_THIS   118       return m_single != 
nullptr;
   159     template<
typename ... Args>
   161     : m_storage(
std::forward<Args>(args)...) {
   162       assert(ref.m_single == 
nullptr);
   163       ref.m_single = &m_storage;
   170 #ifndef DOXYGEN_SHOULD_SKIP_THIS   175 #endif // GF_SINGLETON_H 
void reset() noexcept
Reset the singleton. 
Definition: Singleton.h:108
 
The namespace for gf classes. 
Definition: Action.h:35
 
T & operator()()
Access the singleton. 
Definition: Singleton.h:98
 
Singleton()
Default constructor. 
Definition: Singleton.h:65
 
bool isValid() const noexcept
Check if the singleton has been initialized. 
Definition: Singleton.h:117
 
SingletonStorage(Singleton< T > &ref, Args &&... args)
Construct a storage for a singleton. 
Definition: Singleton.h:160
 
A storage for a singleton. 
Definition: Singleton.h:35
 
A singleton that wraps a pointer provided by a storage. 
Definition: Singleton.h:57