Geant4-11
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
G4ITTypeManager Class Reference

#include <G4ITType.hh>

Public Member Functions

G4ITType NewType ()
 
void ReleaseRessource ()
 
void ReserveRessource ()
 
size_t size () const
 

Static Public Member Functions

static void DeleteInstance ()
 
static G4ITTypeManagerInstance ()
 

Private Member Functions

 G4ITTypeManager ()
 
virtual ~G4ITTypeManager ()
 

Private Attributes

G4ITType fLastType
 
size_t fRessource
 

Static Private Attributes

static G4ITTypeManagerfgInstance = 0
 
static G4ThreadLocal G4ITTypeManagerfgInstance_local = 0
 

Detailed Description

Definition at line 92 of file G4ITType.hh.

Constructor & Destructor Documentation

◆ G4ITTypeManager()

G4ITTypeManager::G4ITTypeManager ( )
private

Definition at line 90 of file G4ITType.cc.

91{
92 fLastType = 0;
93 fRessource = 0;
94}
G4ITType fLastType
Definition: G4ITType.hh:97
size_t fRessource
Definition: G4ITType.hh:101

References fLastType, and fRessource.

Referenced by Instance().

Member Function Documentation

◆ DeleteInstance()

void G4ITTypeManager::DeleteInstance ( )
static

Definition at line 66 of file G4ITType.cc.

67{
69 if(fgInstance)
70 {
71 delete fgInstance ;
72 fgInstance = 0;
73 }
74}
G4Mutex deleteMutex
Definition: G4ITType.cc:41
static G4ITTypeManager * fgInstance
Definition: G4ITType.hh:95

References deleteMutex, and fgInstance.

Referenced by ReleaseRessource().

◆ Instance()

G4ITTypeManager * G4ITTypeManager::Instance ( )
static

Definition at line 57 of file G4ITType.cc.

58{
59 if(fgInstance == 0)
60 {
62 }
63 return fgInstance;
64}

References fgInstance, and G4ITTypeManager().

Referenced by G4Scheduler::Clear(), G4Scheduler::Create(), and G4ITType::size().

◆ NewType()

G4ITType G4ITTypeManager::NewType ( )

Definition at line 104 of file G4ITType.cc.

105{
106 G4ITType newType = fLastType;
107 fLastType++;
108 return newType;
109}

References fLastType.

◆ ReleaseRessource()

void G4ITTypeManager::ReleaseRessource ( )

Definition at line 82 of file G4ITType.cc.

83{
85 fRessource--;
86
87 if(fRessource <= 0) DeleteInstance();
88}
G4Mutex ressourceMutex
Definition: G4ITType.cc:42
static void DeleteInstance()
Definition: G4ITType.cc:66

References DeleteInstance(), fRessource, and ressourceMutex.

Referenced by G4Scheduler::Clear().

◆ ReserveRessource()

void G4ITTypeManager::ReserveRessource ( )

Definition at line 76 of file G4ITType.cc.

77{
79 fRessource++;
80}

References fRessource, and ressourceMutex.

Referenced by G4Scheduler::Create().

◆ size()

size_t G4ITTypeManager::size ( ) const

Definition at line 99 of file G4ITType.cc.

100{
101 return fLastType;
102}

References fLastType.

Referenced by G4ITType::size().

◆ ~G4ITTypeManager()

G4ITTypeManager::~G4ITTypeManager ( )
privatevirtual

Definition at line 96 of file G4ITType.cc.

97{;}

Field Documentation

◆ fgInstance

G4ITTypeManager * G4ITTypeManager::fgInstance = 0
staticprivate

Definition at line 95 of file G4ITType.hh.

Referenced by DeleteInstance(), and Instance().

◆ fgInstance_local

G4ThreadLocal G4ITTypeManager * G4ITTypeManager::fgInstance_local = 0
staticprivate

Definition at line 96 of file G4ITType.hh.

◆ fLastType

G4ITType G4ITTypeManager::fLastType
private

Definition at line 97 of file G4ITType.hh.

Referenced by G4ITTypeManager(), NewType(), and size().

◆ fRessource

size_t G4ITTypeManager::fRessource
private

Definition at line 101 of file G4ITType.hh.

Referenced by G4ITTypeManager(), ReleaseRessource(), and ReserveRessource().


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