#include #include #include #include #include "gtsam/nonlinear/utilities.h" // for RedirectCout. #include "wrap/serialization.h" #include using namespace std; namespace py = pybind11; PYBIND11_MODULE(enum_py, m_) { m_.doc() = "pybind11 wrapper of enum_py"; py::enum_(m_, "Kind", py::arithmetic()) .value("Dog", Kind::Dog) .value("Cat", Kind::Cat); pybind11::module m_gtsam = m_.def_submodule("gtsam", "gtsam submodule"); py::enum_(m_gtsam, "VerbosityLM", py::arithmetic()) .value("SILENT", gtsam::VerbosityLM::SILENT) .value("SUMMARY", gtsam::VerbosityLM::SUMMARY) .value("TERMINATION", gtsam::VerbosityLM::TERMINATION) .value("LAMBDA", gtsam::VerbosityLM::LAMBDA) .value("TRYLAMBDA", gtsam::VerbosityLM::TRYLAMBDA) .value("TRYCONFIG", gtsam::VerbosityLM::TRYCONFIG) .value("DAMPED", gtsam::VerbosityLM::DAMPED) .value("TRYDELTA", gtsam::VerbosityLM::TRYDELTA); py::class_>(m_gtsam, "Pet") .def(py::init(), py::arg("name"), py::arg("type")) .def_readwrite("name", >sam::Pet::name) .def_readwrite("type", >sam::Pet::type); #include "python/specializations.h" }