33 #ifndef G4VISMODELMANAGER_HH
34 #define G4VISMODELMANAGER_HH
42 template <
typename Model>
82 std::vector<Factory*> fFactoryList;
83 std::vector<G4UImessenger*> fMessengerList;
87 template <
typename Model>
89 :fPlacement(placement)
90 ,fpModelList(new
List)
93 template <
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()) {
114 template <
typename Model>
118 fpModelList->Register(model);
121 template <
typename Model>
126 fFactoryList.push_back(factory);
132 template <
typename Model>
136 fpModelList->SetCurrent(model);
139 template <
typename Model>
143 return fpModelList->Current();
146 template <
typename Model>
153 template <
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);
174 template <
typename Model>
181 template <
typename Model>
182 const std::vector<G4VModelFactory<Model>*>&
G4VisListManager< Model > List
const Model * Current() const
G4VisModelManager(const G4String &)
const List * ListManager() const
void SetCurrent(const G4String &)
G4String Placement() const
virtual ~G4VisModelManager()
void Print(std::ostream &ostr, const G4String &name="") const
const XML_Char XML_Content * model
G4VModelFactory< Model > Factory
const std::vector< Factory * > & FactoryList() const