/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * 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 "sipAPIQtSql.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlindex.sip"
#include <qsqlindex.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlIndex.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlIndex.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlfield.sip"
#include <qsqlfield.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlIndex.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlrecord.sip"
#include <qsqlrecord.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlIndex.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlIndex.cpp"


PyDoc_STRVAR(doc_QSqlIndex_setCursorName, "setCursorName(self, str)");

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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QSqlIndex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlIndex, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setCursorName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlIndex, sipName_setCursorName, doc_QSqlIndex_setCursorName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlIndex_cursorName, "cursorName(self) -> str");

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

    {
        const  ::QSqlIndex *sipCpp;

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

            sipRes = new  ::QString(sipCpp->cursorName());

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

    sipNoMethod(sipParseErr, sipName_QSqlIndex, sipName_cursorName, doc_QSqlIndex_cursorName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlIndex_setName, "setName(self, str)");

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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QSqlIndex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlIndex, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlIndex, sipName_setName, doc_QSqlIndex_setName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlIndex_name, "name(self) -> str");

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

    {
        const  ::QSqlIndex *sipCpp;

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

            sipRes = new  ::QString(sipCpp->name());

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

    sipNoMethod(sipParseErr, sipName_QSqlIndex, sipName_name, doc_QSqlIndex_name);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlIndex_append, "append(self, QSqlField)\n"
"append(self, QSqlField, bool)");

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

    {
        const  ::QSqlField* a0;
         ::QSqlIndex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QSqlIndex, &sipCpp, sipType_QSqlField, &a0))
        {
            sipCpp->append(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const  ::QSqlField* a0;
        bool a1;
         ::QSqlIndex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9b", &sipSelf, sipType_QSqlIndex, &sipCpp, sipType_QSqlField, &a0, &a1))
        {
            sipCpp->append(*a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlIndex, sipName_append, doc_QSqlIndex_append);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlIndex_isDescending, "isDescending(self, int) -> bool");

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

    {
        int a0;
        const  ::QSqlIndex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlIndex, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->isDescending(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlIndex, sipName_isDescending, doc_QSqlIndex_isDescending);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlIndex_setDescending, "setDescending(self, int, bool)");

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

    {
        int a0;
        bool a1;
         ::QSqlIndex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bib", &sipSelf, sipType_QSqlIndex, &sipCpp, &a0, &a1))
        {
            sipCpp->setDescending(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlIndex, sipName_setDescending, doc_QSqlIndex_setDescending);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QSqlIndex(void *, const sipTypeDef *);}
static void *cast_QSqlIndex(void *sipCppV, const sipTypeDef *targetType)
{
     ::QSqlIndex *sipCpp = reinterpret_cast< ::QSqlIndex *>(sipCppV);

    if (targetType == sipType_QSqlIndex)
        return sipCppV;

    if (targetType == sipType_QSqlRecord)
        return static_cast< ::QSqlRecord *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

    {
        const  ::QString& a0def = QString();
        const  ::QString* a0 = &a0def;
        int a0State = 0;
        const  ::QString& a1def = QString();
        const  ::QString* a1 = &a1def;
        int a1State = 0;

        static const char *sipKwdList[] = {
            sipName_cursorName,
            sipName_name,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1J1", sipType_QString, &a0, &a0State, sipType_QString, &a1, &a1State))
        {
            sipCpp = new  ::QSqlIndex(*a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

            return sipCpp;
        }
    }

    {
        const  ::QSqlIndex* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QSqlIndex[] = {{23, 255, 1}};


static PyMethodDef methods_QSqlIndex[] = {
    {sipName_append, meth_QSqlIndex_append, METH_VARARGS, doc_QSqlIndex_append},
    {sipName_cursorName, meth_QSqlIndex_cursorName, METH_VARARGS, doc_QSqlIndex_cursorName},
    {sipName_isDescending, meth_QSqlIndex_isDescending, METH_VARARGS, doc_QSqlIndex_isDescending},
    {sipName_name, meth_QSqlIndex_name, METH_VARARGS, doc_QSqlIndex_name},
    {sipName_setCursorName, meth_QSqlIndex_setCursorName, METH_VARARGS, doc_QSqlIndex_setCursorName},
    {sipName_setDescending, meth_QSqlIndex_setDescending, METH_VARARGS, doc_QSqlIndex_setDescending},
    {sipName_setName, meth_QSqlIndex_setName, METH_VARARGS, doc_QSqlIndex_setName}
};

PyDoc_STRVAR(doc_QSqlIndex, "\1QSqlIndex(cursorName: str = '', name: str = '')\n"
"QSqlIndex(QSqlIndex)");


static pyqt5ClassPluginDef plugin_QSqlIndex = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtSql_QSqlIndex = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSqlIndex,
        SIP_NULLPTR,
        &plugin_QSqlIndex
    },
    {
        sipNameNr_QSqlIndex,
        {0, 0, 1},
        7, methods_QSqlIndex,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSqlIndex,
    -1,
    -1,
    supers_QSqlIndex,
    SIP_NULLPTR,
    init_type_QSqlIndex,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSqlIndex,
    assign_QSqlIndex,
    array_QSqlIndex,
    copy_QSqlIndex,
    release_QSqlIndex,
    cast_QSqlIndex,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSqlIndex,
    sizeof ( ::QSqlIndex),
};
