Geant4-11
Namespaces | Functions
pyG4Isotope.cc File Reference
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include "G4Version.hh"
#include "G4Isotope.hh"

Go to the source code of this file.

Namespaces

namespace  pyG4Isotope
 

Functions

void export_G4Isotope ()
 
void pyG4Isotope::Print (G4Isotope &iso)
 

Function Documentation

◆ export_G4Isotope()

void export_G4Isotope ( )

Definition at line 58 of file pyG4Isotope.cc.

59{
60 class_<G4Isotope, G4Isotope*, boost::noncopyable>
61 ("G4Isotope", "isotope class", no_init)
62 // constructors
63 .def(init<const G4String&, G4int, G4int>())
64 .def(init<const G4String&, G4int, G4int, G4double>())
65 // ---
66 .def("GetName", &G4Isotope::GetName,
67 return_value_policy<reference_existing_object>())
68 .def("SetName", &G4Isotope::SetName)
69 .def("GetZ", &G4Isotope::GetZ)
70 .def("GetN", &G4Isotope::GetN)
71 .def("GetA", &G4Isotope::GetA)
72 .def("GetIsotope", &G4Isotope::GetIsotope,
73 f_GetIsotope()
74 [return_value_policy<reference_existing_object>()])
75 .staticmethod("GetIsotope")
76 .def("GetIsotopeTable", &G4Isotope::GetIsotopeTable,
77 return_value_policy<reference_existing_object>())
78 .staticmethod("GetIsotopeTable")
79 .def("GetNumberOfIsotopes", &G4Isotope::GetNumberOfIsotopes)
80 .staticmethod("GetNumberOfIsotopes")
81
82 .def("GetIndex", &G4Isotope::GetIndex)
83 // ---
84 .def("Print", Print)
85 .def(self == self)
86 .def(self != self)
87 ;
88
89 // G4IsotopeTable
90 class_<G4IsotopeTable> ("G4IsotopeTable", "isotope table")
91 .def(vector_indexing_suite<G4IsotopeTable>())
92 .def(self_ns::str(self))
93 ;
94}
size_t GetIndex() const
Definition: G4Isotope.hh:110
static const G4IsotopeTable * GetIsotopeTable()
Definition: G4Isotope.cc:181
G4int GetZ() const
Definition: G4Isotope.hh:90
void SetName(const G4String &name)
Definition: G4Isotope.hh:131
static size_t GetNumberOfIsotopes()
Definition: G4Isotope.cc:188
static G4Isotope * GetIsotope(const G4String &name, G4bool warning=false)
Definition: G4Isotope.cc:195
G4int GetN() const
Definition: G4Isotope.hh:93
const G4String & GetName() const
Definition: G4Isotope.hh:87
G4double GetA() const
Definition: G4Isotope.hh:96
void Print(G4Isotope &iso)
Definition: pyG4Isotope.cc:46

References G4Isotope::GetA(), G4Isotope::GetIndex(), G4Isotope::GetIsotope(), G4Isotope::GetIsotopeTable(), G4Isotope::GetN(), G4Isotope::GetName(), G4Isotope::GetNumberOfIsotopes(), G4Isotope::GetZ(), pyG4Isotope::Print(), and G4Isotope::SetName().

Referenced by BOOST_PYTHON_MODULE().