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

#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DCore/qsharedpointer.sip"
#include <qsharedpointer.h>
#line 29 "/build/pyqt5-3d/src/PyQt3D-5.15.5/build/Qt3DRender/sipQt3DRenderQSharedPointer0100Qt3DRenderQGeometryFactory.cpp"

#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qabstractfunctor.sip"
#include <qabstractfunctor.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qabstractlight.sip"
#include <qabstractlight.h>
#line 28 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qabstractraycaster.sip"
#include <qabstractraycaster.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qabstracttexture.sip"
#include <qabstracttexture.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qabstracttextureimage.sip"
#include <qabstracttextureimage.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qalphacoverage.sip"
#include <qalphacoverage.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qalphatest.sip"
#include <qalphatest.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qattribute.sip"
#include <qattribute.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qblendequation.sip"
#include <qblendequation.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qblendequationarguments.sip"
#include <qblendequationarguments.h>
#line 28 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qblitframebuffer.sip"
#include <qblitframebuffer.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qbuffer.sip"
#include <qbuffer.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qbufferdatagenerator.sip"
#include <qbufferdatagenerator.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qcamera.sip"
#include <qcamera.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qcameralens.sip"
#include <qcameralens.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qcameraselector.sip"
#include <qcameraselector.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qclearbuffers.sip"
#include <qclearbuffers.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qclipplane.sip"
#include <qclipplane.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qcomputecommand.sip"
#include <qcomputecommand.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qcolormask.sip"
#include <qcolormask.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qcullface.sip"
#include <qcullface.h>
#line 28 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qdepthrange.sip"
#include <qdepthrange.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qdepthtest.sip"
#include <qdepthtest.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qdirectionallight.sip"
#include <qdirectionallight.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qdispatchcompute.sip"
#include <qdispatchcompute.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qdithering.sip"
#include <qdithering.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qeffect.sip"
#include <qeffect.h>
#line 28 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qenvironmentlight.sip"
#include <qenvironmentlight.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qfilterkey.sip"
#include <qfilterkey.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qframegraphnode.sip"
#include <qframegraphnode.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qfrontface.sip"
#include <qfrontface.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qfrustumculling.sip"
#include <qfrustumculling.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qgeometry.sip"
#include <qgeometry.h>
#line 26 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qgeometryfactory.sip"
#include <qgeometryfactory.h>
#line 32 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DRender/qgeometryfactory.sip"
#include <qgeometryfactory.h>
#line 101 "/build/pyqt5-3d/src/PyQt3D-5.15.5/build/Qt3DRender/sipQt3DRenderQSharedPointer0100Qt3DRenderQGeometryFactory.cpp"


extern "C" {static void assign_QSharedPointer_0100Qt3DRender_QGeometryFactory(void *, Py_ssize_t, void *);}
static void assign_QSharedPointer_0100Qt3DRender_QGeometryFactory(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast<QSharedPointer< ::Qt3DRender::QGeometryFactory> *>(sipDst)[sipDstIdx] = *reinterpret_cast<QSharedPointer< ::Qt3DRender::QGeometryFactory> *>(sipSrc);
}


extern "C" {static void *array_QSharedPointer_0100Qt3DRender_QGeometryFactory(Py_ssize_t);}
static void *array_QSharedPointer_0100Qt3DRender_QGeometryFactory(Py_ssize_t sipNrElem)
{
    return new QSharedPointer< ::Qt3DRender::QGeometryFactory>[sipNrElem];
}


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


/* Call the mapped type's destructor. */
extern "C" {static void release_QSharedPointer_0100Qt3DRender_QGeometryFactory(void *, int);}
static void release_QSharedPointer_0100Qt3DRender_QGeometryFactory(void *sipCppV, int)
{
    QSharedPointer< ::Qt3DRender::QGeometryFactory> *sipCpp = reinterpret_cast<QSharedPointer< ::Qt3DRender::QGeometryFactory> *>(sipCppV);
    delete sipCpp;
}



