33#ifndef G4VISMODELMANAGER_HH
34#define G4VISMODELMANAGER_HH
42template <
typename Model>
82 std::vector<Factory*> fFactoryList;
83 std::vector<G4UImessenger*> fMessengerList;
87template <
typename Model>
89 :fPlacement(placement)
90 ,fpModelList(new
List)
93template <
typename Model>
97 std::vector<G4UImessenger*>::iterator iterMsgr = fMessengerList.begin();
99 while (iterMsgr != fMessengerList.end()) {
104 typename std::vector<Factory*>::iterator iterFactory = fFactoryList.begin();
106 while (iterFactory != fFactoryList.end()) {
114template <
typename Model>
118 fpModelList->Register(model);
121template <
typename Model>
126 fFactoryList.push_back(factory);
132template <
typename Model>
136 fpModelList->SetCurrent(model);
139template <
typename Model>
143 return fpModelList->Current();
146template <
typename Model>
153template <
typename Model>
157 ostr<<
"Registered model factories:"<<std::endl;
159 typename std::vector<Factory*>::const_iterator iter = fFactoryList.begin();
161 while (iter != fFactoryList.end()) {
162 (*iter)->Print(ostr);
166 if (0 == fFactoryList.size()) ostr<<
" None"<<std::endl;
169 ostr<<
"Registered models: "<<std::endl;
171 fpModelList->Print(ostr, name);
174template <
typename Model>
181template <
typename Model>
182const std::vector<G4VModelFactory<Model>*>&
const List * ListManager() const
const Model * Current() const
G4VisListManager< Model > List
void SetCurrent(const G4String &)
G4VisModelManager(const G4String &)
const std::vector< Factory * > & FactoryList() const
G4String Placement() const
G4VModelFactory< Model > Factory
void Print(std::ostream &ostr, const G4String &name="") const
virtual ~G4VisModelManager()