carl
24.04
Computer ARithmetic Library
|
Base class that implements a singleton. More...
#include <Singleton.h>
Public Member Functions | |
Singleton (const Singleton &)=delete | |
Singleton (Singleton &&)=delete | |
Singleton & | operator= (const Singleton &)=delete |
Singleton & | operator= (Singleton &&)=delete |
virtual | ~Singleton () noexcept=default |
Virtual destructor. More... | |
Static Public Member Functions | |
static T & | getInstance () |
Returns the single instance of this class by reference. More... | |
Protected Member Functions | |
Singleton ()=default | |
Protected default constructor. More... | |
Base class that implements a singleton.
A class that shall be a singleton can inherit from this class (the template argument being the class itself, see CRTP for this). It takes care of
Definition at line 23 of file Singleton.h.
|
protecteddefault |
Protected default constructor.
|
delete |
|
delete |
|
virtualdefaultnoexcept |
Virtual destructor.
|
inlinestatic |
Returns the single instance of this class by reference.
If there is no instance yet, a new one is created.
Definition at line 45 of file Singleton.h.
|
delete |
|
delete |