#include <G4MoleculeHandleManager.hh>
Public Member Functions | |
~G4MoleculeHandleManager () | |
G4MoleculeHandle | GetMoleculeHandle (const G4Molecule *) |
Static Public Member Functions | |
static G4MoleculeHandleManager * | Instance () |
static void | DeleteInstance () |
Data Structures | |
struct | CompMoleculePointer |
Definition at line 50 of file G4MoleculeHandleManager.hh.
G4MoleculeHandleManager::~G4MoleculeHandleManager | ( | ) |
Definition at line 45 of file G4MoleculeHandleManager.cc.
00046 { 00047 if(fMoleculeHandle.empty() == false) 00048 { 00049 MoleculeHandleMap::iterator it = fMoleculeHandle.begin(); 00050 for( ; it != fMoleculeHandle.end() ; it++) 00051 { 00052 it->second.reset(); 00053 } 00054 } 00055 }
void G4MoleculeHandleManager::DeleteInstance | ( | ) | [static] |
G4MoleculeHandle G4MoleculeHandleManager::GetMoleculeHandle | ( | const G4Molecule * | ) |
Definition at line 75 of file G4MoleculeHandleManager.cc.
Referenced by G4DNAMolecularReactionData::SetReactive(), G4DNAMolecularReactionData::SetReactive1(), and G4DNAMolecularReactionData::SetReactive2().
00076 { 00077 MoleculeHandleMap::iterator it = fMoleculeHandle.find(molecule); 00078 G4MoleculeHandle molHandle; 00079 00080 if(it != fMoleculeHandle.end()) 00081 { 00082 molHandle = G4MoleculeHandle(it->second); 00083 } 00084 else 00085 { 00086 molHandle = G4MoleculeHandle(molecule); 00087 fMoleculeHandle.insert(make_pair(molecule, G4MoleculeHandle(molHandle))); 00088 } 00089 00090 return molHandle; 00091 }
G4MoleculeHandleManager * G4MoleculeHandleManager::Instance | ( | ) | [static] |
Definition at line 66 of file G4MoleculeHandleManager.cc.
Referenced by G4MolecularDecayChannel::AddProduct(), G4DNAMolecularReactionData::AddProduct(), G4DNAMolecularReactionData::SetReactive(), G4DNAMolecularReactionData::SetReactive1(), and G4DNAMolecularReactionData::SetReactive2().
00067 { 00068 if(!fInstance) 00069 { 00070 fInstance = new G4MoleculeHandleManager; 00071 } 00072 return fInstance; 00073 }