/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.7.0
 *
 * Copyright (c) 2022 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 "sipAPIQtWebSockets.h"

#line 28 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtWebSockets/qmaskgenerator.sip"
#include <qmaskgenerator.h>
#line 29 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"

#line 28 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 151 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 38 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 41 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 44 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 245 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 47 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 232 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 50 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 24 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 53 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 56 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 59 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 30 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 62 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 135 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 65 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 150 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qtextstream.sip"
#include <qtextstream.h>
#line 70 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 73 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qanystringview.sip"
#include <qanystringview.h>
#line 76 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 25 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 79 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 82 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 85 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWebSockets/sipQtWebSocketsQMaskGenerator.cpp"


class sipQMaskGenerator : public  ::QMaskGenerator
{
public:
    sipQMaskGenerator( ::QObject*);
    virtual ~sipQMaskGenerator();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::quint32 nextMask() SIP_OVERRIDE;
    bool seed() SIP_OVERRIDE;
    bool event( ::QEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[9];
};

sipQMaskGenerator::sipQMaskGenerator( ::QObject*a0):  ::QMaskGenerator(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipQMaskGenerator::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtWebSockets_qt_metaobject(sipPySelf,sipType_QMaskGenerator);

    return  ::QMaskGenerator::metaObject();
}

int sipQMaskGenerator::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QMaskGenerator::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtWebSockets_qt_metacall(sipPySelf,sipType_QMaskGenerator,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQMaskGenerator::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtWebSockets_qt_metacast(sipPySelf, sipType_QMaskGenerator, _clname, &sipCpp) ? sipCpp :  ::QMaskGenerator::qt_metacast(_clname));
}

 ::quint32 sipQMaskGenerator::nextMask()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, sipName_QMaskGenerator, sipName_nextMask);

    if (!sipMeth)
        return 0;

    extern  ::quint32 sipVH_QtWebSockets_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtWebSockets_7(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQMaskGenerator::seed()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, sipName_QMaskGenerator, sipName_seed);

    if (!sipMeth)
        return 0;

    extern bool sipVH_QtWebSockets_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtWebSockets_6(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQMaskGenerator::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QMaskGenerator::event(a0);

    extern bool sipVH_QtWebSockets_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtWebSockets_5(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQMaskGenerator::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QMaskGenerator::eventFilter(a0,a1);

    extern bool sipVH_QtWebSockets_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

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

void sipQMaskGenerator::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QMaskGenerator::timerEvent(a0);
        return;
    }

    extern void sipVH_QtWebSockets_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtWebSockets_3(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQMaskGenerator::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QMaskGenerator::childEvent(a0);
        return;
    }

    extern void sipVH_QtWebSockets_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtWebSockets_2(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQMaskGenerator::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QMaskGenerator::customEvent(a0);
        return;
    }

    extern void sipVH_QtWebSockets_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtWebSockets_1(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQMaskGenerator::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[7], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QMaskGenerator::connectNotify(a0);
        return;
    }

    extern void sipVH_QtWebSockets_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtWebSockets_0(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQMaskGenerator::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QMaskGenerator::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtWebSockets_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtWebSockets_0(sipGILState, sipImportedVirtErrorHandlers_QtWebSockets_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QMaskGenerator_seed, "seed(self) -> bool");

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

    {
         ::QMaskGenerator *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QMaskGenerator, sipName_seed);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->seed();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMaskGenerator, sipName_seed, doc_QMaskGenerator_seed);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMaskGenerator_nextMask, "nextMask(self) -> int");

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

    {
         ::QMaskGenerator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QMaskGenerator, &sipCpp))
        {
             ::quint32 sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QMaskGenerator, sipName_nextMask);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->nextMask();

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMaskGenerator, sipName_nextMask, doc_QMaskGenerator_nextMask);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QMaskGenerator)
        return sipCppV;

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QMaskGenerator(void *, int);}
static void release_QMaskGenerator(void *sipCppV, int)
{
     ::QMaskGenerator *sipCpp = reinterpret_cast< ::QMaskGenerator *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


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

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


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

    {
         ::QObject* a0 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQMaskGenerator(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QMaskGenerator[] = {{4, 0, 1}};


static PyMethodDef methods_QMaskGenerator[] = {
    {sipName_nextMask, meth_QMaskGenerator_nextMask, METH_VARARGS, doc_QMaskGenerator_nextMask},
    {sipName_seed, meth_QMaskGenerator_seed, METH_VARARGS, doc_QMaskGenerator_seed}
};

PyDoc_STRVAR(doc_QMaskGenerator, "\1QMaskGenerator(parent: QObject = None)");


static pyqt6ClassPluginDef plugin_QMaskGenerator = {
    & ::QMaskGenerator::staticMetaObject,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtWebSockets_QMaskGenerator = {
    {
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QMaskGenerator,
        SIP_NULLPTR,
        &plugin_QMaskGenerator
    },
    {
        sipNameNr_QMaskGenerator,
        {0, 0, 1},
        2, methods_QMaskGenerator,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QMaskGenerator,
    -1,
    -1,
    supers_QMaskGenerator,
    SIP_NULLPTR,
    init_type_QMaskGenerator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QMaskGenerator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QMaskGenerator,
    cast_QMaskGenerator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QMaskGenerator),
};
