Public Types |
Public Member Functions |
Static Public Member Functions |
Static Private Attributes |
Friends |
List of all members
mn::basic_atomic_singleton< T > Class Template Reference
Singleton with double-checked locking pattern with atomic and mutex lock. More...
#include <mn_atomic_singleton.hpp>
Collaboration diagram for mn::basic_atomic_singleton< T >:
Public Types | |
using | value_type = T |
using | reference = value_type & |
using | pointer = T * |
using | self_type = basic_atomic_singleton< T > |
Public Member Functions | |
basic_atomic_singleton (self_type &&other)=delete | |
basic_atomic_singleton (const self_type &)=delete | |
Static Public Member Functions | |
static reference | instance () |
Static Private Attributes | |
static mn::_atomic< pointer > | m_pInstance |
static mn::mutex_t | m_tLock |
Friends | |
class | T |
Detailed Description
template<typename T>
class mn::basic_atomic_singleton< T >
Singleton with double-checked locking pattern with atomic and mutex lock.
- Template Parameters
-
T The type of the class to be make as singleton.
Member Typedef Documentation
◆ pointer
template<typename T >
using mn::basic_atomic_singleton< T >::pointer = T* |
◆ reference
template<typename T >
using mn::basic_atomic_singleton< T >::reference = value_type& |
◆ self_type
template<typename T >
using mn::basic_atomic_singleton< T >::self_type = basic_atomic_singleton<T> |
◆ value_type
template<typename T >
using mn::basic_atomic_singleton< T >::value_type = T |
Constructor & Destructor Documentation
◆ basic_atomic_singleton() [1/2]
template<typename T >
|
delete |
◆ basic_atomic_singleton() [2/2]
template<typename T >
|
delete |
Member Function Documentation
◆ instance()
template<typename T >
|
inlinestatic |
Friends And Related Function Documentation
◆ T
template<typename T >
|
friend |
Member Data Documentation
◆ m_pInstance
template<typename T >
|
staticprivate |
◆ m_tLock
template<typename T >
|
staticprivate |
The documentation for this class was generated from the following file: