3 #ifndef DUNE_SINGLETON_HH
4 #define DUNE_SINGLETON_HH
73 static std::unique_ptr<T> instance_;
74 if(instance_.get() == 0)
75 instance_ = std::unique_ptr<T>(
new T());
Singleton(const Singleton &)
Private copy constructor.
Definition: singleton.hh:61
#define DUNE_EXPORT
Export a symbol as part of the public ABI.
Definition: visibility.hh:18
An adapter to turn a class into a singleton.
Definition: singleton.hh:55
Definition of macros controlling symbol visibility at the ABI level.
Singleton & operator=(const Singleton &)
Private assignment operator.
Definition: singleton.hh:63
static DUNE_EXPORT T & instance()
Get the instance of the singleton.
Definition: singleton.hh:70
Singleton()
Definition: singleton.hh:59