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

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtDesigner/extension.sip"
#include <extension.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractExtensionFactory.cpp"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractExtensionFactory.cpp"
#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractExtensionFactory.cpp"


class sipQAbstractExtensionFactory : public ::QAbstractExtensionFactory
{
public:
    sipQAbstractExtensionFactory();
    sipQAbstractExtensionFactory(const ::QAbstractExtensionFactory&);
    virtual ~sipQAbstractExtensionFactory();

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

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[1];
};

sipQAbstractExtensionFactory::sipQAbstractExtensionFactory(): ::QAbstractExtensionFactory(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

::QObject* sipQAbstractExtensionFactory::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_QAbstractExtensionFactory, sipName_extension);

    if (!sipMeth)
        return 0;

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

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


PyDoc_STRVAR(doc_QAbstractExtensionFactory_extension, "extension(self, object: QObject|None, iid: str|None) -> QObject|None");

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

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

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QAbstractExtensionFactory, 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_QAbstractExtensionFactory, sipName_extension, doc_QAbstractExtensionFactory_extension);

    return SIP_NULLPTR;
}


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::QAbstractExtensionFactory* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QAbstractExtensionFactory[] = {
    {sipName_extension, meth_QAbstractExtensionFactory_extension, METH_VARARGS, doc_QAbstractExtensionFactory_extension}
};

PyDoc_STRVAR(doc_QAbstractExtensionFactory, "\1QAbstractExtensionFactory()\n"
"QAbstractExtensionFactory(a0: QAbstractExtensionFactory)");


sipClassTypeDef sipTypeDef_QtDesigner_QAbstractExtensionFactory = {
    {
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAbstractExtensionFactory,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QAbstractExtensionFactory,
        {0, 0, 1},
        1, methods_QAbstractExtensionFactory,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QAbstractExtensionFactory,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QAbstractExtensionFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAbstractExtensionFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QAbstractExtensionFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QAbstractExtensionFactory),
};
