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

#line 34 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtSensors/qsensor.sip"
#include <qsensor.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSensors/sipQtSensorsqoutputrange.cpp"



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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::qoutputrange* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_qoutputrange_accuracy(void *, PyObject *, PyObject *);}
static PyObject *varget_qoutputrange_accuracy(void *sipSelf, PyObject *, PyObject *)
{
    ::qreal sipVal;
    ::qoutputrange *sipCpp = reinterpret_cast< ::qoutputrange *>(sipSelf);

    sipVal = sipCpp->accuracy;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_qoutputrange_accuracy(void *, PyObject *, PyObject *);}
static int varset_qoutputrange_accuracy(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::qreal sipVal;
    ::qoutputrange *sipCpp = reinterpret_cast< ::qoutputrange *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->accuracy = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_qoutputrange_maximum(void *, PyObject *, PyObject *);}
static PyObject *varget_qoutputrange_maximum(void *sipSelf, PyObject *, PyObject *)
{
    ::qreal sipVal;
    ::qoutputrange *sipCpp = reinterpret_cast< ::qoutputrange *>(sipSelf);

    sipVal = sipCpp->maximum;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_qoutputrange_maximum(void *, PyObject *, PyObject *);}
static int varset_qoutputrange_maximum(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::qreal sipVal;
    ::qoutputrange *sipCpp = reinterpret_cast< ::qoutputrange *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->maximum = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_qoutputrange_minimum(void *, PyObject *, PyObject *);}
static PyObject *varget_qoutputrange_minimum(void *sipSelf, PyObject *, PyObject *)
{
    ::qreal sipVal;
    ::qoutputrange *sipCpp = reinterpret_cast< ::qoutputrange *>(sipSelf);

    sipVal = sipCpp->minimum;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_qoutputrange_minimum(void *, PyObject *, PyObject *);}
static int varset_qoutputrange_minimum(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::qreal sipVal;
    ::qoutputrange *sipCpp = reinterpret_cast< ::qoutputrange *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->minimum = sipVal;

    return 0;
}

sipVariableDef variables_qoutputrange[] = {
    {InstanceVariable, sipName_accuracy, (PyMethodDef *)varget_qoutputrange_accuracy, (PyMethodDef *)varset_qoutputrange_accuracy, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_maximum, (PyMethodDef *)varget_qoutputrange_maximum, (PyMethodDef *)varset_qoutputrange_maximum, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_minimum, (PyMethodDef *)varget_qoutputrange_minimum, (PyMethodDef *)varset_qoutputrange_minimum, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_qoutputrange, "\1qoutputrange()\n"
"qoutputrange(a0: qoutputrange)");


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


sipClassTypeDef sipTypeDef_QtSensors_qoutputrange = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_qoutputrange,
        SIP_NULLPTR,
        &plugin_qoutputrange,
    },
    {
        sipNameNr_qoutputrange,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        3, variables_qoutputrange,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_qoutputrange,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_qoutputrange,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_qoutputrange,
    assign_qoutputrange,
    array_qoutputrange,
    copy_qoutputrange,
    release_qoutputrange,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_qoutputrange,
    sizeof (::qoutputrange),
};
