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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qxmlname.sip"
#include <qxmlname.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlName.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qxmlnamepool.sip"
#include <qxmlnamepool.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlName.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/QtXmlPatterns/sipQtXmlPatternsQXmlName.cpp"


PyDoc_STRVAR(doc_QXmlName_namespaceUri, "namespaceUri(self, QXmlNamePool) -> str");

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

    {
        const  ::QXmlNamePool* a0;
        const  ::QXmlName *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QXmlName, &sipCpp, sipType_QXmlNamePool, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->namespaceUri(*a0));

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

    sipNoMethod(sipParseErr, sipName_QXmlName, sipName_namespaceUri, doc_QXmlName_namespaceUri);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlName_prefix, "prefix(self, QXmlNamePool) -> str");

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

    {
        const  ::QXmlNamePool* a0;
        const  ::QXmlName *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QXmlName, &sipCpp, sipType_QXmlNamePool, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->prefix(*a0));

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

    sipNoMethod(sipParseErr, sipName_QXmlName, sipName_prefix, doc_QXmlName_prefix);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlName_localName, "localName(self, QXmlNamePool) -> str");

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

    {
        const  ::QXmlNamePool* a0;
        const  ::QXmlName *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QXmlName, &sipCpp, sipType_QXmlNamePool, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->localName(*a0));

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

    sipNoMethod(sipParseErr, sipName_QXmlName, sipName_localName, doc_QXmlName_localName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlName_toClarkName, "toClarkName(self, QXmlNamePool) -> str");

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

    {
        const  ::QXmlNamePool* a0;
        const  ::QXmlName *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QXmlName, &sipCpp, sipType_QXmlNamePool, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->toClarkName(*a0));

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

    sipNoMethod(sipParseErr, sipName_QXmlName, sipName_toClarkName, doc_QXmlName_toClarkName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlName_isNull, "isNull(self) -> bool");

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

    {
        const  ::QXmlName *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlName, sipName_isNull, doc_QXmlName_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlName_isNCName, "isNCName(str) -> bool");

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

    {
        const  ::QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString, &a0, &a0State))
        {
            bool sipRes;

            sipRes =  ::QXmlName::isNCName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlName, sipName_isNCName, doc_QXmlName_isNCName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlName_fromClarkName, "fromClarkName(str, QXmlNamePool) -> QXmlName");

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

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QXmlNamePool* a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1J9", sipType_QString, &a0, &a0State, sipType_QXmlNamePool, &a1))
        {
             ::QXmlName*sipRes;

            sipRes = new  ::QXmlName( ::QXmlName::fromClarkName(*a0,*a1));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

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

    sipNoMethod(sipParseErr, sipName_QXmlName, sipName_fromClarkName, doc_QXmlName_fromClarkName);

    return SIP_NULLPTR;
}


extern "C" {static long slot_QXmlName___hash__(PyObject *);}
static long slot_QXmlName___hash__(PyObject *sipSelf)
{
     ::QXmlName *sipCpp = reinterpret_cast< ::QXmlName *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QXmlName));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;

#line 46 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qxmlname.sip"
        sipRes = qHash(*sipCpp);
#line 252 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlName.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_QXmlName___ne__(PyObject *,PyObject *);}
static PyObject *slot_QXmlName___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QXmlName *sipCpp = reinterpret_cast< ::QXmlName *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QXmlName));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QXmlName* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QXmlName, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QXmlName::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtXmlPatterns, ne_slot, sipType_QXmlName, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QXmlName___eq__(PyObject *,PyObject *);}
static PyObject *slot_QXmlName___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QXmlName *sipCpp = reinterpret_cast< ::QXmlName *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QXmlName));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QXmlName* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QXmlName, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QXmlName::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtXmlPatterns, eq_slot, sipType_QXmlName, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
         ::QXmlNamePool* a0;
        const  ::QString* a1;
        int a1State = 0;
        const  ::QString& a2def = QString();
        const  ::QString* a2 = &a2def;
        int a2State = 0;
        const  ::QString& a3def = QString();
        const  ::QString* a3 = &a3def;
        int a3State = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_namespaceUri,
            sipName_prefix,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9J1|J1J1", sipType_QXmlNamePool, &a0, sipType_QString, &a1, &a1State, sipType_QString, &a2, &a2State, sipType_QString, &a3, &a3State))
        {
            sipCpp = new  ::QXmlName(*a0,*a1,*a2,*a3);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);
            sipReleaseType(const_cast< ::QString *>(a2), sipType_QString, a2State);
            sipReleaseType(const_cast< ::QString *>(a3), sipType_QString, a3State);

            return sipCpp;
        }
    }

    {
        const  ::QXmlName* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QXmlName[] = {
    {(void *)slot_QXmlName___hash__, hash_slot},
    {(void *)slot_QXmlName___ne__, ne_slot},
    {(void *)slot_QXmlName___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QXmlName[] = {
    {sipName_fromClarkName, meth_QXmlName_fromClarkName, METH_VARARGS, doc_QXmlName_fromClarkName},
    {sipName_isNCName, meth_QXmlName_isNCName, METH_VARARGS, doc_QXmlName_isNCName},
    {sipName_isNull, meth_QXmlName_isNull, METH_VARARGS, doc_QXmlName_isNull},
    {sipName_localName, meth_QXmlName_localName, METH_VARARGS, doc_QXmlName_localName},
    {sipName_namespaceUri, meth_QXmlName_namespaceUri, METH_VARARGS, doc_QXmlName_namespaceUri},
    {sipName_prefix, meth_QXmlName_prefix, METH_VARARGS, doc_QXmlName_prefix},
    {sipName_toClarkName, meth_QXmlName_toClarkName, METH_VARARGS, doc_QXmlName_toClarkName}
};

PyDoc_STRVAR(doc_QXmlName, "\1QXmlName()\n"
"QXmlName(QXmlNamePool, str, namespaceUri: str = '', prefix: str = '')\n"
"QXmlName(QXmlName)");


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


sipClassTypeDef sipTypeDef_QtXmlPatterns_QXmlName = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QXmlName,
        SIP_NULLPTR,
        &plugin_QXmlName
    },
    {
        sipNameNr_QXmlName,
        {0, 0, 1},
        7, methods_QXmlName,
        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_QXmlName,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QXmlName,
    init_type_QXmlName,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QXmlName,
    assign_QXmlName,
    array_QXmlName,
    copy_QXmlName,
    release_QXmlName,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QXmlName,
    sizeof ( ::QXmlName),
};
