|
Geant4
10.07
|
Singleton object that allows a deleter class to be specified. More...
Classes | |
| struct | persistent_data |
Public Types | |
| using | this_type = Singleton< Type, PointerT > |
| using | thread_id_t = std::thread::id |
| using | mutex_t = std::recursive_mutex |
| using | auto_lock_t = std::unique_lock< mutex_t > |
| using | pointer = Type * |
| using | list_t = std::set< pointer > |
| using | smart_pointer = PointerT |
| using | deleter_t = std::function< void(PointerT &)> |
| template<bool B, typename T = int> | |
| using | enable_if_t = typename std::enable_if< B, T >::type |
Public Member Functions | |
| Singleton () | |
| Singleton (pointer) | |
| ~Singleton () | |
| Singleton (const Singleton &)=delete | |
| Singleton (Singleton &&)=delete | |
| Singleton & | operator= (const Singleton &)=delete |
| Singleton & | operator= (Singleton &&)=delete |
| void | Initialize () |
| void | Initialize (pointer) |
| void | Destroy () |
| void | Reset (pointer) |
| void | Reset () |
| void * | operator new (size_t) |
| void | operator delete (void *ptr) |
Static Public Member Functions | |
| static pointer | GetInstance () |
| static pointer | GetMasterInstance () |
| static thread_id_t | GetMasterThreadID () |
| static list_t | Children () |
| static bool | IsMaster (pointer ptr) |
| static bool | IsMasterThread () |
| static void | Insert (pointer) |
| static void | Remove (pointer) |
| static mutex_t & | GetMutex () |
Protected Member Functions | |
| smart_pointer & | GetSmartInstance () |
| pointer | GetRawInstance () |
Static Protected Member Functions | |
| static smart_pointer & | GetSmartMasterInstance () |
| static pointer | GetRawMasterInstance () |
Private Member Functions | |
| void * | operator new[] (std::size_t) noexcept |
| void | operator delete[] (void *) noexcept |
| template<typename Tp = Type, typename PtrT = PointerT> | |
| deleter_t & | GetDeleter () |
| template<typename Tp = Type, typename PtrT = PointerT> | |
| deleter_t & | GetDeleter () |
Static Private Member Functions | |
| static smart_pointer & | _local_instance () |
| static smart_pointer & | _master_instance () |
| static thread_id_t & | f_master_thread () |
| static mutex_t & | f_mutex () |
| static pointer & | f_master_instance () |
| static list_t & | f_children () |
| static persistent_data & | f_persistent_data () |
Private Attributes | |
| bool | m_IsMaster = false |
Friends | |
| class | Type |
Singleton object that allows a deleter class to be specified.
| using thread_id_t = std::thread::id |
| using mutex_t = std::recursive_mutex |
| using auto_lock_t = std::unique_lock<mutex_t> |
| using smart_pointer = PointerT |
| using deleter_t = std::function<void(PointerT&)> |
| using enable_if_t = typename std::enable_if<B, T>::type |
| Singleton | ( | ) |
| ~Singleton | ( | ) |
References JA::Insert().
|
static |
References Singleton< Type, PointerT >::f_master_thread().
|
static |
References Singleton< Type, PointerT >::f_children().
|
static |
|
static |
Referenced by Singleton< Type, PointerT >::GetRawInstance().
|
static |
References Singleton< Type, PointerT >::f_mutex().
| void Initialize | ( | ) |
| void Destroy | ( | ) |
| void Reset | ( | ) |
References PTL::Threading::IsMasterThread().
|
protected |
References Singleton< Type, PointerT >::_local_instance().
|
staticprotected |
References Singleton< Type, PointerT >::_master_instance().
|
protected |
|
staticprotected |
References Singleton< Type, PointerT >::f_master_instance().
Referenced by Singleton< Type, PointerT >::IsMaster().
|
staticprivate |
|
staticprivate |
Referenced by Singleton< Type, PointerT >::GetSmartMasterInstance().
|
privatenoexcept |
|
private |
|
private |
|
staticprivate |
Referenced by Singleton< Type, PointerT >::GetMutex().
Referenced by Singleton< Type, PointerT >::Children().
|
staticprivate |
|
friend |
|
private |