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

#line 37 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDesigner/extension.sip"
#include <extension.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQAbstractExtensionManager.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQAbstractExtensionManager.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQAbstractExtensionManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDesigner/extension.sip"
#include <extension.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQAbstractExtensionManager.cpp"


class sipQAbstractExtensionManager : public  ::QAbstractExtensionManager
{
public:
    sipQAbstractExtensionManager();
    sipQAbstractExtensionManager(const  ::QAbstractExtensionManager&);
    virtual ~sipQAbstractExtensionManager();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QObject* extension( ::QObject*,const  ::QString&) const SIP_OVERRIDE;
    void unregisterExtensions( ::QAbstractExtensionFactory*,const  ::QString&) SIP_OVERRIDE;
    void registerExtensions( ::QAbstractExtensionFactory*,const  ::QString&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[3];
};

sipQAbstractExtensionManager::sipQAbstractExtensionManager():  ::QAbstractExtensionManager(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

 ::QObject* sipQAbstractExtensionManager::extension( ::QObject*a0,const  ::QString& a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return 0;

    extern  ::QObject* sipVH_QtDesigner_84(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*,const  ::QString&);

    return sipVH_QtDesigner_84(sipGILState, sipImportedVirtErrorHandlers_QtDesigner_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQAbstractExtensionManager::unregisterExtensions( ::QAbstractExtensionFactory*a0,const  ::QString& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, sipName_QAbstractExtensionManager, sipName_unregisterExtensions);

    if (!sipMeth)
        return;

    extern void sipVH_QtDesigner_86(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QAbstractExtensionFactory*,const  ::QString&);

    sipVH_QtDesigner_86(sipGILState, sipImportedVirtErrorHandlers_QtDesigner_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQAbstractExtensionManager::registerExtensions( ::QAbstractExtensionFactory*a0,const  ::QString& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, sipName_QAbstractExtensionManager, sipName_registerExtensions);

    if (!sipMeth)
        return;

    extern void sipVH_QtDesigner_86(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QAbstractExtensionFactory*,const  ::QString&);

    sipVH_QtDesigner_86(sipGILState, sipImportedVirtErrorHandlers_QtDesigner_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}


PyDoc_STRVAR(doc_QAbstractExtensionManager_registerExtensions, "registerExtensions(self, QAbstractExtensionFactory, str)");

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

    {
         ::QAbstractExtensionFactory* a0;
        const  ::QString* a1;
        int a1State = 0;
         ::QAbstractExtensionManager *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J1", &sipSelf, sipType_QAbstractExtensionManager, &sipCpp, sipType_QAbstractExtensionFactory, &a0, sipType_QString, &a1, &a1State))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QAbstractExtensionManager, sipName_registerExtensions);
                return SIP_NULLPTR;
            }

            sipCpp->registerExtensions(a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAbstractExtensionManager, sipName_registerExtensions, doc_QAbstractExtensionManager_registerExtensions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAbstractExtensionManager_unregisterExtensions, "unregisterExtensions(self, QAbstractExtensionFactory, str)");

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

    {
         ::QAbstractExtensionFactory* a0;
        const  ::QString* a1;
        int a1State = 0;
         ::QAbstractExtensionManager *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J1", &sipSelf, sipType_QAbstractExtensionManager, &sipCpp, sipType_QAbstractExtensionFactory, &a0, sipType_QString, &a1, &a1State))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QAbstractExtensionManager, sipName_unregisterExtensions);
                return SIP_NULLPTR;
            }

            sipCpp->unregisterExtensions(a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAbstractExtensionManager, sipName_unregisterExtensions, doc_QAbstractExtensionManager_unregisterExtensions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAbstractExtensionManager_extension, "extension(self, QObject, str) -> QObject");

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

    {
         ::QObject* a0;
        const  ::QString* a1;
        int a1State = 0;
        const  ::QAbstractExtensionManager *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J1", &sipSelf, sipType_QAbstractExtensionManager, &sipCpp, sipType_QObject, &a0, sipType_QString, &a1, &a1State))
        {
             ::QObject*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QAbstractExtensionManager, sipName_extension);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->extension(a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

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

    sipNoMethod(sipParseErr, sipName_QAbstractExtensionManager, sipName_extension, doc_QAbstractExtensionManager_extension);

    return SIP_NULLPTR;
}


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QAbstractExtensionManager* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QAbstractExtensionManager[] = {
    {sipName_extension, meth_QAbstractExtensionManager_extension, METH_VARARGS, doc_QAbstractExtensionManager_extension},
    {sipName_registerExtensions, meth_QAbstractExtensionManager_registerExtensions, METH_VARARGS, doc_QAbstractExtensionManager_registerExtensions},
    {sipName_unregisterExtensions, meth_QAbstractExtensionManager_unregisterExtensions, METH_VARARGS, doc_QAbstractExtensionManager_unregisterExtensions}
};

PyDoc_STRVAR(doc_QAbstractExtensionManager, "\1QAbstractExtensionManager()\n"
"QAbstractExtensionManager(QAbstractExtensionManager)");


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


sipClassTypeDef sipTypeDef_QtDesigner_QAbstractExtensionManager = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAbstractExtensionManager,
        SIP_NULLPTR,
        &plugin_QAbstractExtensionManager
    },
    {
        sipNameNr_QAbstractExtensionManager,
        {0, 0, 1},
        3, methods_QAbstractExtensionManager,
        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_QAbstractExtensionManager,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QAbstractExtensionManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAbstractExtensionManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QAbstractExtensionManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QAbstractExtensionManager),
};
