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();
114#define G4_BASE_DECLARE_XS_FACTORY(cross_section, flag) \
115 const G4CrossSectionFactory<cross_section,flag>& cross_section##Factory = G4CrossSectionFactory<cross_section,flag>(cross_section::Default_Name())
117#define G4_BASE_REFERENCE_XS_FACTORY(cross_section,flag) \
118 class cross_section; \
119 extern const G4CrossSectionFactory<cross_section,flag>& cross_section##Factory; \
120 const G4CrossSectionFactory<cross_section,flag>& cross_section##FactoryRef = cross_section##Factory
123#define G4_DECLARE_XS_FACTORY(cross_section) G4_BASE_DECLARE_XS_FACTORY(cross_section,0)
124#define G4_DECLARE_SHAREDXS_FACTORY(cross_section) G4_BASE_DECLARE_XS_FACTORY(cross_section,1)
125#define G4_DECLARE_SHAREDTLSXS_FACTORY(cross_section) G4_BASE_DECLARE_XS_FACTORY(cross_section,2)
128#define G4_REFERENCE_XS_FACTORY(cross_section) G4_BASE_REFERENCE_XS_FACTORY(cross_section,0)
129#define G4_REFERENCE_SHAREDXS_FACTORY(cross_section) G4_BASE_REFERENCE_XS_FACTORY(cross_section,1)
130#define G4_REFERENCE_SHAREDTLSXS_FACTORY(cross_section) G4_BASE_REFERENCE_XS_FACTORY(cross_section,2)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static G4CrossSectionFactoryRegistry * Instance()
void Register(const G4String &name, G4VBaseXSFactory *factory)
virtual G4VCrossSectionDataSet * Instantiate()
G4CrossSectionFactory(const G4String &name)
G4CrossSectionFactory(const G4String &name)
virtual G4VCrossSectionDataSet * Instantiate()
virtual G4VCrossSectionDataSet * Instantiate()
G4CrossSectionFactory(const G4String &name)
virtual G4VCrossSectionDataSet * Instantiate()=0