/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 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 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtLocation/qplaceresult.sip"
#include <qplaceresult.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQPlaceResult.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtLocation/qplacesearchresult.sip"
#include <qplacesearchresult.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQPlaceResult.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtLocation/qplace.sip"
#include <qplace.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQPlaceResult.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtLocation/qplaceicon.sip"
#include <qplaceicon.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQPlaceResult.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQPlaceResult.cpp"


class sipQPlaceResult : public ::QPlaceResult
{
public:
    sipQPlaceResult();
    sipQPlaceResult(const ::QPlaceSearchResult&);
    sipQPlaceResult(const ::QPlaceResult&);
    ~sipQPlaceResult();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQPlaceResult(const sipQPlaceResult &);
    sipQPlaceResult &operator = (const sipQPlaceResult &);
};

sipQPlaceResult::sipQPlaceResult(): ::QPlaceResult(), sipPySelf(SIP_NULLPTR)
{
}

sipQPlaceResult::sipQPlaceResult(const ::QPlaceSearchResult& a0): ::QPlaceResult(a0), sipPySelf(SIP_NULLPTR)
{
}

sipQPlaceResult::sipQPlaceResult(const ::QPlaceResult& a0): ::QPlaceResult(a0), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_QPlaceResult_distance, "distance(self) -> float");

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

    {
        const ::QPlaceResult *sipCpp;

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

            sipRes = sipCpp->distance();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceResult, sipName_distance, doc_QPlaceResult_distance);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceResult_setDistance, "setDistance(self, distance: float)");

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

    {
        ::qreal a0;
        ::QPlaceResult *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QPlaceResult, &sipCpp, &a0))
        {
            sipCpp->setDistance(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceResult, sipName_setDistance, doc_QPlaceResult_setDistance);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceResult_place, "place(self) -> QPlace");

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

    {
        const ::QPlaceResult *sipCpp;

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

            sipRes = new ::QPlace(sipCpp->place());

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

    sipNoMethod(sipParseErr, sipName_QPlaceResult, sipName_place, doc_QPlaceResult_place);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceResult_setPlace, "setPlace(self, place: QPlace)");

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

    {
        const ::QPlace* a0;
        ::QPlaceResult *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QPlaceResult, &sipCpp, sipType_QPlace, &a0))
        {
            sipCpp->setPlace(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceResult, sipName_setPlace, doc_QPlaceResult_setPlace);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceResult_isSponsored, "isSponsored(self) -> bool");

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

    {
        const ::QPlaceResult *sipCpp;

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

            sipRes = sipCpp->isSponsored();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceResult, sipName_isSponsored, doc_QPlaceResult_isSponsored);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceResult_setSponsored, "setSponsored(self, sponsored: bool)");

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

    {
        bool a0;
        ::QPlaceResult *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QPlaceResult, &sipCpp, &a0))
        {
            sipCpp->setSponsored(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceResult, sipName_setSponsored, doc_QPlaceResult_setSponsored);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QPlaceResult)
        return sipCppV;

    if (targetType == sipType_QPlaceSearchResult)
        return static_cast< ::QPlaceSearchResult *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::QPlaceSearchResult* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::QPlaceResult* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QPlaceResult[] = {
    {sipName_distance, meth_QPlaceResult_distance, METH_VARARGS, doc_QPlaceResult_distance},
    {sipName_isSponsored, meth_QPlaceResult_isSponsored, METH_VARARGS, doc_QPlaceResult_isSponsored},
    {sipName_place, meth_QPlaceResult_place, METH_VARARGS, doc_QPlaceResult_place},
    {sipName_setDistance, meth_QPlaceResult_setDistance, METH_VARARGS, doc_QPlaceResult_setDistance},
    {sipName_setPlace, meth_QPlaceResult_setPlace, METH_VARARGS, doc_QPlaceResult_setPlace},
    {sipName_setSponsored, meth_QPlaceResult_setSponsored, METH_VARARGS, doc_QPlaceResult_setSponsored}
};

PyDoc_STRVAR(doc_QPlaceResult, "\1QPlaceResult()\n"
"QPlaceResult(other: QPlaceSearchResult)\n"
"QPlaceResult(a0: QPlaceResult)");


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


sipClassTypeDef sipTypeDef_QtLocation_QPlaceResult = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPlaceResult,
        SIP_NULLPTR,
        &plugin_QPlaceResult,
    },
    {
        sipNameNr_QPlaceResult,
        {0, 0, 1},
        6, methods_QPlaceResult,
        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_QPlaceResult,
    -1,
    -1,
    supers_QPlaceResult,
    SIP_NULLPTR,
    init_type_QPlaceResult,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPlaceResult,
    assign_QPlaceResult,
    array_QPlaceResult,
    copy_QPlaceResult,
    release_QPlaceResult,
    cast_QPlaceResult,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QPlaceResult,
    sizeof (::QPlaceResult),
};
