/*
 * Copyright 2020 Free Software Foundation, Inc.
 * Copyright 2021 Marcus Müller
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

/***********************************************************************************/
/* This file is automatically generated using bindtool and can be manually edited  */
/* The following lines can be configured to regenerate this file during cmake      */
/* If manual edits are made, the following tags should be modified accordingly.    */
/* BINDTOOL_GEN_AUTOMATIC(0)                                                       */
/* BINDTOOL_USE_PYGCCXML(0)                                                        */
/* BINDTOOL_HEADER_FILE(tags.h)                                        */
/* BINDTOOL_HEADER_FILE_HASH(6283d354a0e1767eb18c66e7092f6583)                     */
/***********************************************************************************/

#include <pybind11/complex.h>
#include <pybind11/operators.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace py = pybind11;

#include <gnuradio/tags.h>
// pydoc.h is automatically generated in the build directory
#include <tags_pydoc.h>

void bind_tags(py::module& m)
{

    using tag_t = ::gr::tag_t;


    py::class_<tag_t, std::shared_ptr<tag_t>>(m, "tag_t", D(tag_t))

        .def(py::init<>(), D(tag_t, tag_t, 0))
        .def(py::init<gr::tag_t const&>(), py::arg("rhs"), D(tag_t, tag_t, 1))

        .def_static("offset_compare",
                    &tag_t::offset_compare,
                    py::arg("x"),
                    py::arg("y"),
                    D(tag_t, offset_compare))

        .def(py::self < py::self, D(tag_t, offset_compare))

        .def_readwrite("offset", &tag_t::offset)
        .def_readwrite("key", &tag_t::key)
        .def_readwrite("value", &tag_t::value)
        .def_readwrite("srcid", &tag_t::srcid)

        // TODO - put in operators
        ;
}
