From d4d4b67583cf11638a07ec199b6eab22a6329d9e Mon Sep 17 00:00:00 2001 From: SimonRohou Date: Tue, 17 Oct 2023 19:17:52 +0200 Subject: [PATCH] [py] binding for CtcCN (with file) --- .../contractors/static/codac_py_CtcCN.cpp | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 python/src/core/contractors/static/codac_py_CtcCN.cpp diff --git a/python/src/core/contractors/static/codac_py_CtcCN.cpp b/python/src/core/contractors/static/codac_py_CtcCN.cpp new file mode 100644 index 000000000..8015ab7a7 --- /dev/null +++ b/python/src/core/contractors/static/codac_py_CtcCN.cpp @@ -0,0 +1,42 @@ +/** + * \file + * CtcCN Python binding + * ---------------------------------------------------------------------------- + * \date 2020 + * \author Simon Rohou, BenoƮt Desrochers + * \copyright Copyright 2021 Codac Team + * \license This program is distributed under the terms of + * the GNU Lesser General Public License (LGPL). + */ + +#include +#include +#include +#include +#include "codac_type_caster.h" + +#include "codac_py_Ctc.h" +#include "codac_CtcCN.h" +// Generated file from Doxygen XML (doxygen2docstring.py): +#include "codac_py_CtcCN_docs.h" + +using namespace std; +using namespace codac; +namespace py = pybind11; +using namespace pybind11::literals; + + +void export_CtcCN(py::module& m, py::class_& ctc) +{ + py::class_ ctc_cn(m, "CtcCN", ctc, CTCCN_MAIN); + ctc_cn + + .def(py::init(), + CTCCN_CTCCN_CONTRACTORNETWORK_INTERVALVECTORVAR, + "cn"_a.noconvert(), "box"_a.noconvert()) + + .def("contract", &CtcCN::contract, + CTCCN_VOID_CONTRACT_INTERVALVECTOR, + "x"_a.noconvert()) + ; +} \ No newline at end of file