/*
 * 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 "sipAPIQtSql.h"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qsqlrelationaltablemodel.sip"
#include <qsqlrelationaltablemodel.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlRelation.cpp"

#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlRelation.cpp"


PyDoc_STRVAR(doc_QSqlRelation_tableName, "tableName(self) -> str");

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

    {
        const ::QSqlRelation *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSqlRelation, sipName_tableName, doc_QSqlRelation_tableName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelation_indexColumn, "indexColumn(self) -> str");

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

    {
        const ::QSqlRelation *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSqlRelation, sipName_indexColumn, doc_QSqlRelation_indexColumn);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelation_displayColumn, "displayColumn(self) -> str");

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

    {
        const ::QSqlRelation *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSqlRelation, sipName_displayColumn, doc_QSqlRelation_displayColumn);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelation_isValid, "isValid(self) -> bool");

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

    {
        const ::QSqlRelation *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlRelation, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelation, sipName_isValid, doc_QSqlRelation_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelation_swap, "swap(self, other: QSqlRelation)");

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

    {
        ::QSqlRelation* a0;
        ::QSqlRelation *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QSqlRelation, &sipCpp, sipType_QSqlRelation, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelation, sipName_swap, doc_QSqlRelation_swap);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QString* a0;
        int a0State = 0;
        const ::QString* a1;
        int a1State = 0;
        const ::QString* a2;
        int a2State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1J1J1", sipType_QString, &a0, &a0State, sipType_QString, &a1, &a1State, sipType_QString, &a2, &a2State))
        {
            sipCpp = new ::QSqlRelation(*a0, *a1, *a2);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);
            sipReleaseType(const_cast< ::QString *>(a2), sipType_QString, a2State);

            return sipCpp;
        }
    }

    {
        const ::QSqlRelation* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QSqlRelation[] = {
    {sipName_displayColumn, meth_QSqlRelation_displayColumn, METH_VARARGS, doc_QSqlRelation_displayColumn},
    {sipName_indexColumn, meth_QSqlRelation_indexColumn, METH_VARARGS, doc_QSqlRelation_indexColumn},
    {sipName_isValid, meth_QSqlRelation_isValid, METH_VARARGS, doc_QSqlRelation_isValid},
    {sipName_swap, meth_QSqlRelation_swap, METH_VARARGS, doc_QSqlRelation_swap},
    {sipName_tableName, meth_QSqlRelation_tableName, METH_VARARGS, doc_QSqlRelation_tableName}
};

PyDoc_STRVAR(doc_QSqlRelation, "\1QSqlRelation()\n"
"QSqlRelation(aTableName: str|None, indexCol: str|None, displayCol: str|None)\n"
"QSqlRelation(a0: QSqlRelation)");


sipClassTypeDef sipTypeDef_QtSql_QSqlRelation = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSqlRelation,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QSqlRelation,
        {0, 0, 1},
        5, methods_QSqlRelation,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSqlRelation,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QSqlRelation,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSqlRelation,
    assign_QSqlRelation,
    array_QSqlRelation,
    copy_QSqlRelation,
    release_QSqlRelation,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSqlRelation,
    sizeof (::QSqlRelation),
};
