Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ThreadLocalSingleton< T > Class Template Reference

#include <G4ThreadLocalSingleton.hh>

+ Inheritance diagram for G4ThreadLocalSingleton< T >:

Public Member Functions

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

Friends

void G4AutoDelete::Register (T *)
 

Detailed Description

template<class T>
class G4ThreadLocalSingleton< T >

Definition at line 112 of file G4ThreadLocalSingleton.hh.

Constructor & Destructor Documentation

◆ G4ThreadLocalSingleton()

Definition at line 140 of file G4ThreadLocalSingleton.hh.

141 : G4Cache<T*>()
142{
143 G4MUTEXINIT(listm);
144 G4Cache<T*>::Put(static_cast<T*>(0));
145}
#define G4MUTEXINIT(mutex)
Definition: G4Threading.hh:87
void Put(const value_type &val) const
Definition: G4Cache.hh:321

◆ ~G4ThreadLocalSingleton()

Definition at line 148 of file G4ThreadLocalSingleton.hh.

149{
150 Clear();
151 G4MUTEXDESTROY(listm);
152}
#define G4MUTEXDESTROY(mutex)
Definition: G4Threading.hh:90

Member Function Documentation

◆ Instance()

Friends And Related Function Documentation

◆ G4AutoDelete::Register

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

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