/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtCore.h"

#line 325 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleData.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleData.cpp"


PyDoc_STRVAR(doc_QModelRoleData_role, "role(self) -> int");

extern "C" {static PyObject *meth_QModelRoleData_role(PyObject *, PyObject *);}
static PyObject *meth_QModelRoleData_role(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QModelRoleData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QModelRoleData, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->role();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleData, sipName_role, doc_QModelRoleData_role);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleData_data, "data(self) -> Any");

extern "C" {static PyObject *meth_QModelRoleData_data(PyObject *, PyObject *);}
static PyObject *meth_QModelRoleData_data(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QModelRoleData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QModelRoleData, &sipCpp))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->data());

            return sipConvertFromNewType(sipRes, sipType_QVariant, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleData, sipName_data, doc_QModelRoleData_data);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleData_setData, "setData(self, data: Any)");

extern "C" {static PyObject *meth_QModelRoleData_setData(PyObject *, PyObject *);}
static PyObject *meth_QModelRoleData_setData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QVariant* a0;
        int a0State = 0;
        ::QModelRoleData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QModelRoleData, &sipCpp, sipType_QVariant, &a0, &a0State))
        {
            sipCpp->setData(*a0);
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleData, sipName_setData, doc_QModelRoleData_setData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleData_clearData, "clearData(self)");

extern "C" {static PyObject *meth_QModelRoleData_clearData(PyObject *, PyObject *);}
static PyObject *meth_QModelRoleData_clearData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QModelRoleData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QModelRoleData, &sipCpp))
        {
            sipCpp->clearData();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleData, sipName_clearData, doc_QModelRoleData_clearData);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QModelRoleData(void *, int);}
static void release_QModelRoleData(void *sipCppV, int)
{
    delete reinterpret_cast< ::QModelRoleData *>(sipCppV);
}


extern "C" {static void assign_QModelRoleData(void *, Py_ssize_t, void *);}
static void assign_QModelRoleData(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QModelRoleData *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QModelRoleData *>(sipSrc);
}


extern "C" {static void *copy_QModelRoleData(const void *, Py_ssize_t);}
static void *copy_QModelRoleData(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::QModelRoleData(reinterpret_cast<const ::QModelRoleData *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_QModelRoleData(sipSimpleWrapper *);}
static void dealloc_QModelRoleData(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QModelRoleData(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QModelRoleData(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QModelRoleData(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::QModelRoleData *sipCpp = SIP_NULLPTR;

    {
        int a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "i", &a0))
        {
            sipCpp = new ::QModelRoleData(a0);

            return sipCpp;
        }
    }

    {
        const ::QModelRoleData* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QModelRoleData, &a0))
        {
            sipCpp = new ::QModelRoleData(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QModelRoleData[] = {
    {sipName_clearData, meth_QModelRoleData_clearData, METH_VARARGS, doc_QModelRoleData_clearData},
    {sipName_data, meth_QModelRoleData_data, METH_VARARGS, doc_QModelRoleData_data},
    {sipName_role, meth_QModelRoleData_role, METH_VARARGS, doc_QModelRoleData_role},
    {sipName_setData, meth_QModelRoleData_setData, METH_VARARGS, doc_QModelRoleData_setData}
};

PyDoc_STRVAR(doc_QModelRoleData, "\1QModelRoleData(role: int)\n"
"QModelRoleData(a0: QModelRoleData)");


sipClassTypeDef sipTypeDef_QtCore_QModelRoleData = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QModelRoleData,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QModelRoleData,
        {0, 0, 1},
        4, methods_QModelRoleData,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QModelRoleData,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QModelRoleData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QModelRoleData,
    assign_QModelRoleData,
    SIP_NULLPTR,
    copy_QModelRoleData,
    release_QModelRoleData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QModelRoleData),
};
