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

#line 73 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtLocation/qgeoroute.sip"
#include <qgeoroute.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtLocation/qgeoroute.sip"
#include <qgeoroute.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 24 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qvariantmap.sip"
#include <qvariant.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtPositioning/qgeocoordinate.sip"
#include <qgeocoordinate.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtLocation/qgeorouterequest.sip"
#include <qgeorouterequest.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtLocation/qgeoroutesegment.sip"
#include <qgeoroutesegment.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtPositioning/qgeorectangle.sip"
#include <qgeorectangle.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 57 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQGeoRouteLeg.cpp"


PyDoc_STRVAR(doc_QGeoRouteLeg_setLegIndex, "setLegIndex(self, int)");

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

    {
        int a0;
         ::QGeoRouteLeg *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QGeoRouteLeg, &sipCpp, &a0))
        {
            sipCpp->setLegIndex(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteLeg, sipName_setLegIndex, doc_QGeoRouteLeg_setLegIndex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteLeg_legIndex, "legIndex(self) -> int");

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

    {
        const  ::QGeoRouteLeg *sipCpp;

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

            sipRes = sipCpp->legIndex();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteLeg, sipName_legIndex, doc_QGeoRouteLeg_legIndex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteLeg_setOverallRoute, "setOverallRoute(self, QGeoRoute)");

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

    {
        const  ::QGeoRoute* a0;
         ::QGeoRouteLeg *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QGeoRouteLeg, &sipCpp, sipType_QGeoRoute, &a0))
        {
            sipCpp->setOverallRoute(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteLeg, sipName_setOverallRoute, doc_QGeoRouteLeg_setOverallRoute);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteLeg_overallRoute, "overallRoute(self) -> QGeoRoute");

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

    {
        const  ::QGeoRouteLeg *sipCpp;

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

            sipRes = new  ::QGeoRoute(sipCpp->overallRoute());

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

    sipNoMethod(sipParseErr, sipName_QGeoRouteLeg, sipName_overallRoute, doc_QGeoRouteLeg_overallRoute);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QGeoRouteLeg)
        return sipCppV;

    if (targetType == sipType_QGeoRoute)
        return static_cast< ::QGeoRoute *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QGeoRouteLeg* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QGeoRouteLeg[] = {{6, 255, 1}};


static PyMethodDef methods_QGeoRouteLeg[] = {
    {sipName_legIndex, meth_QGeoRouteLeg_legIndex, METH_VARARGS, doc_QGeoRouteLeg_legIndex},
    {sipName_overallRoute, meth_QGeoRouteLeg_overallRoute, METH_VARARGS, doc_QGeoRouteLeg_overallRoute},
    {sipName_setLegIndex, meth_QGeoRouteLeg_setLegIndex, METH_VARARGS, doc_QGeoRouteLeg_setLegIndex},
    {sipName_setOverallRoute, meth_QGeoRouteLeg_setOverallRoute, METH_VARARGS, doc_QGeoRouteLeg_setOverallRoute}
};

PyDoc_STRVAR(doc_QGeoRouteLeg, "\1QGeoRouteLeg()\n"
"QGeoRouteLeg(QGeoRouteLeg)");


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


sipClassTypeDef sipTypeDef_QtLocation_QGeoRouteLeg = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QGeoRouteLeg,
        SIP_NULLPTR,
        &plugin_QGeoRouteLeg
    },
    {
        sipNameNr_QGeoRouteLeg,
        {0, 0, 1},
        4, methods_QGeoRouteLeg,
        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_QGeoRouteLeg,
    -1,
    -1,
    supers_QGeoRouteLeg,
    SIP_NULLPTR,
    init_type_QGeoRouteLeg,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QGeoRouteLeg,
    assign_QGeoRouteLeg,
    array_QGeoRouteLeg,
    copy_QGeoRouteLeg,
    release_QGeoRouteLeg,
    cast_QGeoRouteLeg,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QGeoRouteLeg,
    sizeof ( ::QGeoRouteLeg),
};
