/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <sbkpython.h>
#include <shiboken.h>
#include <algorithm>
#include <signature.h>
#include <sbkcontainer.h>
#include <sbkstaticstrings.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
#include "pyside6_qtscxml_python.h"



// Current module's type array.
PyTypeObject **SbkPySide6_QtScxmlTypes = nullptr;
// Current module's PyObject pointer.
PyObject *SbkPySide6_QtScxmlModuleObject = nullptr;
// Current module's converter array.
SbkConverter **SbkPySide6_QtScxmlTypeConverters = nullptr;
void cleanTypesAttributes() {
    for (int i = 0, imax = SBK_QtScxml_IDX_COUNT; i < imax; i++) {
        PyObject *pyType = reinterpret_cast<PyObject *>(SbkPySide6_QtScxmlTypes[i]);
        Shiboken::AutoDecRef attrName(Py_BuildValue("s", "staticMetaObject"));
        if (pyType && PyObject_HasAttr(pyType, attrName))
            PyObject_SetAttr(pyType, attrName, Py_None);
    }
}
// Global functions ------------------------------------------------------------

static PyMethodDef QtScxml_methods[] = {
    {0} // Sentinel
};

// Classes initialization functions ------------------------------------------------------------
void init_QScxmlTableData(PyObject *module);
void init_QtScxmlQScxmlExecutableContent(PyObject *module);
void init_QScxmlExecutableContent_ParameterInfo(PyObject *enclosingClass);
void init_QScxmlExecutableContent_InvokeInfo(PyObject *enclosingClass);
void init_QScxmlExecutableContent_ForeachInfo(PyObject *enclosingClass);
void init_QScxmlExecutableContent_EvaluatorInfo(PyObject *enclosingClass);
void init_QScxmlExecutableContent_AssignmentInfo(PyObject *enclosingClass);
void init_QScxmlEvent(PyObject *module);
void init_QScxmlError(PyObject *module);
void init_QScxmlCompiler(PyObject *module);
void init_QScxmlCompiler_Loader(PyObject *enclosingClass);
void init_QScxmlStateMachine(PyObject *module);
void init_QScxmlInvokableServiceFactory(PyObject *module);
void init_QScxmlStaticScxmlServiceFactory(PyObject *module);
void init_QScxmlDynamicScxmlServiceFactory(PyObject *module);
void init_QScxmlInvokableService(PyObject *module);
void init_QScxmlDataModel(PyObject *module);
void init_QScxmlNullDataModel(PyObject *module);
void init_QScxmlDataModel_ForeachLoopBody(PyObject *enclosingClass);
void init_QScxmlCppDataModel(PyObject *module);

// Required modules' type and converter arrays.
PyTypeObject **SbkPySide6_QtCoreTypes;
SbkConverter **SbkPySide6_QtCoreTypeConverters;

// Module initialization ------------------------------------------------------------
// Container Type converters.

// C++ to Python conversion for container type 'QList<QScxmlError >'.
static PyObject *_QList_QScxmlError__CppToPython__QList_QScxmlError_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QScxmlError > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLERROR_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QScxmlError__PythonToCpp__QList_QScxmlError_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QScxmlError > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QScxmlError cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtScxmlTypes[SBK_QSCXMLERROR_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QScxmlError__PythonToCpp__QList_QScxmlError__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtScxmlTypes[SBK_QSCXMLERROR_IDX], pyIn))
        return _QList_QScxmlError__PythonToCpp__QList_QScxmlError_;
    return {};
}

// C++ to Python conversion for container type 'QList<QObject* >'.
static PyObject *_QList_QObjectPTR__CppToPython__QList_QObjectPTR_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QObject* > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QObjectPTR__PythonToCpp__QList_QObjectPTR_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QObject* > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QObject* cppItem{nullptr};
    Shiboken::Conversions::pythonToCppPointer(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QObjectPTR__PythonToCpp__QList_QObjectPTR__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::checkSequenceTypes(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], pyIn))
        return _QList_QObjectPTR__PythonToCpp__QList_QObjectPTR_;
    return {};
}

// C++ to Python conversion for container type 'QList<QByteArray >'.
static PyObject *_QList_QByteArray__CppToPython__QList_QByteArray_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QByteArray > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QByteArray__PythonToCpp__QList_QByteArray_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QByteArray > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QByteArray cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QByteArray__PythonToCpp__QList_QByteArray__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], pyIn))
        return _QList_QByteArray__PythonToCpp__QList_QByteArray_;
    return {};
}

