/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2024 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 "sipAPIQt3DCore.h"

#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qsharedpointer.sip"
#include <qsharedpointer.h>
#line 29 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/build/Qt3DCore/sipQt3DCoreQSharedPointer0100Qt3DCoreQNodeCreatedChangeBase.cpp"

#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qabstractaspect.sip"
#include <qabstractaspect.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qaspectengine.sip"
#include <qaspectengine.h>
#line 28 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qabstractskeleton.sip"
#include <qabstractskeleton.h>
#line 28 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qarmature.sip"
#include <qarmature.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qbackendnode.sip"
#include <qbackendnode.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qcomponent.sip"
#include <qcomponent.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qcomponentaddedchange.sip"
#include <qcomponentaddedchange.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qcomponentremovedchange.sip"
#include <qcomponentremovedchange.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qdynamicpropertyupdatedchange.sip"
#include <qdynamicpropertyupdatedchange.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qentity.sip"
#include <qentity.h>
#line 28 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qjoint.sip"
#include <qjoint.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qnode.sip"
#include <qnode.h>
#line 28 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qnodecommand.sip"
#include <qnodecommand.h>
#line 26 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qnodecreatedchange.sip"
#include <qnodecreatedchange.h>
#line 32 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qnodecreatedchange.sip"
#include <qnodecreatedchange.h>
#line 61 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/build/Qt3DCore/sipQt3DCoreQSharedPointer0100Qt3DCoreQNodeCreatedChangeBase.cpp"


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


extern "C" {static void *array_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase(Py_ssize_t);}
static void *array_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase(Py_ssize_t sipNrElem)
{
    return new QSharedPointer< ::Qt3DCore::QNodeCreatedChangeBase>[sipNrElem];
}


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


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



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

#line 51 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qsharedpointer.sip"
    if (!sipIsErr)
        return sipCanConvertToType(sipPy, sipType_Qt3DCore_QNodeCreatedChangeBase,
                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<Qt3DCore::QNodeCreatedChangeBase> *qsp;

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

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

        if (*sipIsErr)
            return 0;

        qsp = new QSharedPointer<Qt3DCore::QNodeCreatedChangeBase>(cpp);

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

    *sipCppPtr = qsp;

    return sipGetState(sipTransferObj);
#line 145 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/build/Qt3DCore/sipQt3DCoreQSharedPointer0100Qt3DCoreQNodeCreatedChangeBase.cpp"
}


extern "C" {static PyObject *convertFrom_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase(void *, PyObject *);}
static PyObject *convertFrom_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase(void *sipCppV, PyObject *sipTransferObj)
{
    QSharedPointer< ::Qt3DCore::QNodeCreatedChangeBase> *sipCpp = reinterpret_cast<QSharedPointer< ::Qt3DCore::QNodeCreatedChangeBase> *>(sipCppV);

#line 30 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/sip/Qt3DCore/qsharedpointer.sip"
    PyObject *py = sipConvertFromType(sipCpp->data(), sipType_Qt3DCore_QNodeCreatedChangeBase,
            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<Qt3DCore::QNodeCreatedChangeBase> *qsp = new QSharedPointer<Qt3DCore::QNodeCreatedChangeBase>(*sipCpp);

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

    return py;
#line 173 "/build/python-pyqt5-3d/src/PyQt3D-5.15.7/build/Qt3DCore/sipQt3DCoreQSharedPointer0100Qt3DCoreQNodeCreatedChangeBase.cpp"
}


sipMappedTypeDef sipTypeDef_Qt3DCore_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_MAPPED,
        sipNameNr_0,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        -1,
        {0, 0, 1},
        0, SIP_NULLPTR,
        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}
    },
    assign_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase,
    array_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase,
    copy_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase,
    release_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase,
    convertTo_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase,
    convertFrom_QSharedPointer_0100Qt3DCore_QNodeCreatedChangeBase
};
