/*
 * 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 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtLocation/qplaceratings.sip"
#include <qplaceratings.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtLocation/sipQtLocationQPlaceRatings.cpp"



PyDoc_STRVAR(doc_QPlaceRatings_average, "average(self) -> float");

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

    {
        const  ::QPlaceRatings *sipCpp;

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

            sipRes = sipCpp->average();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceRatings, sipName_average, doc_QPlaceRatings_average);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceRatings_setAverage, "setAverage(self, float)");

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

    {
         ::qreal a0;
         ::QPlaceRatings *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceRatings, sipName_setAverage, doc_QPlaceRatings_setAverage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceRatings_count, "count(self) -> int");

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

    {
        const  ::QPlaceRatings *sipCpp;

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

            sipRes = sipCpp->count();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceRatings, sipName_count, doc_QPlaceRatings_count);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceRatings_setCount, "setCount(self, int)");

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

    {
        int a0;
         ::QPlaceRatings *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceRatings, sipName_setCount, doc_QPlaceRatings_setCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceRatings_maximum, "maximum(self) -> float");

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

    {
        const  ::QPlaceRatings *sipCpp;

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

            sipRes = sipCpp->maximum();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceRatings, sipName_maximum, doc_QPlaceRatings_maximum);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceRatings_setMaximum, "setMaximum(self, float)");

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

    {
         ::qreal a0;
         ::QPlaceRatings *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceRatings, sipName_setMaximum, doc_QPlaceRatings_setMaximum);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPlaceRatings_isEmpty, "isEmpty(self) -> bool");

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

    {
        const  ::QPlaceRatings *sipCpp;

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

            sipRes = sipCpp->isEmpty();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlaceRatings, sipName_isEmpty, doc_QPlaceRatings_isEmpty);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QPlaceRatings___ne__(PyObject *,PyObject *);}
static PyObject *slot_QPlaceRatings___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QPlaceRatings *sipCpp = reinterpret_cast< ::QPlaceRatings *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QPlaceRatings));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPlaceRatings* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtLocation, ne_slot, sipType_QPlaceRatings, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QPlaceRatings___eq__(PyObject *,PyObject *);}
static PyObject *slot_QPlaceRatings___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QPlaceRatings *sipCpp = reinterpret_cast< ::QPlaceRatings *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QPlaceRatings));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPlaceRatings* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtLocation, eq_slot, sipType_QPlaceRatings, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QPlaceRatings* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QPlaceRatings[] = {
    {(void *)slot_QPlaceRatings___ne__, ne_slot},
    {(void *)slot_QPlaceRatings___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QPlaceRatings[] = {
    {sipName_average, meth_QPlaceRatings_average, METH_VARARGS, doc_QPlaceRatings_average},
    {sipName_count, meth_QPlaceRatings_count, METH_VARARGS, doc_QPlaceRatings_count},
    {sipName_isEmpty, meth_QPlaceRatings_isEmpty, METH_VARARGS, doc_QPlaceRatings_isEmpty},
    {sipName_maximum, meth_QPlaceRatings_maximum, METH_VARARGS, doc_QPlaceRatings_maximum},
    {sipName_setAverage, meth_QPlaceRatings_setAverage, METH_VARARGS, doc_QPlaceRatings_setAverage},
    {sipName_setCount, meth_QPlaceRatings_setCount, METH_VARARGS, doc_QPlaceRatings_setCount},
    {sipName_setMaximum, meth_QPlaceRatings_setMaximum, METH_VARARGS, doc_QPlaceRatings_setMaximum}
};

PyDoc_STRVAR(doc_QPlaceRatings, "\1QPlaceRatings()\n"
"QPlaceRatings(QPlaceRatings)");


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


sipClassTypeDef sipTypeDef_QtLocation_QPlaceRatings = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPlaceRatings,
        SIP_NULLPTR,
        &plugin_QPlaceRatings
    },
    {
        sipNameNr_QPlaceRatings,
        {0, 0, 1},
        7, methods_QPlaceRatings,
        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_QPlaceRatings,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QPlaceRatings,
    init_type_QPlaceRatings,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPlaceRatings,
    assign_QPlaceRatings,
    array_QPlaceRatings,
    copy_QPlaceRatings,
    release_QPlaceRatings,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QPlaceRatings,
    sizeof ( ::QPlaceRatings),
};
