A template class for creating singleton instances. More...
#include <Singleton.hxx>
Static Public Member Functions | |
template<typename... Args> | |
static T & | getInstance (Args... args) |
Gets the singleton instance of the class. | |
Protected Member Functions | |
Singleton () | |
Protected constructor to prevent direct instantiation. | |
~Singleton () | |
Protected destructor to prevent direct deletion. | |
A template class for creating singleton instances.
This class provides a mechanism to ensure that only one instance of a class is created. It is designed to be inherited by other classes that require singleton behavior.
T | The type of the class to be made a singleton. |
Definition at line 23 of file Singleton.hxx.
|
protected |
Protected constructor to prevent direct instantiation.
Protected destructor to prevent direct deletion.
|
inlinestatic |
Gets the singleton instance of the class.
This method returns a reference to the singleton instance of the class. If the instance does not exist, it is created with the provided arguments.
Args | The types of the arguments to pass to the constructor. |
args | The arguments to pass to the constructor. |
Definition at line 36 of file Singleton.hxx.
Referenced by AsyncPipeline< ObjectType >::startService().