// C++ to Python conversion for container type 'QMap<QString,QVariant >'.
static PyObject *_QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QMap<QString,QVariant > *>(cppIn);
    // TEMPLATE - cppmap_to_pymap_conversion - START
    PyObject *pyOut = PyDict_New();
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it) {
        const auto &key = it.key();
        const auto &value = it.value();
        PyObject *pyKey = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &key);
        PyObject *pyValue = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], &value);
        PyDict_SetItem(pyOut, pyKey, pyValue);
        Py_DECREF(pyKey);
        Py_DECREF(pyValue);
    }
    return pyOut;
    // TEMPLATE - cppmap_to_pymap_conversion - END

}
static void _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QMap<QString,QVariant > *>(cppOut);
    // TEMPLATE - pydict_to_cppmap_conversion - START
    PyObject *key;
    PyObject *value;
    Py_ssize_t pos = 0;
    while (PyDict_Next(pyIn, &pos, &key, &value)) {
        ::QString cppKey;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], key, &(cppKey));
        ::QVariant cppValue;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], value, &(cppValue));
        cppOutRef.insert(cppKey, cppValue);
    }
    // TEMPLATE - pydict_to_cppmap_conversion - END

}
static PythonToCppFunc is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleDictTypes(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], false, pyIn))
        return _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_;
    return {};
}

// C++ to Python conversion for container type 'QList<QScxmlInvokableService* >'.
static PyObject *_QList_QScxmlInvokableServicePTR__CppToPython__QList_QScxmlInvokableServicePTR_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QScxmlInvokableService* > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLINVOKABLESERVICE_IDX], cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QScxmlInvokableServicePTR__PythonToCpp__QList_QScxmlInvokableServicePTR_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QScxmlInvokableService* > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QScxmlInvokableService* cppItem{nullptr};
    Shiboken::Conversions::pythonToCppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLINVOKABLESERVICE_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QScxmlInvokableServicePTR__PythonToCpp__QList_QScxmlInvokableServicePTR__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::checkSequenceTypes(SbkPySide6_QtScxmlTypes[SBK_QSCXMLINVOKABLESERVICE_IDX], pyIn))
        return _QList_QScxmlInvokableServicePTR__PythonToCpp__QList_QScxmlInvokableServicePTR_;
    return {};
}

// C++ to Python conversion for container type 'QList<int >'.
static PyObject *_QList_int__CppToPython__QList_int_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<int > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_int__PythonToCpp__QList_int_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<int > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        int cppItem;
    Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter<int>(), pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_int__PythonToCpp__QList_int__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter<int>(), pyIn))
        return _QList_int__PythonToCpp__QList_int_;
    return {};
}


// Binding for QList<int >

template <>
struct ShibokenContainerValueConverter<int>
{
    static bool checkValue(PyObject *pyArg)
    {
        return PyLong_Check(pyArg);
    }

    static PyObject *convertValueToPython(int cppArg)
    {
        return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppArg);
    }

    static std::optional<int> convertValueToCpp(PyObject *pyArg)
    {
        Shiboken::Conversions::PythonToCppConversion pythonToCpp;
        if (!(PyLong_Check(pyArg) && (pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg))))) {
            PyErr_SetString(PyExc_TypeError, "Wrong type passed to container conversion.");
            return {};
        }
        int cppArg;
        pythonToCpp(pyArg, &cppArg);
        return cppArg;
    }
};

