// ============================================================================
// This file was autogenerated
// It is presented side to side with its source: class_adapt_test.h
// It is not used in the compilation
//    (see integration_tests/bindings/pybind_mylib.cpp which contains the full binding
//     code, including this code)
// ============================================================================

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/functional.h>
#include <pybind11/numpy.h>
#include "mylib/mylib_main/mylib.h"

namespace py = pybind11;

// <litgen_glue_code>  // Autogenerated code below! Do not edit!

// </litgen_glue_code> // Autogenerated code end


void py_init_module_mylib(py::module& m)
{
    // <litgen_pydef> // Autogenerated code below! Do not edit!
    ////////////////////    <generated_from:class_adapt_test.h>    ////////////////////
    auto pyClassColor4 =
        py::class_<Color4>
            (m, "Color4", "")
        .def(py::init(
            [](const std::array<uint8_t, 4>& _rgba) -> std::unique_ptr<Color4>
            {
                auto ctor_wrapper = [](const uint8_t _rgba[4]) ->  std::unique_ptr<Color4>
                {
                    return std::make_unique<Color4>(_rgba);
                };
                auto ctor_wrapper_adapt_fixed_size_c_arrays = [&ctor_wrapper](const std::array<uint8_t, 4>& _rgba) -> std::unique_ptr<Color4>
                {
                    auto lambda_result = ctor_wrapper(_rgba.data());
                    return lambda_result;
                };

                return ctor_wrapper_adapt_fixed_size_c_arrays(_rgba);
            }),
            py::arg("_rgba"),
            "The constructor params will automatically be \"adapted\" into std::array<uint8_t, 4>")
        .def_property("rgba",
            [](Color4 &self) -> pybind11::array
            {
                auto dtype = pybind11::dtype(pybind11::format_descriptor<uint8_t>::format());
                auto base = pybind11::array(dtype, {4}, {sizeof(uint8_t)});
                return pybind11::array(dtype, {4}, {sizeof(uint8_t)}, self.rgba, base);
            }, [](Color4& self) {},
            "This member will be stored as a modifiable numpy array")
        ;
    ////////////////////    </generated_from:class_adapt_test.h>    ////////////////////

    // </litgen_pydef> // Autogenerated code end
}
