/*
 * 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 117 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qabstractxmlnodemodel.sip"
#include <qabstractxmlnodemodel.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlItem.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qabstractxmlnodemodel.sip"
#include <qabstractxmlnodemodel.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlItem.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlItem.cpp"


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

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

    {
        const  ::QXmlItem *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlItem, sipName_isNull, doc_QXmlItem_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlItem_isNode, "isNode(self) -> bool");

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

    {
        const  ::QXmlItem *sipCpp;

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

            sipRes = sipCpp->isNode();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlItem, sipName_isNode, doc_QXmlItem_isNode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlItem_isAtomicValue, "isAtomicValue(self) -> bool");

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

    {
        const  ::QXmlItem *sipCpp;

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

            sipRes = sipCpp->isAtomicValue();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlItem, sipName_isAtomicValue, doc_QXmlItem_isAtomicValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlItem_toAtomicValue, "toAtomicValue(self) -> Any");

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

    {
        const  ::QXmlItem *sipCpp;

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

            sipRes = new  ::QVariant(sipCpp->toAtomicValue());

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

    sipNoMethod(sipParseErr, sipName_QXmlItem, sipName_toAtomicValue, doc_QXmlItem_toAtomicValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlItem_toNodeModelIndex, "toNodeModelIndex(self) -> QXmlNodeModelIndex");

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

    {
        const  ::QXmlItem *sipCpp;

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

            sipRes = new  ::QXmlNodeModelIndex(sipCpp->toNodeModelIndex());

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

    sipNoMethod(sipParseErr, sipName_QXmlItem, sipName_toNodeModelIndex, doc_QXmlItem_toNodeModelIndex);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QXmlItem* a0;

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

            return sipCpp;
        }
    }

    {
        const  ::QXmlNodeModelIndex* a0;

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

            return sipCpp;
        }
    }

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QVariant, &a0, &a0State))
        {
            sipCpp = new  ::QXmlItem(*a0);
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QXmlItem[] = {
    {sipName_isAtomicValue, meth_QXmlItem_isAtomicValue, METH_VARARGS, doc_QXmlItem_isAtomicValue},
    {sipName_isNode, meth_QXmlItem_isNode, METH_VARARGS, doc_QXmlItem_isNode},
    {sipName_isNull, meth_QXmlItem_isNull, METH_VARARGS, doc_QXmlItem_isNull},
    {sipName_toAtomicValue, meth_QXmlItem_toAtomicValue, METH_VARARGS, doc_QXmlItem_toAtomicValue},
    {sipName_toNodeModelIndex, meth_QXmlItem_toNodeModelIndex, METH_VARARGS, doc_QXmlItem_toNodeModelIndex}
};

PyDoc_STRVAR(doc_QXmlItem, "\1QXmlItem()\n"
"QXmlItem(QXmlItem)\n"
"QXmlItem(QXmlNodeModelIndex)\n"
"QXmlItem(Any)");


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


sipClassTypeDef sipTypeDef_QtXmlPatterns_QXmlItem = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QXmlItem,
        SIP_NULLPTR,
        &plugin_QXmlItem
    },
    {
        sipNameNr_QXmlItem,
        {0, 0, 1},
        5, methods_QXmlItem,
        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_QXmlItem,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QXmlItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QXmlItem,
    assign_QXmlItem,
    array_QXmlItem,
    copy_QXmlItem,
    release_QXmlItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QXmlItem,
    sizeof ( ::QXmlItem),
};