static PyMethodDef QIntList_methods[] = {
    {"push_back", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::push_back), METH_O, "push_back"},
    {"append", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::push_back), METH_O, "append"},
    {"clear", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::clear), METH_NOARGS, "clear"},
    {"pop_back", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::pop_back), METH_NOARGS, "pop_back"},
    {"removeLast", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::pop_back), METH_NOARGS, "removeLast"},
    {"push_front", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::push_front), METH_O, "push_front"},
    {"prepend", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::push_front), METH_O, "prepend"},
    {"pop_front", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::pop_front), METH_NOARGS, "pop_front"},
    {"removeFirst", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::pop_front), METH_O, "removeFirst"},
    {"reserve", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::reserve), METH_O, "reserve"},
    {"capacity", reinterpret_cast<PyCFunction>(ShibokenSequenceContainerPrivate<QList<int >>::capacity), METH_NOARGS, "capacity"},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static PyType_Slot QIntList_slots[] = {
    {Py_tp_init, reinterpret_cast<void *>(ShibokenSequenceContainerPrivate<QList<int >>::tpInit)},
    {Py_tp_new, reinterpret_cast<void *>(ShibokenSequenceContainerPrivate<QList<int >>::tpNew)},
    {Py_tp_free, reinterpret_cast<void *>(ShibokenSequenceContainerPrivate<QList<int >>::tpFree)},
    {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
    {Py_tp_methods, reinterpret_cast<void *>(QIntList_methods)},
    {Py_sq_ass_item, reinterpret_cast<void *>(ShibokenSequenceContainerPrivate<QList<int >>::sqSetItem)},
    {Py_sq_length, reinterpret_cast<void *>(ShibokenSequenceContainerPrivate<QList<int >>::sqLen)},
    {Py_sq_item, reinterpret_cast<void *>(ShibokenSequenceContainerPrivate<QList<int >>::sqGetItem)},
    {0, nullptr}
};

static PyType_Spec QIntList_spec = {
    "1:QtScxml.QIntList",
    sizeof(ShibokenContainer),
    0,
    Py_TPFLAGS_DEFAULT,
    QIntList_slots
};

static inline PyTypeObject *createQIntListType()
{
    auto *result = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&QIntList_spec));
    Py_INCREF(Py_True);
    PyDict_SetItem(result->tp_dict, Shiboken::PyMagicName::opaque_container(), Py_True);
    return result;
}

static PyTypeObject *QIntList_TypeF()
{
    static PyTypeObject *type = createQIntListType();
    return type;
}

extern "C" PyObject *createQIntList(QList<int >* ct)
{
    auto *container = PyObject_New(ShibokenContainer, QIntList_TypeF());
    auto *d = new ShibokenSequenceContainerPrivate<QList<int >>();
    d->m_list = ct;
    container->d = d;
    return reinterpret_cast<PyObject *>(container);
}

extern "C" PyObject *createConstQIntList(const QList<int >* ct)
{
    auto *container = PyObject_New(ShibokenContainer, QIntList_TypeF());
    auto *d = new ShibokenSequenceContainerPrivate<QList<int >>();
    d->m_list = const_cast<QList<int > *>(ct);
    d->m_const = true;
    container->d = d;
    return reinterpret_cast<PyObject *>(container);
}

extern "C" int QIntList_Check(PyObject *pyArg)
{
    return pyArg != nullptr && pyArg != Py_None && pyArg->ob_type == QIntList_TypeF();
}

extern "C" void PythonToCppQIntList(PyObject *pyArg, void *cppOut)
{
    auto *d = ShibokenSequenceContainerPrivate<QList<int >>::get(pyArg);
    *reinterpret_cast<QList<int >**>(cppOut) = d->m_list;
}

extern "C" PythonToCppFunc isQIntListPythonToCppConvertible(PyObject *pyArg)
{
    if (QIntList_Check(pyArg))
        return PythonToCppQIntList;
    return {};
}

// C++ to Python conversion for container type 'QList<QScxmlExecutableContent::ParameterInfo >'.
static PyObject *_QList_QScxmlExecutableContent_ParameterInfo__CppToPython__QList_QScxmlExecutableContent_ParameterInfo_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QScxmlExecutableContent::ParameterInfo > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLEXECUTABLECONTENT_PARAMETERINFO_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QScxmlExecutableContent_ParameterInfo__PythonToCpp__QList_QScxmlExecutableContent_ParameterInfo_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QScxmlExecutableContent::ParameterInfo > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QScxmlExecutableContent::ParameterInfo cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtScxmlTypes[SBK_QSCXMLEXECUTABLECONTENT_PARAMETERINFO_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QScxmlExecutableContent_ParameterInfo__PythonToCpp__QList_QScxmlExecutableContent_ParameterInfo__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtScxmlTypes[SBK_QSCXMLEXECUTABLECONTENT_PARAMETERINFO_IDX], pyIn))
        return _QList_QScxmlExecutableContent_ParameterInfo__PythonToCpp__QList_QScxmlExecutableContent_ParameterInfo_;
    return {};
}

// C++ to Python conversion for container type 'QList<QVariant >'.
static PyObject *_QList_QVariant__CppToPython__QList_QVariant_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QVariant > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QVariant__PythonToCpp__QList_QVariant_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QVariant > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QVariant cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyIn))
        return _QList_QVariant__PythonToCpp__QList_QVariant_;
    return {};
}

