34#ifndef G4VISLISTMANAGER_HH
35#define G4VISLISTMANAGER_HH
57 const T*
Current()
const {
return fpCurrent;}
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");
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);
147const std::map<G4String, T*>&
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
void SetCurrent(const G4String &name)
void Print(std::ostream &ostr, const G4String &name="") const
virtual ~G4VisListManager()
const std::map< G4String, T * > & Map() const
const T * Current() const