33 #ifndef G4VISFILTERMANAGER_HH
34 #define G4VISFILTERMANAGER_HH
36 #include "G4String.hh"
42 namespace FilterMode {
79 const std::vector<Filter*>&
FilterList()
const;
95 :fPlacement(placement)
100 template <
typename T>
104 std::vector<G4UImessenger*>::iterator iterMsgr = fMessengerList.begin();
106 while (iterMsgr != fMessengerList.end()) {
111 typename std::vector<Factory*>::iterator iterFactory = fFactoryList.begin();
113 while (iterFactory != fFactoryList.end()) {
118 typename std::vector<Filter*>::iterator iterFilter = fFilterList.begin();
120 while (iterFilter != fFilterList.end()) {
126 template <
typename T>
130 fFilterList.push_back(filter);
133 template <
typename T>
137 fFactoryList.push_back(factory);
142 template <
typename T>
146 typename std::vector<Filter*>::const_iterator iter = fFilterList.begin();
149 while (passed && (iter != fFilterList.end())) {
150 passed = (*iter)->Accept(obj);
157 template <
typename T>
164 template <
typename T>
178 ed <<
"Invalid Filter mode: "<<mode;
180 (
"G4VisFilterManager::SetMode(const G4String& mode)",
"visman0101",
JustWarning, ed);
184 template <
typename T>
191 template <
typename T>
198 template <
typename T>
202 ostr<<
"Registered filter factories:"<<std::endl;
203 typename std::vector<Factory*>::const_iterator iterFactory = fFactoryList.begin();
205 while (iterFactory != fFactoryList.end()) {
206 (*iterFactory)->Print(ostr);
210 if (0 == fFactoryList.size()) ostr<<
" None"<<std::endl;
213 ostr<<
"Registered filters:"<<std::endl;
215 typename std::vector<Filter*>::const_iterator iterFilter = fFilterList.begin();
217 while (iterFilter != fFilterList.end()) {
219 if ((*iterFilter)->Name() ==
name) (*iterFilter)->PrintAll(ostr);
222 (*iterFilter)->PrintAll(ostr);
227 if (0 == fFilterList.size()) ostr<<
" None"<<std::endl;
230 template <
typename T>
231 const std::vector< G4VFilter<T>* >&
237 template <
typename T>
238 const std::vector< G4VModelFactory< G4VFilter<T> >* >&
G4VisFilterManager(const G4String &)
std::ostringstream G4ExceptionDescription
const std::vector< Filter * > & FilterList() const
const std::vector< Factory * > & FactoryList() const
std::vector< Factory * > fFactoryList
std::vector< G4UImessenger * > fMessengerList
G4double G4ParticleHPJENDLHEData::G4double result
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< Filter * > fFilterList
FilterMode::Mode GetMode() const
void Print(std::ostream &ostr, const G4String &name="") const
G4String Placement() const
void SetMode(const FilterMode::Mode &)
G4VModelFactory< Filter > Factory
virtual ~G4VisFilterManager()