Geant4  10.00.p02
G4ThreadLocalSingleton< T > Class Template Reference

#include <G4ThreadLocalSingleton.hh>

+ Inheritance diagram for G4ThreadLocalSingleton< T >:
+ Collaboration diagram for G4ThreadLocalSingleton< T >:

Public Member Functions

 G4ThreadLocalSingleton ()
 
 ~G4ThreadLocalSingleton ()
 
T * Instance () const
 

Private Member Functions

 G4ThreadLocalSingleton (G4ThreadLocalSingleton &rhs)
 
void Register (T *i) const
 
void Clear ()
 
- Private Member Functions inherited from G4Cache< T * >
 G4Cache ()
 
 G4Cache (const value_type &v)
 
virtual ~G4Cache ()
 
value_typeGet () const
 
void Put (const value_type &val) const
 
value_type Pop ()
 
const int & GetId () const
 

Private Attributes

std::list< T * > instances
 
G4Mutex listm
 

Friends

void G4AutoDelete::Register (T *)
 

Additional Inherited Members

- Private Types inherited from G4Cache< T * >
typedef T * value_type
 

Detailed Description

template<class T>
class G4ThreadLocalSingleton< T >

Definition at line 108 of file G4ThreadLocalSingleton.hh.

Constructor & Destructor Documentation

template<class T >
G4ThreadLocalSingleton< T >::G4ThreadLocalSingleton ( )

Definition at line 135 of file G4ThreadLocalSingleton.hh.

References G4MUTEXINIT, G4ThreadLocalSingleton< T >::listm, and G4Cache< VALTYPE >::Put().

+ Here is the call graph for this function:

template<class T >
G4ThreadLocalSingleton< T >::~G4ThreadLocalSingleton ( )

Definition at line 141 of file G4ThreadLocalSingleton.hh.

References JA::Clear().

+ Here is the call graph for this function:

template<class T >
G4ThreadLocalSingleton< T >::G4ThreadLocalSingleton ( G4ThreadLocalSingleton< T > &  rhs)
private

Definition at line 157 of file G4ThreadLocalSingleton.hh.

Member Function Documentation

template<class T >
void G4ThreadLocalSingleton< T >::Clear ( )
private

Definition at line 166 of file G4ThreadLocalSingleton.hh.

template<class T >
T * G4ThreadLocalSingleton< T >::Instance ( void  ) const

Definition at line 146 of file G4ThreadLocalSingleton.hh.

References G4Cache< VALTYPE >::Get(), instance, G4Cache< VALTYPE >::Put(), and G4AutoDelete::Register().

Referenced by G4BiasingTrackDataStore::GetInstance(), G4BiasingOperationManager::GetInstance(), and G4LossTableManager::Instance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T >
void G4ThreadLocalSingleton< T >::Register ( T *  i) const
private

Definition at line 159 of file G4ThreadLocalSingleton.hh.

Referenced by G4AutoDelete::Register().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

template<class T>
void G4AutoDelete::Register ( T *  )
friend

Member Data Documentation

template<class T>
std::list<T*> G4ThreadLocalSingleton< T >::instances
mutableprivate

Definition at line 125 of file G4ThreadLocalSingleton.hh.

template<class T>
G4Mutex G4ThreadLocalSingleton< T >::listm
mutableprivate

The documentation for this class was generated from the following file: