|
utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
|
Singleton class template. More...
#include <headers/utility/singleton.hpp>
Public Member Functions | |
| Singleton (const Singleton &)=delete | |
| Singleton & | operator= (const Singleton &)=delete |
Static Public Member Functions | |
| static Type & | getInstance (void) |
| Get the singleton instance. | |
Singleton class template.
This class provides a thread-safe implementation of the singleton design pattern. It ensures that only one instance of the class is created and provides global access to it.
| Type | The type of the singleton class. |
Definition at line 47 of file singleton.hpp.
|
inlinestatic |
Get the singleton instance.
This method returns a shared pointer to the singleton instance. If the instance does not exist, it is created.
Definition at line 62 of file singleton.hpp.