32#ifndef G4VISMODELMANAGER_HH
33#define G4VISMODELMANAGER_HH
41template <
typename Model>
81 std::vector<Factory*> fFactoryList;
82 std::vector<G4UImessenger*> fMessengerList;
86template <
typename Model>
88 :fPlacement(placement)
89 ,fpModelList(new
List)
92template <
typename Model>
96 std::vector<G4UImessenger*>::iterator iterMsgr = fMessengerList.begin();
98 while (iterMsgr != fMessengerList.end()) {
103 typename std::vector<Factory*>::iterator iterFactory = fFactoryList.begin();
105 while (iterFactory != fFactoryList.end()) {
113template <
typename Model>
117 fpModelList->Register(model);
120template <
typename Model>
125 fFactoryList.push_back(factory);
131template <
typename Model>
135 fpModelList->SetCurrent(model);
138template <
typename Model>
142 return fpModelList->Current();
145template <
typename Model>
152template <
typename Model>
156 ostr<<
"Registered model factories:"<<std::endl;
158 typename std::vector<Factory*>::const_iterator iter = fFactoryList.begin();
160 while (iter != fFactoryList.end()) {
161 (*iter)->Print(ostr);
165 if (0 == fFactoryList.size()) ostr<<
" None"<<std::endl;
168 ostr<<
"Registered models: "<<std::endl;
170 fpModelList->Print(ostr, name);
173template <
typename Model>
180template <
typename Model>
181const 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()