4 // Author: I. Hrivnacova
8 // The map container for associated names.
9 // The names can be added into map either in pairs (Add() method)
10 // or standalone - then they are paired with the fSecond data member
13 #ifndef TG4_NAME_MAP_H
14 #define TG4_NAME_MAP_H
21 typedef G4std::map<G4String, G4String, G4std::less<G4String> > Map;
22 typedef Map::iterator MapIterator;
23 typedef Map::const_iterator MapConstIterator;
28 // TG4NameMap(const TG4NameMap& right);
29 virtual ~TG4NameMap();
32 G4bool Add(const G4String& first, const G4String& second);
33 G4bool AddName(const G4String& name);
34 const G4String& GetSecond(const G4String& name);
35 void PrintAll() const;
39 void SetSecond(const G4String& name);
42 TG4NameMap(const TG4NameMap& right);
45 TG4NameMap& operator=(const TG4NameMap& right);
48 // static data members
49 static G4String fgUndefined; //the value of undefined second
52 Map fMap; //map container
53 G4String fSecond; //the current second
57 inline void TG4NameMap::SetSecond(const G4String& secondName)
58 { fSecond = secondName; }
60 #endif //TG4_NAME_MAP_H