34 #ifndef G4VISLISTMANAGER_HH
35 #define G4VISLISTMANAGER_HH
37 #include "G4String.hh"
58 const std::map<G4String, T*>&
Map()
const;
61 void Print(std::ostream& ostr,
const G4String& name=
"")
const;
66 std::map<G4String, T*>
fMap;
79 typename std::map<G4String, T*>::iterator iter = fMap.begin();
81 while (iter != fMap.end()) {
94 fMap[ptr->Name()] = ptr;
102 typename std::map<G4String, T*>::const_iterator iter = fMap.find(name);
104 if (iter != fMap.end()) fpCurrent = fMap[name];
107 ed <<
"Key \"" << name <<
"\" has not been registered";
109 (
"G4VisListManager<T>::SetCurrent(T* ptr) ",
110 "visman0102",
JustWarning, ed,
"Non-existent name");
114 template <
typename T>
118 if (0 == fMap.size()) {
119 G4cout<<
" None"<<std::endl;
123 ostr<<
" Current: "<<fpCurrent->Name()<<std::endl;
127 typename std::map<G4String, T*>::const_iterator iter = fMap.find(name);
129 if (iter != fMap.end()) {
130 iter->second->Print(ostr);
133 ostr<<name<<
" not found "<<std::endl;
137 typename std::map<G4String, T*>::const_iterator iter = fMap.begin();
138 while (iter != fMap.end()) {
139 iter->second->Print(ostr);
146 template <
typename T>
147 const std::map<G4String, T*>&