extern "C" {static int convertTo_QSharedPointer_0100Qt3DRender_QGeometryFactory(PyObject *, void **, int *, PyObject *);}
static int convertTo_QSharedPointer_0100Qt3DRender_QGeometryFactory(PyObject *sipPy, void **sipCppPtrV, int *sipIsErr, PyObject *sipTransferObj)
{
    QSharedPointer< ::Qt3DRender::QGeometryFactory> **sipCppPtr = reinterpret_cast<QSharedPointer< ::Qt3DRender::QGeometryFactory> **>(sipCppPtrV);

#line 51 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DCore/qsharedpointer.sip"
    if (!sipIsErr)
        return sipCanConvertToType(sipPy, sipType_Qt3DRender_QGeometryFactory,
                SIP_NOT_NONE | SIP_NO_CONVERTORS);

    // If there is a user object then just copy the shared pointer it wraps.
    PyObject *user = sipGetUserObject((sipSimpleWrapper *)sipPy);

    QSharedPointer<Qt3DRender::QGeometryFactory> *qsp;

    if (user)
    {
#if defined(SIP_USE_PYCAPSULE)
        qsp = reinterpret_cast<QSharedPointer<Qt3DRender::QGeometryFactory> *>(
                PyCapsule_GetPointer(user, 0));
#else
        qsp = reinterpret_cast<QSharedPointer<Qt3DRender::QGeometryFactory> *>(
                PyCObject_AsVoidPtr(user));
#endif

        qsp = new QSharedPointer<Qt3DRender::QGeometryFactory>(*qsp);
    }
    else
    {
        // Create a new shared pointer and save it in the user object.
        Qt3DRender::QGeometryFactory *cpp = reinterpret_cast<Qt3DRender::QGeometryFactory *>(
                sipConvertToType(sipPy, sipType_Qt3DRender_QGeometryFactory, sipTransferObj,
                        SIP_NOT_NONE | SIP_NO_CONVERTORS, 0, sipIsErr));

        if (*sipIsErr)
            return 0;

        qsp = new QSharedPointer<Qt3DRender::QGeometryFactory>(cpp);

        if (!qt3d_SaveQsp<Qt3DRender::QGeometryFactory>(sipPy, qsp))
        {
            delete qsp;
            *sipIsErr = 1;
            return 0;
        }
    }

    *sipCppPtr = qsp;

    return sipGetState(sipTransferObj);
#line 185 "/build/pyqt5-3d/src/PyQt3D-5.15.5/build/Qt3DRender/sipQt3DRenderQSharedPointer0100Qt3DRenderQGeometryFactory.cpp"
}


extern "C" {static PyObject *convertFrom_QSharedPointer_0100Qt3DRender_QGeometryFactory(void *, PyObject *);}
static PyObject *convertFrom_QSharedPointer_0100Qt3DRender_QGeometryFactory(void *sipCppV, PyObject *sipTransferObj)
{
   QSharedPointer< ::Qt3DRender::QGeometryFactory> *sipCpp = reinterpret_cast<QSharedPointer< ::Qt3DRender::QGeometryFactory> *>(sipCppV);

#line 30 "/build/pyqt5-3d/src/PyQt3D-5.15.5/sip/Qt3DCore/qsharedpointer.sip"
    PyObject *py = sipConvertFromType(sipCpp->data(), sipType_Qt3DRender_QGeometryFactory,
            sipTransferObj);

    if (!py)
        return 0;

    // We need our own copy of the shared pointer so we can copy it when asked
    // to convert the Python object back to C++.
    QSharedPointer<Qt3DRender::QGeometryFactory> *qsp = new QSharedPointer<Qt3DRender::QGeometryFactory>(*sipCpp);

    if (!qt3d_SaveQsp<Qt3DRender::QGeometryFactory>(py, qsp))
    {
        Py_DECREF(py);
        delete qsp;
        return 0;
    }

    return py;
#line 213 "/build/pyqt5-3d/src/PyQt3D-5.15.5/build/Qt3DRender/sipQt3DRenderQSharedPointer0100Qt3DRenderQGeometryFactory.cpp"
}


sipMappedTypeDef sipTypeDef_Qt3DRender_QSharedPointer_0100Qt3DRender_QGeometryFactory = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_MAPPED,
        sipNameNr_804,
        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_QSharedPointer_0100Qt3DRender_QGeometryFactory,
    array_QSharedPointer_0100Qt3DRender_QGeometryFactory,
    copy_QSharedPointer_0100Qt3DRender_QGeometryFactory,
    release_QSharedPointer_0100Qt3DRender_QGeometryFactory,
    convertTo_QSharedPointer_0100Qt3DRender_QGeometryFactory,
    convertFrom_QSharedPointer_0100Qt3DRender_QGeometryFactory
};
