/*
 * 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 339 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qabstractitemmodel.sip"
// The capsule destructor for a QModelRoleData array.
static void qpycore_gc_modelroledata(PyObject *mrd_obj);
#line 30 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleDataSpan.cpp"

#line 325 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 34 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleDataSpan.cpp"
#line 1505 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#include <QModelRoleData>
#line 38 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleDataSpan.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 41 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleDataSpan.cpp"
#line 344 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qabstractitemmodel.sip"
// The capsule destructor for a QModelRoleData array.
static void qpycore_gc_modelroledata(PyObject *mrd_obj)
{
    delete reinterpret_cast<QList<QModelRoleData>* >(PyCapsule_GetPointer(mrd_obj, NULL));
}
#line 48 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleDataSpan.cpp"


PyDoc_STRVAR(doc_QModelRoleDataSpan_size, "size(self) -> int");

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

    {
        const ::QModelRoleDataSpan *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QModelRoleDataSpan, &sipCpp))
        {
            ::qsizetype sipRes;

            sipRes = sipCpp->size();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleDataSpan, sipName_size, doc_QModelRoleDataSpan_size);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleDataSpan_length, "length(self) -> int");

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

    {
        const ::QModelRoleDataSpan *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QModelRoleDataSpan, &sipCpp))
        {
            ::qsizetype sipRes;

            sipRes = sipCpp->length();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleDataSpan, sipName_length, doc_QModelRoleDataSpan_length);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleDataSpan_data, "data(self) -> QModelRoleData|None");

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

    {
        const ::QModelRoleDataSpan *sipCpp;

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

            sipRes = sipCpp->data();

            return sipConvertFromType(sipRes, sipType_QModelRoleData, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleDataSpan, sipName_data, doc_QModelRoleDataSpan_data);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleDataSpan_begin, "begin(self) -> QModelRoleData|None");

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

    {
        const ::QModelRoleDataSpan *sipCpp;

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

            sipRes = sipCpp->begin();

            return sipConvertFromType(sipRes, sipType_QModelRoleData, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleDataSpan, sipName_begin, doc_QModelRoleDataSpan_begin);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleDataSpan_end, "end(self) -> QModelRoleData|None");

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

    {
        const ::QModelRoleDataSpan *sipCpp;

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

            sipRes = sipCpp->end();

            return sipConvertFromType(sipRes, sipType_QModelRoleData, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleDataSpan, sipName_end, doc_QModelRoleDataSpan_end);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QModelRoleDataSpan_dataForRole, "dataForRole(self, role: int) -> Any");

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

    {
        int a0;
        const ::QModelRoleDataSpan *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QModelRoleDataSpan, &sipCpp, &a0))
        {
            ::QVariant*sipRes;

            sipRes = sipCpp->dataForRole(a0);

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

    sipNoMethod(sipParseErr, sipName_QModelRoleDataSpan, sipName_dataForRole, doc_QModelRoleDataSpan_dataForRole);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QModelRoleDataSpan___getitem__(PyObject *, PyObject *);}
static PyObject *slot_QModelRoleDataSpan___getitem__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QModelRoleDataSpan *sipCpp = reinterpret_cast< ::QModelRoleDataSpan *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QModelRoleDataSpan));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::qsizetype a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1n", &a0))
        {
            ::QModelRoleData*sipRes;

            if (a0 < 0 || a0 >= sipCpp->length())
            {
                PyErr_SetNone(PyExc_IndexError);
                return SIP_NULLPTR;
            }

            sipRes = &(*sipCpp)[a0];

            return sipConvertFromType(sipRes, sipType_QModelRoleData, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QModelRoleDataSpan, sipName___getitem__, SIP_NULLPTR);

    return SIP_NULLPTR;
}


extern "C" {static Py_ssize_t slot_QModelRoleDataSpan___len__(PyObject *);}
static Py_ssize_t slot_QModelRoleDataSpan___len__(PyObject *sipSelf)
{
    ::QModelRoleDataSpan *sipCpp = reinterpret_cast< ::QModelRoleDataSpan *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QModelRoleDataSpan));

    if (!sipCpp)
        return 0;


    {
        {
            Py_ssize_t sipRes = 0;

#line 1 "Auto-generated"
            sipRes = (Py_ssize_t)sipCpp->length();
#line 258 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleDataSpan.cpp"

            return sipRes;
        }
    }

    return 0;
}


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


extern "C" {static void *array_QModelRoleDataSpan(Py_ssize_t);}
static void *array_QModelRoleDataSpan(Py_ssize_t sipNrElem)
{
    return new ::QModelRoleDataSpan[sipNrElem];
}


extern "C" {static void array_delete_QModelRoleDataSpan(void *);}
static void array_delete_QModelRoleDataSpan(void *sipCpp)
{
    delete[] reinterpret_cast< ::QModelRoleDataSpan *>(sipCpp);
}


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


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


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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new ::QModelRoleDataSpan();

            return sipCpp;
        }
    }

    {
        ::QModelRoleData* a0;

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

            return sipCpp;
        }
    }

    {
        ::QList< ::QModelRoleData>* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QList_0100QModelRoleData, &a0, SIP_NULLPTR))
        {
#line 356 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qabstractitemmodel.sip"
        PyObject *a0cap = PyCapsule_New(a0, NULL, qpycore_gc_modelroledata);
        
        if (a0cap)
        {
            sipSetUserObject((sipSimpleWrapper *)sipSelf, a0cap);
        
            sipCpp = new QModelRoleDataSpan(*a0);
        }
#line 353 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQModelRoleDataSpan.cpp"

            return sipCpp;
        }
    }

    {
        const ::QModelRoleDataSpan* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QModelRoleDataSpan[] = {
    {(void *)slot_QModelRoleDataSpan___getitem__, getitem_slot},
    {(void *)slot_QModelRoleDataSpan___len__, len_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QModelRoleDataSpan[] = {
    {sipName_begin, meth_QModelRoleDataSpan_begin, METH_VARARGS, doc_QModelRoleDataSpan_begin},
    {sipName_data, meth_QModelRoleDataSpan_data, METH_VARARGS, doc_QModelRoleDataSpan_data},
    {sipName_dataForRole, meth_QModelRoleDataSpan_dataForRole, METH_VARARGS, doc_QModelRoleDataSpan_dataForRole},
    {sipName_end, meth_QModelRoleDataSpan_end, METH_VARARGS, doc_QModelRoleDataSpan_end},
    {sipName_length, meth_QModelRoleDataSpan_length, METH_VARARGS, doc_QModelRoleDataSpan_length},
    {sipName_size, meth_QModelRoleDataSpan_size, METH_VARARGS, doc_QModelRoleDataSpan_size}
};

PyDoc_STRVAR(doc_QModelRoleDataSpan, "\1QModelRoleDataSpan()\n"
"QModelRoleDataSpan(modelRoleData: QModelRoleData)\n"
"QModelRoleDataSpan(modelRoleData: Iterable[QModelRoleData])\n"
"QModelRoleDataSpan(a0: QModelRoleDataSpan)");


sipClassTypeDef sipTypeDef_QtCore_QModelRoleDataSpan = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QModelRoleDataSpan,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QModelRoleDataSpan,
        {0, 0, 1},
        6, methods_QModelRoleDataSpan,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QModelRoleDataSpan,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QModelRoleDataSpan,
    init_type_QModelRoleDataSpan,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QModelRoleDataSpan,
    assign_QModelRoleDataSpan,
    array_QModelRoleDataSpan,
    copy_QModelRoleDataSpan,
    release_QModelRoleDataSpan,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QModelRoleDataSpan,
    sizeof (::QModelRoleDataSpan),
};
