/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.23
 *
 * Copyright (c) 2020 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 "sipAPIQtXml.h"

#line 190 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtXml/qxml.sip"
#include <qxml.h>
#line 29 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtXml/sipQtXmlQXmlLocator.cpp"



class sipQXmlLocator : public  ::QXmlLocator
{
public:
    sipQXmlLocator();
    sipQXmlLocator(const  ::QXmlLocator&);
    virtual ~sipQXmlLocator();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    int lineNumber() const SIP_OVERRIDE;
    int columnNumber() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQXmlLocator::sipQXmlLocator():  ::QXmlLocator(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

int sipQXmlLocator::lineNumber() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,sipName_QXmlLocator,sipName_lineNumber);

    if (!sipMeth)
        return 0;

    extern int sipVH_QtXml_27(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtXml_27(sipGILState, sipImportedVirtErrorHandlers_QtXml_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

int sipQXmlLocator::columnNumber() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,sipName_QXmlLocator,sipName_columnNumber);

    if (!sipMeth)
        return 0;

    extern int sipVH_QtXml_27(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtXml_27(sipGILState, sipImportedVirtErrorHandlers_QtXml_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QXmlLocator_columnNumber, "columnNumber(self) -> int");

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

    {
        const  ::QXmlLocator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlLocator, &sipCpp))
        {
            int sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QXmlLocator, sipName_columnNumber);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->columnNumber();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlLocator, sipName_columnNumber, doc_QXmlLocator_columnNumber);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlLocator_lineNumber, "lineNumber(self) -> int");

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

    {
        const  ::QXmlLocator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlLocator, &sipCpp))
        {
            int sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QXmlLocator, sipName_lineNumber);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->lineNumber();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlLocator, sipName_lineNumber, doc_QXmlLocator_lineNumber);

    return SIP_NULLPTR;
}


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QXmlLocator* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QXmlLocator[] = {
    {SIP_MLNAME_CAST(sipName_columnNumber), meth_QXmlLocator_columnNumber, METH_VARARGS, SIP_MLDOC_CAST(doc_QXmlLocator_columnNumber)},
    {SIP_MLNAME_CAST(sipName_lineNumber), meth_QXmlLocator_lineNumber, METH_VARARGS, SIP_MLDOC_CAST(doc_QXmlLocator_lineNumber)}
};

PyDoc_STRVAR(doc_QXmlLocator, "\1QXmlLocator()\n"
"QXmlLocator(QXmlLocator)");


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


sipClassTypeDef sipTypeDef_QtXml_QXmlLocator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QXmlLocator,
        {SIP_NULLPTR},
        &plugin_QXmlLocator
    },
    {
        sipNameNr_QXmlLocator,
        {0, 0, 1},
        2, methods_QXmlLocator,
        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_QXmlLocator,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QXmlLocator,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QXmlLocator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QXmlLocator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
