Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
|
Singleton object that allows a deleter class to be specified. More...
#include <Singleton.hh>
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 () |
Friends | |
class | Type |
Singleton object that allows a deleter class to be specified.
using PTL::Singleton< Type, PointerT >::auto_lock_t = std::unique_lock<mutex_t> |
Definition at line 48 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::deleter_t = std::function<void(PointerT&)> |
Definition at line 52 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::enable_if_t = typename std::enable_if<B, T>::type |
Definition at line 55 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::list_t = std::set<pointer> |
Definition at line 50 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::mutex_t = std::recursive_mutex |
Definition at line 47 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::pointer = Type* |
Definition at line 49 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::smart_pointer = PointerT |
Definition at line 51 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::this_type = Singleton<Type, PointerT> |
Definition at line 45 of file Singleton.hh.
using PTL::Singleton< Type, PointerT >::thread_id_t = std::thread::id |
Definition at line 46 of file Singleton.hh.
PTL::Singleton< Type, PointerT >::Singleton | ( | ) |
Definition at line 236 of file Singleton.hh.
PTL::Singleton< Type, PointerT >::Singleton | ( | pointer | ptr | ) |
Definition at line 244 of file Singleton.hh.
PTL::Singleton< Type, PointerT >::~Singleton | ( | ) |
Definition at line 252 of file Singleton.hh.
|
delete |
|
delete |
|
inlinestatic |
Definition at line 73 of file Singleton.hh.
void PTL::Singleton< Type, PointerT >::Destroy | ( | ) |
Definition at line 288 of file Singleton.hh.
|
static |
Definition at line 305 of file Singleton.hh.
|
static |
Definition at line 321 of file Singleton.hh.
|
inlinestatic |
Definition at line 72 of file Singleton.hh.
|
inlinestatic |
Definition at line 78 of file Singleton.hh.
|
inlineprotected |
Definition at line 113 of file Singleton.hh.
|
inlinestaticprotected |
Definition at line 117 of file Singleton.hh.
Referenced by PTL::Singleton< Type, PointerT >::IsMaster().
|
inlineprotected |
Definition at line 109 of file Singleton.hh.
|
inlinestaticprotected |
Definition at line 110 of file Singleton.hh.
void PTL::Singleton< Type, PointerT >::Initialize | ( | ) |
Definition at line 262 of file Singleton.hh.
void PTL::Singleton< Type, PointerT >::Initialize | ( | pointer | ptr | ) |
Definition at line 275 of file Singleton.hh.
|
static |
Definition at line 380 of file Singleton.hh.
|
inlinestatic |
Definition at line 74 of file Singleton.hh.
|
static |
Definition at line 371 of file Singleton.hh.
Referenced by PTL::Singleton< Type, PointerT >::GetRawInstance().
|
inline |
Definition at line 97 of file Singleton.hh.
|
inline |
Definition at line 89 of file Singleton.hh.
|
delete |
|
delete |
|
static |
Definition at line 390 of file Singleton.hh.
void PTL::Singleton< Type, PointerT >::Reset | ( | ) |
Definition at line 359 of file Singleton.hh.
void PTL::Singleton< Type, PointerT >::Reset | ( | pointer | ptr | ) |
Definition at line 335 of file Singleton.hh.
|
friend |
Definition at line 106 of file Singleton.hh.