/*
 * 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/qsqldatabase.sip"
#include <qsqldatabase.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlDriverCreatorBase.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqldriver.sip"
#include <qsqldriver.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlDriverCreatorBase.cpp"


class sipQSqlDriverCreatorBase : public  ::QSqlDriverCreatorBase
{
public:
    sipQSqlDriverCreatorBase();
    sipQSqlDriverCreatorBase(const  ::QSqlDriverCreatorBase&);
    virtual ~sipQSqlDriverCreatorBase();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QSqlDriver* createObject() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQSqlDriverCreatorBase(const sipQSqlDriverCreatorBase &);
    sipQSqlDriverCreatorBase &operator = (const sipQSqlDriverCreatorBase &);

    char sipPyMethods[1];
};

sipQSqlDriverCreatorBase::sipQSqlDriverCreatorBase():  ::QSqlDriverCreatorBase(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSqlDriverCreatorBase::sipQSqlDriverCreatorBase(const  ::QSqlDriverCreatorBase& a0):  ::QSqlDriverCreatorBase(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSqlDriverCreatorBase::~sipQSqlDriverCreatorBase()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

 ::QSqlDriver* sipQSqlDriverCreatorBase::createObject() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_QSqlDriverCreatorBase, sipName_createObject);

    if (!sipMeth)
        return 0;

    extern  ::QSqlDriver* sipVH_QtSql_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSql_0(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QSqlDriverCreatorBase_createObject, "createObject(self) -> QSqlDriver");

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

    {
        const  ::QSqlDriverCreatorBase *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QSqlDriverCreatorBase, sipName_createObject);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->createObject();

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

    sipNoMethod(sipParseErr, sipName_QSqlDriverCreatorBase, sipName_createObject, doc_QSqlDriverCreatorBase_createObject);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QSqlDriverCreatorBase(void *, int);}
static void release_QSqlDriverCreatorBase(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQSqlDriverCreatorBase *>(sipCppV);
    else
        delete reinterpret_cast< ::QSqlDriverCreatorBase *>(sipCppV);
}


extern "C" {static void dealloc_QSqlDriverCreatorBase(sipSimpleWrapper *);}
static void dealloc_QSqlDriverCreatorBase(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQSqlDriverCreatorBase *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSqlDriverCreatorBase(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QSqlDriverCreatorBase* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QSqlDriverCreatorBase[] = {
    {sipName_createObject, meth_QSqlDriverCreatorBase_createObject, METH_VARARGS, doc_QSqlDriverCreatorBase_createObject}
};

PyDoc_STRVAR(doc_QSqlDriverCreatorBase, "\1QSqlDriverCreatorBase()\n"
"QSqlDriverCreatorBase(QSqlDriverCreatorBase)");


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


sipClassTypeDef sipTypeDef_QtSql_QSqlDriverCreatorBase = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSqlDriverCreatorBase,
        SIP_NULLPTR,
        &plugin_QSqlDriverCreatorBase
    },
    {
        sipNameNr_QSqlDriverCreatorBase,
        {0, 0, 1},
        1, methods_QSqlDriverCreatorBase,
        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_QSqlDriverCreatorBase,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QSqlDriverCreatorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSqlDriverCreatorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QSqlDriverCreatorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QSqlDriverCreatorBase),
};
