#include <G4ProcTblElement.hh>
Public Member Functions | |
G4ProcTblElement (const G4ProcTblElement &right) | |
G4ProcTblElement (G4VProcess *aProcess) | |
~G4ProcTblElement () | |
G4ProcTblElement & | operator= (const G4ProcTblElement &right) |
G4int | operator== (const G4ProcTblElement &right) const |
G4int | operator!= (const G4ProcTblElement &right) const |
Protected Types | |
typedef std::vector< G4ProcessManager * > | G4ProcMgrVector |
Protected Member Functions | |
G4ProcTblElement () | |
G4int | Length () const |
void | Insert (G4ProcessManager *aProcMgr) |
void | Remove (G4ProcessManager *aProcMgr) |
G4VProcess * | GetProcess () const |
const G4String & | GetProcessName () const |
G4ProcessManager * | GetProcessManager (G4int index) const |
const G4ProcMgrVector * | GetProcMgrVector () const |
G4int | GetIndex (const G4ProcessManager *pManager) const |
G4bool | Contains (const G4ProcessManager *pManager) const |
Friends | |
class | G4ProcessTable |
Definition at line 53 of file G4ProcTblElement.hh.
typedef std::vector<G4ProcessManager*> G4ProcTblElement::G4ProcMgrVector [protected] |
Definition at line 77 of file G4ProcTblElement.hh.
G4ProcTblElement::G4ProcTblElement | ( | ) | [protected] |
G4ProcTblElement::G4ProcTblElement | ( | const G4ProcTblElement & | right | ) |
G4ProcTblElement::G4ProcTblElement | ( | G4VProcess * | aProcess | ) |
Definition at line 48 of file G4ProcTblElement.cc.
00048 : 00049 pProcess(aProcess) 00050 { 00051 pProcMgrVector = new G4ProcMgrVector(); 00052 }
G4ProcTblElement::~G4ProcTblElement | ( | ) |
Definition at line 63 of file G4ProcTblElement.cc.
00064 { 00065 if (pProcMgrVector != 0) { 00066 pProcMgrVector->clear(); 00067 delete pProcMgrVector; 00068 } 00069 }
G4bool G4ProcTblElement::Contains | ( | const G4ProcessManager * | pManager | ) | const [inline, protected] |
Definition at line 40 of file G4ProcTblElement.icc.
Referenced by G4ProcessTable::FindProcess(), G4ProcessTable::Insert(), and G4ProcessTable::Remove().
00041 { 00042 G4ProcMgrVector::iterator i; 00043 for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) { 00044 if (*i==pManager) return true; 00045 } 00046 return false; 00047 }
G4int G4ProcTblElement::GetIndex | ( | const G4ProcessManager * | pManager | ) | const [inline, protected] |
Definition at line 51 of file G4ProcTblElement.icc.
00052 { 00053 G4int index = 0; 00054 G4ProcMgrVector::iterator i; 00055 for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) { 00056 if (*i==pManager) return index; 00057 index +=1; 00058 } 00059 return -1; 00060 }
G4VProcess * G4ProcTblElement::GetProcess | ( | ) | const [inline, protected] |
Definition at line 84 of file G4ProcTblElement.icc.
Referenced by G4ProcessTable::DumpInfo(), G4ProcessTable::FindProcess(), G4ProcessTable::Insert(), G4ProcessTable::Remove(), and G4ProcessTable::SetProcessActivation().
G4ProcessManager * G4ProcTblElement::GetProcessManager | ( | G4int | index | ) | const [inline, protected] |
Definition at line 72 of file G4ProcTblElement.icc.
Referenced by G4ProcessTable::DumpInfo(), and G4ProcessTable::SetProcessActivation().
00073 { 00074 if ((index < G4int(pProcMgrVector->size())) && (index>=0)){ 00075 return (*pProcMgrVector)[index]; 00076 } else { 00077 return 0; 00078 } 00079 }
const G4String & G4ProcTblElement::GetProcessName | ( | ) | const [inline, protected] |
Definition at line 112 of file G4ProcTblElement.icc.
References G4VProcess::GetProcessName().
Referenced by G4ProcessTable::FindProcess(), and G4ProcessTable::Remove().
00113 { 00114 return pProcess->GetProcessName(); 00115 }
const G4ProcMgrVector* G4ProcTblElement::GetProcMgrVector | ( | ) | const [inline, protected] |
void G4ProcTblElement::Insert | ( | G4ProcessManager * | aProcMgr | ) | [inline, protected] |
G4int G4ProcTblElement::Length | ( | ) | const [inline, protected] |
Definition at line 65 of file G4ProcTblElement.icc.
Referenced by G4ProcessTable::DumpInfo(), G4ProcessTable::Remove(), and G4ProcessTable::SetProcessActivation().
G4int G4ProcTblElement::operator!= | ( | const G4ProcTblElement & | right | ) | const |
G4ProcTblElement & G4ProcTblElement::operator= | ( | const G4ProcTblElement & | right | ) |
Definition at line 73 of file G4ProcTblElement.cc.
References pProcess, and pProcMgrVector.
00074 { 00075 if (this != &right) { 00076 pProcess = right.pProcess; 00077 // copy all contents in pProcMgrVector 00078 if (pProcMgrVector != 0) { 00079 pProcMgrVector->clear(); 00080 delete pProcMgrVector; 00081 } 00082 pProcMgrVector = new G4ProcMgrVector(); 00083 G4ProcMgrVector::iterator i; 00084 for (i = right.pProcMgrVector->begin(); i!= right.pProcMgrVector->end(); ++i) { 00085 pProcMgrVector->push_back(*i); 00086 } 00087 } 00088 return *this; 00089 }
G4int G4ProcTblElement::operator== | ( | const G4ProcTblElement & | right | ) | const |
void G4ProcTblElement::Remove | ( | G4ProcessManager * | aProcMgr | ) | [inline, protected] |
Definition at line 99 of file G4ProcTblElement.icc.
Referenced by G4ProcessTable::Remove().
00100 { 00101 G4ProcMgrVector::iterator i; 00102 for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) { 00103 if (*i==aProcMgr){ 00104 pProcMgrVector->erase(i); 00105 break; 00106 } 00107 } 00108 }
friend class G4ProcessTable [friend] |
Definition at line 56 of file G4ProcTblElement.hh.