31 #include <boost/python.hpp>
33 #if G4VERSION_NUMBER >= 710
36 using namespace boost::python;
41 namespace pyG4NistManager {
51 FindOrBuildElement, 1, 2)
61 FindOrBuildMaterial, 1, 2)
65 (const
G4String&, const std::vector<G4String>&,
71 (const G4String&, const std::vector<G4String>&,
72 const std::vector<G4double>&, G4double, G4bool,
73 G4State, G4double, G4double)
77 ConstructNewMaterial, 4, 8)
80 ConstructNewGasMaterial, 4, 5)
84 using namespace pyG4NistManager;
93 #if G4VERSION_NUMBER >= 710
95 class_<G4NistManager, boost::noncopyable>
96 (
"G4NistManager",
"manager class for NIST materials", no_init)
99 return_value_policy<reference_existing_object>())
100 .staticmethod(
"Instance")
105 #if G4VERSION_NUMBER < 910
106 .def(
"RegisterElement", &G4NistManager::RegisterElement)
107 .def(
"DeRegisterElement", &G4NistManager::DeRegisterElement)
110 return_internal_reference<>())
111 .def(
"FindOrBuildElement", f1_FindOrBuildElement,
112 f_FindOrBuildElement()
113 [return_value_policy<reference_existing_object>()])
114 .def(
"FindOrBuildElement", f2_FindOrBuildElement,
115 f_FindOrBuildElement()
116 [return_value_policy<reference_existing_object>()])
120 .def(
"PrintElement", f1_PrintElement)
121 .def(
"PrintElement", f2_PrintElement)
124 #if G4VERSION_NUMBER < 910
125 .def(
"RegisterMaterial", &G4NistManager::RegisterMaterial)
126 .def(
"DeRegisterMaterial", &G4NistManager::DeRegisterMaterial)
129 return_value_policy<reference_existing_object>())
131 f_FindOrBuildMaterial()
132 [return_value_policy<reference_existing_object>()])
133 .def(
"ConstructNewMaterial", f1_ConstructNewMaterial,
134 f_ConstructNewMaterial()
135 [return_value_policy<reference_existing_object>()])
136 .def(
"ConstructNewMaterial", f2_ConstructNewMaterial,
137 f_ConstructNewMaterial()
138 [return_value_policy<reference_existing_object>()])
139 #if G4VERSION_NUMBER >= 910
141 f_ConstructNewGasMaterial()
142 [return_value_policy<reference_existing_object>()])