/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.5.0
 *
 * Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQtDataVisualization.
 * 
 * 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 "sipAPIQtDataVisualization.h"

#line 28 "/usr/lib/python3.10/site-packages/PyQt5/bindings/QtCore/qpycore_qvector.sip"
#include <qvector.h>
#line 29 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/build/QtDataVisualization/sipQtDataVisualizationQVector0100QtDataVisualizationQSurfaceDataItem.cpp"

#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dbars.sip"
#include <q3dbars.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dcamera.sip"
#include <q3dcamera.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dinputhandler.sip"
#include <q3dinputhandler.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dlight.sip"
#include <q3dlight.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dobject.sip"
#include <q3dobject.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dscatter.sip"
#include <q3dscatter.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dscene.sip"
#include <q3dscene.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dsurface.sip"
#include <q3dsurface.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/q3dtheme.sip"
#include <q3dtheme.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qabstract3daxis.sip"
#include <qabstract3daxis.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qabstract3dgraph.sip"
#include <qabstract3dgraph.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qabstract3dinputhandler.sip"
#include <qabstract3dinputhandler.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qabstract3dseries.sip"
#include <qabstract3dseries.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qabstractdataproxy.sip"
#include <qabstractdataproxy.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qbar3dseries.sip"
#include <qbar3dseries.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qbardataitem.sip"
#include <qbardataitem.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qbardataproxy.sip"
#include <qbardataproxy.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qcategory3daxis.sip"
#include <qcategory3daxis.h>
#line 28 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qcustom3ditem.sip"
#include <qcustom3ditem.h>
#line 28 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qcustom3dlabel.sip"
#include <qcustom3dlabel.h>
#line 202 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qcustom3dvolume.sip"
#include <qcustom3dvolume.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qheightmapsurfacedataproxy.sip"
#include <qheightmapsurfacedataproxy.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qitemmodelbardataproxy.sip"
#include <qitemmodelbardataproxy.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qitemmodelscatterdataproxy.sip"
#include <qitemmodelscatterdataproxy.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qitemmodelsurfacedataproxy.sip"
#include <qitemmodelsurfacedataproxy.h>
#line 28 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qlogvalue3daxisformatter.sip"
#include <qlogvalue3daxisformatter.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qscatter3dseries.sip"
#include <qscatter3dseries.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qscatterdataitem.sip"
#include <qscatterdataitem.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qscatterdataproxy.sip"
#include <qscatterdataproxy.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qsurface3dseries.sip"
#include <qsurface3dseries.h>
#line 26 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qsurfacedataitem.sip"
#include <qsurfacedataitem.h>
#line 32 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/sip/QtDataVisualization/qsurfacedataitem.sip"
#include <qsurfacedataitem.h>
#line 95 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/build/QtDataVisualization/sipQtDataVisualizationQVector0100QtDataVisualizationQSurfaceDataItem.cpp"


extern "C" {static void assign_QVector_0100QtDataVisualization_QSurfaceDataItem(void *, Py_ssize_t, void *);}
static void assign_QVector_0100QtDataVisualization_QSurfaceDataItem(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast<QVector< ::QtDataVisualization::QSurfaceDataItem> *>(sipDst)[sipDstIdx] = *reinterpret_cast<QVector< ::QtDataVisualization::QSurfaceDataItem> *>(sipSrc);
}


extern "C" {static void *array_QVector_0100QtDataVisualization_QSurfaceDataItem(Py_ssize_t);}
static void *array_QVector_0100QtDataVisualization_QSurfaceDataItem(Py_ssize_t sipNrElem)
{
    return new QVector< ::QtDataVisualization::QSurfaceDataItem>[sipNrElem];
}


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


/* Call the mapped type's destructor. */
extern "C" {static void release_QVector_0100QtDataVisualization_QSurfaceDataItem(void *, int);}
static void release_QVector_0100QtDataVisualization_QSurfaceDataItem(void *sipCppV, int)
{
    QVector< ::QtDataVisualization::QSurfaceDataItem> *sipCpp = reinterpret_cast<QVector< ::QtDataVisualization::QSurfaceDataItem> *>(sipCppV);
    delete sipCpp;
}



