GEMC  1.8
Geant4 Monte-Carlo Framework
material_factory.h
Go to the documentation of this file.
1 #ifndef MATERIAL_FACTORY_H
2 #define MATERIAL_FACTORY_H
3 
4 
5 // %%%%%%%%%%
6 // G4 headers
7 // %%%%%%%%%%
8 #include "G4Material.hh"
9 
10 
11 // %%%%%%%%%%%
12 // C++ headers
13 // %%%%%%%%%%%
14 #include <map>
15 #include <iostream>
16 using namespace std;
17 
18 
19 // %%%%%%%%%%%%%
20 // gemc headers
21 // %%%%%%%%%%%%%
22 #include "run_conditions.h"
23 #include "usage.h"
24 
25 
26 class materials
27 {
28  public:
29  virtual map<string, G4Material*> initMaterials(run_conditions, gemc_opts) = 0; // Pure Virtual Method to initialize G4 Materials
30  virtual ~materials(){}
31 };
32 
33 typedef materials *(*materialFactory)(); // Define materialFactory as a pointer to a function that returns a pointer
34 
35 materials *getMaterialFactory(map<string, materialFactory> *, string); // returns materialFactory Function from Factory Map
36 
37 map<string, materialFactory> registerMaterialFactories(); // Registers materialFactory in Factory Map
38 
39 
40 
41 #endif
STL namespace.
materials * getMaterialFactory(map< string, materialFactory > *, string)
virtual ~materials()
map< string, materialFactory > registerMaterialFactories()