Functions | |
std::map< G4String, G4AttDef > * | GetInstance (G4String storeKey, G4bool &isNew) |
G4bool | GetStoreKey (const std::map< G4String, G4AttDef > *definitions, G4String &key) |
Variables | |
std::map< G4String, std::map< G4String, G4AttDef > * > | m_defsmaps |
std::map< G4String, std::map< G4String, G4AttDef > * > | m_defsmaps |
Definition at line 38 of file G4AttDefStore.cc.
References m_defsmaps.
Referenced by G4TrajectoryPoint::GetAttDefs(), G4Trajectory::GetAttDefs(), G4TrajectoriesModel::GetAttDefs(), G4SmoothTrajectoryPoint::GetAttDefs(), G4SmoothTrajectory::GetAttDefs(), G4RichTrajectoryPoint::GetAttDefs(), G4RichTrajectory::GetAttDefs(), and G4PhysicalVolumeModel::GetAttDefs().
00039 { 00040 // Allocate the new map if not existing already 00041 // and return it to the caller 00042 // 00043 std::map<G4String,G4AttDef>* definitions; 00044 std::map<G4String,std::map<G4String,G4AttDef>*>::iterator iDefinitions = 00045 m_defsmaps.find(storeKey); 00046 00047 if (iDefinitions == m_defsmaps.end()) 00048 { 00049 isNew = true; 00050 definitions = new std::map<G4String,G4AttDef>; 00051 m_defsmaps[storeKey] = definitions; 00052 } 00053 else 00054 { 00055 isNew = false; 00056 definitions = iDefinitions->second; 00057 } 00058 return definitions; 00059 }
G4bool G4AttDefStore::GetStoreKey | ( | const std::map< G4String, G4AttDef > * | definitions, | |
G4String & | key | |||
) |
Definition at line 62 of file G4AttDefStore.cc.
References G4String::first(), and m_defsmaps.
Referenced by operator<<().
00063 { 00064 std::map<G4String,std::map<G4String,G4AttDef>*>::const_iterator i; 00065 for (i = m_defsmaps.begin(); i != m_defsmaps.end(); ++i) 00066 { 00067 if (i->second == definitions) 00068 { 00069 key = i->first; 00070 return true; 00071 } 00072 } 00073 00074 return false; 00075 }
std::map<G4String,std::map<G4String,G4AttDef>*> G4AttDefStore::m_defsmaps |
std::map<G4String,std::map<G4String,G4AttDef>*> G4AttDefStore::m_defsmaps |