26 #ifndef G4CrossSectionFactory_h
27 #define G4CrossSectionFactory_h 1
57 msg<<
"Factory mode: "<<mode<<
" not supported!";
59 return static_cast<T*
>(0);
92 static T* shared =
new T();
109 if (!shared) { shared =
new T(); }
115 #define G4_BASE_DECLARE_XS_FACTORY(cross_section, flag) \
116 const G4CrossSectionFactory<cross_section,flag>& cross_section##Factory = G4CrossSectionFactory<cross_section,flag>(cross_section::Default_Name())
118 #define G4_BASE_REFERENCE_XS_FACTORY(cross_section,flag) \
119 class cross_section; \
120 extern const G4CrossSectionFactory<cross_section,flag>& cross_section##Factory; \
121 const G4CrossSectionFactory<cross_section,flag>& cross_section##FactoryRef = cross_section##Factory
124 #define G4_DECLARE_XS_FACTORY(cross_section) G4_BASE_DECLARE_XS_FACTORY(cross_section,0)
125 #define G4_DECLARE_SHAREDXS_FACTORY(cross_section) G4_BASE_DECLARE_XS_FACTORY(cross_section,1)
126 #define G4_DECLARE_SHAREDTLSXS_FACTORY(cross_section) G4_BASE_DECLARE_XS_FACTORY(cross_section,2)
129 #define G4_REFERENCE_XS_FACTORY(cross_section) G4_BASE_REFERENCE_XS_FACTORY(cross_section,0)
130 #define G4_REFERENCE_SHAREDXS_FACTORY(cross_section) G4_BASE_REFERENCE_XS_FACTORY(cross_section,1)
131 #define G4_REFERENCE_SHAREDTLSXS_FACTORY(cross_section) G4_BASE_REFERENCE_XS_FACTORY(cross_section,2)
std::ostringstream G4ExceptionDescription
G4CrossSectionFactory(const G4String &name)
G4CrossSectionFactory(const G4String &name)
const char * name(G4int ptype)
virtual G4VCrossSectionDataSet * Instantiate()=0
void Register(const G4String &name, G4VBaseXSFactory *factory)
virtual G4VCrossSectionDataSet * Instantiate()
virtual G4VCrossSectionDataSet * Instantiate()
virtual G4VCrossSectionDataSet * Instantiate()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4CrossSectionFactory(const G4String &name)
static G4CrossSectionFactoryRegistry * Instance()
virtual G4VCrossSectionDataSet * Instantiate()
G4CrossSectionFactory(const G4String &name)