|
| 1 | +#include <pybind11/pybind11.h> |
| 2 | +#include <pybind11/stl.h> |
| 3 | + |
| 4 | +#include <G4AtomicBond.hh> |
| 5 | + |
| 6 | +#include "typecast.hh" |
| 7 | +#include "opaques.hh" |
| 8 | + |
| 9 | +namespace py = pybind11; |
| 10 | + |
| 11 | +void export_G4AtomicBond(py::module &m) |
| 12 | +{ |
| 13 | + py::class_<G4AtomicBond> mG4AtomicBond(m, "G4AtomicBond"); |
| 14 | + |
| 15 | + py::enum_<G4AtomicBond::theBondType>(mG4AtomicBond, "theBondType") |
| 16 | + .value("Ionic", G4AtomicBond::theBondType::Ionic) |
| 17 | + .value("Covalent", G4AtomicBond::theBondType::Covalent) |
| 18 | + .value("Metallic", G4AtomicBond::theBondType::Metallic) |
| 19 | + .value("NA", G4AtomicBond::theBondType::NA) |
| 20 | + .export_values(); |
| 21 | + |
| 22 | + mG4AtomicBond.def("__copy__", [](const G4AtomicBond &self) { return new G4AtomicBond(self); }) |
| 23 | + .def("__deepcopy__", [](const G4AtomicBond &self, py::dict) { return new G4AtomicBond(self); }) |
| 24 | + .def(py::init<G4AtomicBond::theBondType, G4Element *, G4int, G4Element *, G4int>(), py::arg("aType"), |
| 25 | + py::arg("firstAtomKind"), py::arg("firstAtomNumber"), py::arg("secondAtomKind"), py::arg("secondAtomNumber")) |
| 26 | + |
| 27 | + .def("GetAromaticity", &G4AtomicBond::GetAromaticity) |
| 28 | + .def("GetFirstAtomKind", &G4AtomicBond::GetFirstAtomKind, py::return_value_policy::reference) |
| 29 | + .def("GetFirstAtomNumber", &G4AtomicBond::GetFirstAtomNumber) |
| 30 | + .def("GetSecondAtomKind", &G4AtomicBond::GetSecondAtomKind, py::return_value_policy::reference) |
| 31 | + .def("GetSecondAtomNumber", &G4AtomicBond::GetSecondAtomNumber) |
| 32 | + .def("GetType", &G4AtomicBond::GetType) |
| 33 | + .def("SetAromaticity", &G4AtomicBond::SetAromaticity, py::arg("aBool")) |
| 34 | + .def("SetFirstAtomKind", &G4AtomicBond::SetFirstAtomKind, py::arg("aElement")) |
| 35 | + .def("SetFirstAtomNumber", &G4AtomicBond::SetFirstAtomNumber, py::arg("aInt")) |
| 36 | + .def("SetSecondAtomKind", &G4AtomicBond::SetSecondAtomKind, py::arg("aElement")) |
| 37 | + .def("SetSecondAtomNumber", &G4AtomicBond::SetSecondAtomNumber, py::arg("aInt")) |
| 38 | + .def("SetType", &G4AtomicBond::SetType, py::arg("aType")); |
| 39 | +} |
0 commit comments