// C++ to Python conversion for container type 'QList<QString >'.
static PyObject *_QList_QString__CppToPython__QList_QString_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QString > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QString__PythonToCpp__QList_QString_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QString > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QString cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QString__PythonToCpp__QList_QString__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], pyIn))
        return _QList_QString__PythonToCpp__QList_QString_;
    return {};
}


static struct PyModuleDef moduledef = {
    /* m_base     */ PyModuleDef_HEAD_INIT,
    /* m_name     */ "QtScxml",
    /* m_doc      */ nullptr,
    /* m_size     */ -1,
    /* m_methods  */ QtScxml_methods,
    /* m_reload   */ nullptr,
    /* m_traverse */ nullptr,
    /* m_clear    */ nullptr,
    /* m_free     */ nullptr
};

// The signatures string for the global functions.
// Multiple signatures have their index "n:" in front.
static const char *QtScxml_SignatureStrings[] = {
    nullptr}; // Sentinel

extern "C" LIBSHIBOKEN_EXPORT PyObject *PyInit_QtScxml()
{
    if (SbkPySide6_QtScxmlModuleObject != nullptr)
        return SbkPySide6_QtScxmlModuleObject;
    {
        Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("PySide6.QtCore"));
        if (requiredModule.isNull())
            return nullptr;
        SbkPySide6_QtCoreTypes = Shiboken::Module::getTypes(requiredModule);
        SbkPySide6_QtCoreTypeConverters = Shiboken::Module::getTypeConverters(requiredModule);
    }

    // Create an array of wrapper types for the current module.
    static PyTypeObject *cppApi[SBK_QtScxml_IDX_COUNT];
    SbkPySide6_QtScxmlTypes = cppApi;

    // Create an array of primitive type converters for the current module.
    static SbkConverter *sbkConverters[SBK_QtScxml_CONVERTERS_IDX_COUNT];
    SbkPySide6_QtScxmlTypeConverters = sbkConverters;

    PyObject *module = Shiboken::Module::create("QtScxml", &moduledef);

    // Make module available from global scope
    SbkPySide6_QtScxmlModuleObject = module;

    // Initialize classes in the type system
    init_QScxmlTableData(module);
    init_QtScxmlQScxmlExecutableContent(module);
    init_QScxmlExecutableContent_ParameterInfo(reinterpret_cast<PyTypeObject *>(SbkPySide6_QtScxmlTypes[SBK_QtScxmlQSCXMLEXECUTABLECONTENT_IDX])->tp_dict);
    init_QScxmlExecutableContent_InvokeInfo(reinterpret_cast<PyTypeObject *>(SbkPySide6_QtScxmlTypes[SBK_QtScxmlQSCXMLEXECUTABLECONTENT_IDX])->tp_dict);
    init_QScxmlExecutableContent_ForeachInfo(reinterpret_cast<PyTypeObject *>(SbkPySide6_QtScxmlTypes[SBK_QtScxmlQSCXMLEXECUTABLECONTENT_IDX])->tp_dict);
    init_QScxmlExecutableContent_EvaluatorInfo(reinterpret_cast<PyTypeObject *>(SbkPySide6_QtScxmlTypes[SBK_QtScxmlQSCXMLEXECUTABLECONTENT_IDX])->tp_dict);
    init_QScxmlExecutableContent_AssignmentInfo(reinterpret_cast<PyTypeObject *>(SbkPySide6_QtScxmlTypes[SBK_QtScxmlQSCXMLEXECUTABLECONTENT_IDX])->tp_dict);
    init_QScxmlEvent(module);
    init_QScxmlError(module);
    init_QScxmlCompiler(module);
    init_QScxmlCompiler_Loader(reinterpret_cast<PyTypeObject *>(SbkPySide6_QtScxmlTypes[SBK_QSCXMLCOMPILER_IDX])->tp_dict);
    init_QScxmlStateMachine(module);
    init_QScxmlInvokableServiceFactory(module);
    init_QScxmlStaticScxmlServiceFactory(module);
    init_QScxmlDynamicScxmlServiceFactory(module);
    init_QScxmlInvokableService(module);
    init_QScxmlDataModel(module);
    init_QScxmlNullDataModel(module);
    init_QScxmlDataModel_ForeachLoopBody(reinterpret_cast<PyTypeObject *>(SbkPySide6_QtScxmlTypes[SBK_QSCXMLDATAMODEL_IDX])->tp_dict);
    init_QScxmlCppDataModel(module);

    // Register converter for type 'QList<QScxmlError>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLERROR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QScxmlError__CppToPython__QList_QScxmlError_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLERROR_IDX], "QList<QScxmlError>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLERROR_IDX],
        _QList_QScxmlError__PythonToCpp__QList_QScxmlError_,
        is__QList_QScxmlError__PythonToCpp__QList_QScxmlError__Convertible);

    // Register converter for type 'QList<QObject*>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QOBJECTPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QObjectPTR__CppToPython__QList_QObjectPTR_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QOBJECTPTR_IDX], "QList<QObject*>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QOBJECTPTR_IDX],
        _QList_QObjectPTR__PythonToCpp__QList_QObjectPTR_,
        is__QList_QObjectPTR__PythonToCpp__QList_QObjectPTR__Convertible);

    // Register converter for type 'QList<QByteArray>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QBYTEARRAY_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QByteArray__CppToPython__QList_QByteArray_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QBYTEARRAY_IDX], "QList<QByteArray>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QBYTEARRAY_IDX],
        _QList_QByteArray__PythonToCpp__QList_QByteArray_,
        is__QList_QByteArray__PythonToCpp__QList_QByteArray__Convertible);

    // Register converter for type 'QMap<QString,QVariant>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QMAP_QSTRING_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyDict_Type, _QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QMAP_QSTRING_QVARIANT_IDX], "QMap<QString,QVariant>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QMAP_QSTRING_QVARIANT_IDX],
        _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_,
        is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible);

    // Register converter for type 'QList<QScxmlInvokableService*>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLINVOKABLESERVICEPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QScxmlInvokableServicePTR__CppToPython__QList_QScxmlInvokableServicePTR_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLINVOKABLESERVICEPTR_IDX], "QList<QScxmlInvokableService*>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLINVOKABLESERVICEPTR_IDX],
        _QList_QScxmlInvokableServicePTR__PythonToCpp__QList_QScxmlInvokableServicePTR_,
        is__QList_QScxmlInvokableServicePTR__PythonToCpp__QList_QScxmlInvokableServicePTR__Convertible);

    // Register converter for type 'QList<int>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_INT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_int__CppToPython__QList_int_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_INT_IDX], "QList<int>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_INT_IDX],
        _QList_int__PythonToCpp__QList_int_,
        is__QList_int__PythonToCpp__QList_int__Convertible);
    Shiboken::Conversions::setPythonToCppPointerFunctions(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_INT_IDX],
        PythonToCppQIntList,
        isQIntListPythonToCppConvertible);

    // Register converter for type 'QList<QScxmlExecutableContent::ParameterInfo>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLEXECUTABLECONTENT_PARAMETERINFO_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QScxmlExecutableContent_ParameterInfo__CppToPython__QList_QScxmlExecutableContent_ParameterInfo_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLEXECUTABLECONTENT_PARAMETERINFO_IDX], "QList<QScxmlExecutableContent::ParameterInfo>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLEXECUTABLECONTENT_PARAMETERINFO_IDX],
        _QList_QScxmlExecutableContent_ParameterInfo__PythonToCpp__QList_QScxmlExecutableContent_ParameterInfo_,
        is__QList_QScxmlExecutableContent_ParameterInfo__PythonToCpp__QList_QScxmlExecutableContent_ParameterInfo__Convertible);

    // Register converter for type 'QList<QVariant>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QVariant__CppToPython__QList_QVariant_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QVARIANT_IDX], "QList<QVariant>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QVARIANT_IDX],
        _QList_QVariant__PythonToCpp__QList_QVariant_,
        is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible);

    // Register converter for type 'QList<QString>'.
    SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QString__CppToPython__QList_QString_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSTRING_IDX], "QList<QString>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSTRING_IDX],
        _QList_QString__PythonToCpp__QList_QString_,
        is__QList_QString__PythonToCpp__QList_QString__Convertible);


    // Opaque container type registration
    PyObject *ob_type{};
    ob_type = reinterpret_cast<PyObject *>(QIntList_TypeF());
    Py_XINCREF(ob_type);
    PyModule_AddObject(module, "QIntList", ob_type);

    // Register primitive types converters.

    Shiboken::Module::registerTypes(module, SbkPySide6_QtScxmlTypes);
    Shiboken::Module::registerTypeConverters(module, SbkPySide6_QtScxmlTypeConverters);

    if (PyErr_Occurred()) {
        PyErr_Print();
        Py_FatalError("can't initialize module QtScxml");
    }
    PySide::registerCleanupFunction(cleanTypesAttributes);

    FinishSignatureInitialization(module, QtScxml_SignatureStrings);

    return module;
}
