4 // The map container for associated names.
5 // The names can be added into map either in pairs (Add() method)
6 // or standalone - then they are paired with the fSecond data member
10 #define TG4_NAME_MAP_H
20 // TG4NameMap(const TG4NameMap& right);
21 virtual ~TG4NameMap();
24 G4bool Add(const G4String& first, const G4String& second);
25 G4bool AddName(const G4String& name);
26 const G4String& GetSecond(const G4String& name);
31 void SetSecond(const G4String& name);
34 TG4NameMap(const TG4NameMap& right);
37 TG4NameMap& operator=(const TG4NameMap& right);
40 // static data members
41 static G4String fgUndefined; //the value of undefined second
44 G4std::map<G4String, G4String, G4std::less<G4String> > fMap;
46 G4String fSecond; //the current second
50 inline void TG4NameMap::SetSecond(const G4String& secondName)
51 { fSecond = secondName; }
53 #endif //TG4_NAME_MAP_H