35 #ifndef G4VISLISTMANAGER_HH
36 #define G4VISLISTMANAGER_HH
38 #include "G4String.hh"
58 const T*
Current()
const {
return fpCurrent;}
59 const std::map<G4String, T*>&
Map()
const;
62 void Print(std::ostream& ostr,
const G4String& name=
"")
const;
67 std::map<G4String, T*> fMap;
80 typename std::map<G4String, T*>::iterator iter = fMap.begin();
82 while (iter != fMap.end()) {
95 fMap[ptr->Name()] = ptr;
103 typename std::map<G4String, T*>::const_iterator iter = fMap.find(name);
105 if (iter != fMap.end()) fpCurrent = fMap[name];
108 ed <<
"Key \"" << name <<
"\" has not been registered";
110 (
"G4VisListManager<T>::SetCurrent(T* ptr) ",
111 "visman0102",
JustWarning, ed,
"Non-existent name");
115 template <
typename T>
119 if (0 == fMap.size()) {
120 G4cout<<
" None"<<std::endl;
124 ostr<<
" Current: "<<fpCurrent->Name()<<std::endl;
128 typename std::map<G4String, T*>::const_iterator iter = fMap.find(name);
130 if (iter != fMap.end()) {
131 iter->second->Print(ostr);
134 ostr<<name<<
" not found "<<std::endl;
138 typename std::map<G4String, T*>::const_iterator iter = fMap.begin();
139 while (iter != fMap.end()) {
140 iter->second->Print(ostr);
147 template <
typename T>
148 const std::map<G4String, T*>&
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
void SetCurrent(const G4String &name)
const std::map< G4String, T * > & Map() const
const T * Current() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual ~G4VisListManager()
void Print(std::ostream &ostr, const G4String &name="") const