extern "C" {static int convertTo_QVector_0100QtDataVisualization_QSurfaceDataItem(PyObject *, void **, int *, PyObject *);}
static int convertTo_QVector_0100QtDataVisualization_QSurfaceDataItem(PyObject *sipPy, void **sipCppPtrV, int *sipIsErr, PyObject *sipTransferObj)
{
    QVector< ::QtDataVisualization::QSurfaceDataItem> **sipCppPtr = reinterpret_cast<QVector< ::QtDataVisualization::QSurfaceDataItem> **>(sipCppPtrV);

#line 58 "/usr/lib/python3.10/site-packages/PyQt5/bindings/QtCore/qpycore_qvector.sip"
    PyObject *iter = PyObject_GetIter(sipPy);

    if (!sipIsErr)
    {
        PyErr_Clear();
        Py_XDECREF(iter);

        return (iter
#if PY_MAJOR_VERSION < 3
                && !PyString_Check(sipPy)
#endif
                && !PyUnicode_Check(sipPy));
    }

    if (!iter)
    {
        *sipIsErr = 1;

        return 0;
    }

    QVector<QtDataVisualization::QSurfaceDataItem> *qv = new QVector<QtDataVisualization::QSurfaceDataItem>;
 
    for (Py_ssize_t i = 0; ; ++i)
    {
        PyErr_Clear();
        PyObject *itm = PyIter_Next(iter);

        if (!itm)
        {
            if (PyErr_Occurred())
            {
                delete qv;
                Py_DECREF(iter);
                *sipIsErr = 1;

                return 0;
            }

            break;
        }

        int state;
        QtDataVisualization::QSurfaceDataItem *t = reinterpret_cast<QtDataVisualization::QSurfaceDataItem *>(
                sipForceConvertToType(itm, sipType_QtDataVisualization_QSurfaceDataItem, sipTransferObj,
                        SIP_NOT_NONE, &state, sipIsErr));

        if (*sipIsErr)
        {
            PyErr_Format(PyExc_TypeError,
                    "index %zd has type '%s' but 'QtDataVisualization::QSurfaceDataItem' is expected", i,
                    sipPyTypeName(Py_TYPE(itm)));

            Py_DECREF(itm);
            delete qv;
            Py_DECREF(iter);

            return 0;
        }

        qv->append(*t);

        sipReleaseType(t, sipType_QtDataVisualization_QSurfaceDataItem, state);
        Py_DECREF(itm);
    }

    Py_DECREF(iter);
 
    *sipCppPtr = qv;
 
    return sipGetState(sipTransferObj);
#line 206 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/build/QtDataVisualization/sipQtDataVisualizationQVector0100QtDataVisualizationQSurfaceDataItem.cpp"
}


extern "C" {static PyObject *convertFrom_QVector_0100QtDataVisualization_QSurfaceDataItem(void *, PyObject *);}
static PyObject *convertFrom_QVector_0100QtDataVisualization_QSurfaceDataItem(void *sipCppV, PyObject *sipTransferObj)
{
   QVector< ::QtDataVisualization::QSurfaceDataItem> *sipCpp = reinterpret_cast<QVector< ::QtDataVisualization::QSurfaceDataItem> *>(sipCppV);

#line 32 "/usr/lib/python3.10/site-packages/PyQt5/bindings/QtCore/qpycore_qvector.sip"
    PyObject *l = PyList_New(sipCpp->size());

    if (!l)
        return 0;

    for (int i = 0; i < sipCpp->size(); ++i)
    {
        QtDataVisualization::QSurfaceDataItem *t = new QtDataVisualization::QSurfaceDataItem(sipCpp->at(i));
        PyObject *tobj = sipConvertFromNewType(t, sipType_QtDataVisualization_QSurfaceDataItem,
                sipTransferObj);

        if (!tobj)
        {
            delete t;
            Py_DECREF(l);

            return 0;
        }

        PyList_SetItem(l, i, tobj);
    }

    return l;
#line 239 "/build/pyqt5-datavisualization/src/PyQtDataVisualization-5.15.5/build/QtDataVisualization/sipQtDataVisualizationQVector0100QtDataVisualizationQSurfaceDataItem.cpp"
}


sipMappedTypeDef sipTypeDef_QtDataVisualization_QVector_0100QtDataVisualization_QSurfaceDataItem = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_MAPPED,
        sipNameNr_1067,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QVector_0100QtDataVisualization_QSurfaceDataItem,
    array_QVector_0100QtDataVisualization_QSurfaceDataItem,
    copy_QVector_0100QtDataVisualization_QSurfaceDataItem,
    release_QVector_0100QtDataVisualization_QSurfaceDataItem,
    convertTo_QVector_0100QtDataVisualization_QSurfaceDataItem,
    convertFrom_QVector_0100QtDataVisualization_QSurfaceDataItem
};
