Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VisModelManager< typename > Class Template Reference

#include <G4VisManager.hh>

Public Types

typedef G4VisListManager< Model > List
 
typedef G4VModelFactory< Model > Factory
 

Public Member Functions

 G4VisModelManager (const G4String &)
 
virtual ~G4VisModelManager ()
 
void Register (Model *)
 
void Register (Factory *)
 
void SetCurrent (const G4String &)
 
const Model * Current () const
 
G4String Placement () const
 
void Print (std::ostream &ostr, const G4String &name="") const
 
const ListListManager () const
 
const std::vector< Factory * > & FactoryList () const
 

Detailed Description

template<typename>
class G4VisModelManager< typename >

Definition at line 114 of file G4VisManager.hh.

Member Typedef Documentation

template<typename >
typedef G4VModelFactory<Model> G4VisModelManager< typename >::Factory

Definition at line 49 of file G4VisModelManager.hh.

template<typename >
typedef G4VisListManager<Model> G4VisModelManager< typename >::List

Definition at line 48 of file G4VisModelManager.hh.

Constructor & Destructor Documentation

template<typename Model >
G4VisModelManager< Model >::G4VisModelManager ( const G4String placement)

Definition at line 88 of file G4VisModelManager.hh.

89  :fPlacement(placement)
90  ,fpModelList(new List)
91 {}
G4VisListManager< Model > List
template<typename Model >
G4VisModelManager< Model >::~G4VisModelManager ( )
virtual

Definition at line 94 of file G4VisModelManager.hh.

95 {
96  // Cleanup
97  std::vector<G4UImessenger*>::iterator iterMsgr = fMessengerList.begin();
98 
99  while (iterMsgr != fMessengerList.end()) {
100  delete *iterMsgr;
101  iterMsgr++;
102  }
103 
104  typename std::vector<Factory*>::iterator iterFactory = fFactoryList.begin();
105 
106  while (iterFactory != fFactoryList.end()) {
107  delete *iterFactory;
108  iterFactory++;
109  }
110 
111  delete fpModelList;
112 }

Member Function Documentation

template<typename Model >
const Model * G4VisModelManager< Model >::Current ( ) const

Definition at line 141 of file G4VisModelManager.hh.

142 {
143  return fpModelList->Current();
144 }
const T * Current() const

Here is the caller graph for this function:

template<typename Model >
const std::vector< G4VModelFactory< Model > * > & G4VisModelManager< Model >::FactoryList ( ) const

Definition at line 183 of file G4VisModelManager.hh.

184 {
185  return fFactoryList;
186 }
template<typename Model >
const G4VisListManager< Model > * G4VisModelManager< Model >::ListManager ( ) const

Definition at line 176 of file G4VisModelManager.hh.

177 {
178  return fpModelList;
179 }
template<typename Model >
G4String G4VisModelManager< Model >::Placement ( ) const

Definition at line 148 of file G4VisModelManager.hh.

149 {
150  return fPlacement;
151 }

Here is the caller graph for this function:

template<typename Model >
void G4VisModelManager< Model >::Print ( std::ostream &  ostr,
const G4String name = "" 
) const

Definition at line 155 of file G4VisModelManager.hh.

156 {
157  ostr<<"Registered model factories:"<<std::endl;
158 
159  typename std::vector<Factory*>::const_iterator iter = fFactoryList.begin();
160 
161  while (iter != fFactoryList.end()) {
162  (*iter)->Print(ostr);
163  iter++;
164  }
165 
166  if (0 == fFactoryList.size()) ostr<<" None"<<std::endl;
167 
168  ostr<<std::endl;
169  ostr<<"Registered models: "<<std::endl;
170 
171  fpModelList->Print(ostr, name);
172 }
void Print(std::ostream &ostr, const G4String &name="") const
template<typename Model >
void G4VisModelManager< Model >::Register ( Model *  model)

Definition at line 116 of file G4VisModelManager.hh.

117 {
118  fpModelList->Register(model);
119 }
void Register(T *ptr)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the caller graph for this function:

template<typename Model >
void G4VisModelManager< Model >::Register ( Factory factory)

Definition at line 123 of file G4VisModelManager.hh.

124 {
125  // Assume ownership
126  fFactoryList.push_back(factory);
127 
128  // Generate "create" command for this factory
129  fMessengerList.push_back(new G4VisCommandModelCreate<Factory>(factory, fPlacement));
130 }
template<typename Model >
void G4VisModelManager< Model >::SetCurrent ( const G4String model)

Definition at line 134 of file G4VisModelManager.hh.

135 {
136  fpModelList->SetCurrent(model);
137 }
void SetCurrent(const G4String &name)

Here is the caller graph for this function:


The documentation for this class was generated from the following files: