33 #include <boost/python.hpp>
35 #if G4VERSION_NUMBER >= 710
38 using namespace boost::python;
43 namespace pyG4NistManager {
53 FindOrBuildElement, 1, 2);
63 FindOrBuildMaterial, 1, 2);
66 #if G4VERSION_NUMBER >= 910
68 (
const G4String&,
const std::vector<G4String>&,
74 (
const G4String&,
const std::vector<G4String>&,
80 ConstructNewMaterial, 4, 8);
84 (
const G4String&,
const std::vector<G4String>&,
89 (
const G4String&,
const std::vector<G4String>&,
94 ConstructNewMaterial, 4, 5);
98 #if G4VERSION_NUMBER >= 910
100 ConstructNewGasMaterial, 4, 5);
105 using namespace pyG4NistManager;
114 #if G4VERSION_NUMBER >= 710
116 class_<G4NistManager, boost::noncopyable>
117 (
"G4NistManager",
"manager class for NIST materials", no_init)
120 return_value_policy<reference_existing_object>())
121 .staticmethod(
"Instance")
126 #if G4VERSION_NUMBER < 910
127 .def(
"RegisterElement", &G4NistManager::RegisterElement)
128 .def(
"DeRegisterElement", &G4NistManager::DeRegisterElement)
131 return_internal_reference<>())
132 .def(
"FindOrBuildElement", f1_FindOrBuildElement,
133 f_FindOrBuildElement()
134 [return_value_policy<reference_existing_object>()])
135 .def(
"FindOrBuildElement", f2_FindOrBuildElement,
136 f_FindOrBuildElement()
137 [return_value_policy<reference_existing_object>()])
141 .def(
"PrintElement", f1_PrintElement)
142 .def(
"PrintElement", f2_PrintElement)
145 #if G4VERSION_NUMBER < 910
146 .def(
"RegisterMaterial", &G4NistManager::RegisterMaterial)
147 .def(
"DeRegisterMaterial", &G4NistManager::DeRegisterMaterial)
150 return_value_policy<reference_existing_object>())
152 f_FindOrBuildMaterial()
153 [return_value_policy<reference_existing_object>()])
154 .def(
"ConstructNewMaterial", f1_ConstructNewMaterial,
155 f_ConstructNewMaterial()
156 [return_value_policy<reference_existing_object>()])
157 .def(
"ConstructNewMaterial", f2_ConstructNewMaterial,
158 f_ConstructNewMaterial()
159 [return_value_policy<reference_existing_object>()])
160 #if G4VERSION_NUMBER >= 910
162 f_ConstructNewGasMaterial()
163 [return_value_policy<reference_existing_object>()])