/****************************************************************************
**
** 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$
**
****************************************************************************/

//workaround to access protected functions
#define protected public

// default includes
#include <shiboken.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED

#include <typeinfo>
#include <signalmanager.h>
#include <pysidemetafunction.h>
#include <iterator>

// module include
#include "pyside6_qtscxml_python.h"

// main header
#include "qscxmlstatemachine_wrapper.h"

// inner classes

#include <cctype>
#include <cstring>



template <class T>
static const char *typeNameOf(const T &t)
{
    const char *typeName =  typeid(t).name();
    auto size = std::strlen(typeName);
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
    if (auto lastStar = strchr(typeName, '*')) {
        // MSVC: "class QPaintDevice * __ptr64"
        while (*--lastStar == ' ') {
        }
        size = lastStar - typeName + 1;
    }
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
    if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
        ++typeName;
        --size;
    }
#endif
    char *result = new char[size + 1];
    result[size] = '\0';
    memcpy(result, typeName, size);
    return result;
}

// Native ---------------------------------------------------------

void QScxmlStateMachineWrapper::resetPyMethodCache()
{
    std::fill_n(m_PyMethodCache, sizeof(m_PyMethodCache) / sizeof(m_PyMethodCache[0]), false);
}

QScxmlStateMachineWrapper::QScxmlStateMachineWrapper(const QMetaObject * metaObject, QObject * parent) : QScxmlStateMachine(metaObject, parent)
{
    resetPyMethodCache();
    // ... middle
}

void QScxmlStateMachineWrapper::childEvent(QChildEvent * event)
{
    if (m_PyMethodCache[0]) {
        return this->::QObject::childEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "childEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[0] = true;
        return this->::QObject::childEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QCHILDEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QScxmlStateMachineWrapper::connectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[1]) {
        return this->::QObject::connectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "connectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[1] = true;
        return this->::QObject::connectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QScxmlStateMachineWrapper::customEvent(QEvent * event)
{
    if (m_PyMethodCache[2]) {
        return this->::QObject::customEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "customEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[2] = true;
        return this->::QObject::customEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QScxmlStateMachineWrapper::disconnectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[3]) {
        return this->::QObject::disconnectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "disconnectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[3] = true;
        return this->::QObject::disconnectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

bool QScxmlStateMachineWrapper::event(QEvent * event)
{
    if (m_PyMethodCache[4])
        return this->::QObject::event(event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "event";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[4] = true;
        return this->::QObject::event(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QScxmlStateMachine.event",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QScxmlStateMachineWrapper::eventFilter(QObject * watched, QEvent * event)
{
    if (m_PyMethodCache[5])
        return this->::QObject::eventFilter(watched, event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "eventFilter";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[5] = true;
        return this->::QObject::eventFilter(watched, event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NN)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], watched),
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg2 = PyTuple_GET_ITEM(pyArgs, 1)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg2)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 1));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QScxmlStateMachine.eventFilter",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

void QScxmlStateMachineWrapper::timerEvent(QTimerEvent * event)
{
    if (m_PyMethodCache[7]) {
        return this->::QObject::timerEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "timerEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[7] = true;
        return this->::QObject::timerEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QTIMEREVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

const QMetaObject *QScxmlStateMachineWrapper::metaObject() const
{
    if (QObject::d_ptr->metaObject)
        return QObject::d_ptr->dynamicMetaObject();
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf == nullptr)
        return QScxmlStateMachine::metaObject();
    return PySide::SignalManager::retrieveMetaObject(reinterpret_cast<PyObject *>(pySelf));
}

int QScxmlStateMachineWrapper::qt_metacall(QMetaObject::Call call, int id, void **args)
{
    int result = QScxmlStateMachine::qt_metacall(call, id, args);
    return result < 0 ? result : PySide::SignalManager::qt_metacall(this, call, id, args);
}

void *QScxmlStateMachineWrapper::qt_metacast(const char *_clname)
{
    if (!_clname)
        return {};
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf && PySide::inherits(Py_TYPE(pySelf), _clname))
        return static_cast<void *>(const_cast< QScxmlStateMachineWrapper *>(this));
    return QScxmlStateMachine::qt_metacast(_clname);
}

QScxmlStateMachineWrapper::~QScxmlStateMachineWrapper()
{
    SbkObject *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this);
    Shiboken::Object::destroy(wrapper, this);
}

// Target ---------------------------------------------------------

extern "C" {
static int
Sbk_QScxmlStateMachine_Init(PyObject *self, PyObject *args, PyObject *kwds)
{
    const QMetaObject *metaObject;
    SbkObject *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::QScxmlStateMachine >()))
        return -1;

    ::QScxmlStateMachineWrapper *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.__init__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths
    if (numArgs < 1) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachine_Init_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OO:QScxmlStateMachine", &(pyArgs[0]), &(pyArgs[1])))
        return -1;


    // Overloaded function decisor
    // 0: QScxmlStateMachine::QScxmlStateMachine(const QMetaObject*,QObject*)
    if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QMETAOBJECT_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 0; // QScxmlStateMachine(const QMetaObject*,QObject*)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[1])))) {
            overloadId = 0; // QScxmlStateMachine(const QMetaObject*,QObject*)
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachine_Init_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_parent = Shiboken::String::createStaticString("parent");
            if (PyDict_Contains(kwds, key_parent)) {
                value = PyDict_GetItem(kwds, key_parent);
                if (value && pyArgs[1]) {
                    errInfo.reset(key_parent);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QScxmlStateMachine_Init_TypeError;
                }
                if (value) {
                    pyArgs[1] = value;
                    if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[1]))))
                        goto Sbk_QScxmlStateMachine_Init_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_parent);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                // fall through to handle extra keyword signals and properties
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return -1;
        ::QMetaObject *cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return -1;
        ::QObject *cppArg1 = nullptr;
        if (pythonToCpp[1])
            pythonToCpp[1](pyArgs[1], &cppArg1);

        if (!PyErr_Occurred()) {
            // QScxmlStateMachine(const QMetaObject*,QObject*)
            void *addr = PySide::nextQObjectMemoryAddr();
            if (addr) {
                cptr = new (addr) ::QScxmlStateMachineWrapper(cppArg0, cppArg1);
                PySide::setNextQObjectMemoryAddr(0);
            } else {
                cptr = new ::QScxmlStateMachineWrapper(cppArg0, cppArg1);
            }

            Shiboken::Object::setParent(pyArgs[1], self);
        }
    }

    if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::QScxmlStateMachine >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (!cptr) goto Sbk_QScxmlStateMachine_Init_TypeError;

    Shiboken::Object::setValidCpp(sbkSelf, true);
    Shiboken::Object::setHasCppWrapper(sbkSelf, true);
    if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
        Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
    }
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);

    // QObject setup
    PySide::Signal::updateSourceObject(self);
    metaObject = cptr->metaObject(); // <- init python qt properties
    if (!errInfo.isNull() && PyDict_Check(errInfo.object())) {
        if (!PySide::fillQtProperties(self, metaObject, errInfo))
            goto Sbk_QScxmlStateMachine_Init_TypeError;
    };


    return 1;

    Sbk_QScxmlStateMachine_Init_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return -1;
}

static PyObject *Sbk_QScxmlStateMachineFunc_activeStateNames(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.activeStateNames";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_activeStateNames_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:activeStateNames", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: QScxmlStateMachine::activeStateNames(bool)const->QStringList
    if (numArgs == 0) {
        overloadId = 0; // activeStateNames(bool)const
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArgs[0])))) {
        overloadId = 0; // activeStateNames(bool)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_activeStateNames_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_compress = Shiboken::String::createStaticString("compress");
            if (PyDict_Contains(kwds, key_compress)) {
                value = PyDict_GetItem(kwds, key_compress);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_compress);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QScxmlStateMachineFunc_activeStateNames_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArgs[0]))))
                        goto Sbk_QScxmlStateMachineFunc_activeStateNames_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_compress);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QScxmlStateMachineFunc_activeStateNames_TypeError;
            }
        }
        bool cppArg0 = true;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // activeStateNames(bool)const
            QStringList cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->activeStateNames(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_activeStateNames_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_cancelDelayedEvent(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.cancelDelayedEvent";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::cancelDelayedEvent(QString)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) {
        overloadId = 0; // cancelDelayedEvent(QString)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_cancelDelayedEvent_TypeError;

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // cancelDelayedEvent(QString)
            cppSelf->cancelDelayedEvent(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QScxmlStateMachineFunc_cancelDelayedEvent_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_connectToEvent(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.connectToEvent";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[4];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0, 0};

    // invalid argument lengths
    if (numArgs > 4) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_connectToEvent_TypeError;
    } else if (numArgs < 3) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_connectToEvent_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OOOO:connectToEvent", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3])))
        return {};


    // Overloaded function decisor
    // 0: QScxmlStateMachine::connectToEvent(QString,const QObject*,const char*,Qt::ConnectionType)->QMetaObject::Connection
    if (numArgs >= 3
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[1])))
        && Shiboken::String::check(pyArgs[2]) && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<const char *>(), (pyArgs[2])))) {
        if (numArgs == 3) {
            overloadId = 0; // connectToEvent(QString,const QObject*,const char*,Qt::ConnectionType)
        } else if (numArgs >= 4
            && (pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CONNECTIONTYPE_IDX]))->converter, (pyArgs[3])))) {
            overloadId = 0; // connectToEvent(QString,const QObject*,const char*,Qt::ConnectionType)
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_connectToEvent_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_type = Shiboken::String::createStaticString("type");
            if (PyDict_Contains(kwds, key_type)) {
                value = PyDict_GetItem(kwds, key_type);
                if (value && pyArgs[3]) {
                    errInfo.reset(key_type);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QScxmlStateMachineFunc_connectToEvent_TypeError;
                }
                if (value) {
                    pyArgs[3] = value;
                    if (!(pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CONNECTIONTYPE_IDX]))->converter, (pyArgs[3]))))
                        goto Sbk_QScxmlStateMachineFunc_connectToEvent_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_type);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QScxmlStateMachineFunc_connectToEvent_TypeError;
            }
        }
        ::QString cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return {};
        ::QObject *cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        const char* cppArg2;
        pythonToCpp[2](pyArgs[2], &cppArg2);
        ::Qt::ConnectionType cppArg3(Qt::AutoConnection);
        if (pythonToCpp[3])
            pythonToCpp[3](pyArgs[3], &cppArg3);

        if (!PyErr_Occurred()) {
            // connectToEvent(QString,const QObject*,const char*,Qt::ConnectionType)
            QMetaObject::Connection cppResult = cppSelf->connectToEvent(cppArg0, cppArg1, cppArg2, cppArg3);
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAOBJECT_CONNECTION_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_connectToEvent_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_connectToState(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.connectToState";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[4];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0, 0};

    // invalid argument lengths
    if (numArgs > 4) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_connectToState_TypeError;
    } else if (numArgs < 3) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_connectToState_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OOOO:connectToState", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3])))
        return {};


    // Overloaded function decisor
    // 0: QScxmlStateMachine::connectToState(QString,const QObject*,const char*,Qt::ConnectionType)->QMetaObject::Connection
    if (numArgs >= 3
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[1])))
        && Shiboken::String::check(pyArgs[2]) && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<const char *>(), (pyArgs[2])))) {
        if (numArgs == 3) {
            overloadId = 0; // connectToState(QString,const QObject*,const char*,Qt::ConnectionType)
        } else if (numArgs >= 4
            && (pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CONNECTIONTYPE_IDX]))->converter, (pyArgs[3])))) {
            overloadId = 0; // connectToState(QString,const QObject*,const char*,Qt::ConnectionType)
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_connectToState_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_type = Shiboken::String::createStaticString("type");
            if (PyDict_Contains(kwds, key_type)) {
                value = PyDict_GetItem(kwds, key_type);
                if (value && pyArgs[3]) {
                    errInfo.reset(key_type);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QScxmlStateMachineFunc_connectToState_TypeError;
                }
                if (value) {
                    pyArgs[3] = value;
                    if (!(pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CONNECTIONTYPE_IDX]))->converter, (pyArgs[3]))))
                        goto Sbk_QScxmlStateMachineFunc_connectToState_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_type);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QScxmlStateMachineFunc_connectToState_TypeError;
            }
        }
        ::QString cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return {};
        ::QObject *cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        const char* cppArg2;
        pythonToCpp[2](pyArgs[2], &cppArg2);
        ::Qt::ConnectionType cppArg3(Qt::AutoConnection);
        if (pythonToCpp[3])
            pythonToCpp[3](pyArgs[3], &cppArg3);

        if (!PyErr_Occurred()) {
            // connectToState(QString,const QObject*,const char*,Qt::ConnectionType)
            QMetaObject::Connection cppResult = cppSelf->connectToState(cppArg0, cppArg1, cppArg2, cppArg3);
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAOBJECT_CONNECTION_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_connectToState_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_dataModel(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.dataModel";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // dataModel()const
            QScxmlDataModel * cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->dataModel();
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLDATAMODEL_IDX], cppResult);
            Shiboken::Object::setParent(self, pyResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_fromData(PyObject *self, PyObject *args, PyObject *kwds)
{
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.fromData";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths
    if (numArgs > 2) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_fromData_TypeError;
    } else if (numArgs < 1) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_fromData_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OO:fromData", &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: static QScxmlStateMachine::fromData(QIODevice*,QString)->QScxmlStateMachine*
    if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QIODEVICE_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 0; // fromData(QIODevice*,QString)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) {
            overloadId = 0; // fromData(QIODevice*,QString)
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_fromData_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_fileName = Shiboken::String::createStaticString("fileName");
            if (PyDict_Contains(kwds, key_fileName)) {
                value = PyDict_GetItem(kwds, key_fileName);
                if (value && pyArgs[1]) {
                    errInfo.reset(key_fileName);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QScxmlStateMachineFunc_fromData_TypeError;
                }
                if (value) {
                    pyArgs[1] = value;
                    if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1]))))
                        goto Sbk_QScxmlStateMachineFunc_fromData_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_fileName);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QScxmlStateMachineFunc_fromData_TypeError;
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QIODevice *cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        ::QString cppArg1 = QString();
        if (pythonToCpp[1])
            pythonToCpp[1](pyArgs[1], &cppArg1);

        if (!PyErr_Occurred()) {
            // fromData(QIODevice*,QString)
            QScxmlStateMachine * cppResult = ::QScxmlStateMachine::fromData(cppArg0, cppArg1);
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_fromData_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_fromFile(PyObject *self, PyObject *pyArg)
{
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.fromFile";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: static QScxmlStateMachine::fromFile(QString)->QScxmlStateMachine*
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) {
        overloadId = 0; // fromFile(QString)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_fromFile_TypeError;

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // fromFile(QString)
            QScxmlStateMachine * cppResult = ::QScxmlStateMachine::fromFile(cppArg0);
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_fromFile_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_init(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.init";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // init()
            bool cppResult = cppSelf->init();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_initialValues(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.initialValues";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // initialValues()
            QMap<QString,QVariant > cppResult = cppSelf->initialValues();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QMAP_QSTRING_QVARIANT_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_invokedServices(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.invokedServices";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // invokedServices()const
            QList<QScxmlInvokableService* > cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->invokedServices();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLINVOKABLESERVICEPTR_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_isActive(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.isActive";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::isActive(QString)const->bool
    // 1: QScxmlStateMachine::isActive(int)const->bool
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 1; // isActive(int)const
    } else if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) {
        overloadId = 0; // isActive(QString)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_isActive_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // isActive(const QString & scxmlStateName) const
        {
            ::QString cppArg0;
            pythonToCpp(pyArg, &cppArg0);

            if (!PyErr_Occurred()) {
                // isActive(QString)const
                bool cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->isActive(cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            }
            break;
        }
        case 1: // isActive(int stateIndex) const
        {
            int cppArg0;
            pythonToCpp(pyArg, &cppArg0);

            if (!PyErr_Occurred()) {
                // isActive(int)const
                bool cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->isActive(cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            }
            break;
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_isActive_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_isDispatchableTarget(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.isDispatchableTarget";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::isDispatchableTarget(QString)const->bool
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) {
        overloadId = 0; // isDispatchableTarget(QString)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_isDispatchableTarget_TypeError;

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // isDispatchableTarget(QString)const
            bool cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->isDispatchableTarget(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_isDispatchableTarget_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_isInitialized(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.isInitialized";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isInitialized()const
            bool cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->isInitialized();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_isInvoked(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.isInvoked";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isInvoked()const
            bool cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->isInvoked();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_isRunning(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.isRunning";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isRunning()const
            bool cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->isRunning();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_loader(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.loader";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // loader()const
            QScxmlCompiler::Loader * cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->loader();
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLCOMPILER_LOADER_IDX], cppResult);
            Shiboken::Object::setParent(self, pyResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_name(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.name";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // name()const
            QString cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->name();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_parseErrors(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.parseErrors";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // parseErrors()const
            QList<QScxmlError > cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->parseErrors();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QLIST_QSCXMLERROR_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_sessionId(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.sessionId";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // sessionId()const
            QString cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->sessionId();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QScxmlStateMachineFunc_setDataModel(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.setDataModel";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::setDataModel(QScxmlDataModel*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtScxmlTypes[SBK_QSCXMLDATAMODEL_IDX], (pyArg)))) {
        overloadId = 0; // setDataModel(QScxmlDataModel*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_setDataModel_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QScxmlDataModel *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setDataModel(QScxmlDataModel*)
            cppSelf->setDataModel(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QScxmlStateMachineFunc_setDataModel_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_setInitialValues(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.setInitialValues";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::setInitialValues(QMap<QString,QVariant>)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtScxmlTypeConverters[SBK_QTSCXML_QMAP_QSTRING_QVARIANT_IDX], (pyArg)))) {
        overloadId = 0; // setInitialValues(QMap<QString,QVariant>)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_setInitialValues_TypeError;

    // Call function/method
    {
        ::QMap<QString,QVariant > cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setInitialValues(QMap<QString,QVariant>)
            cppSelf->setInitialValues(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QScxmlStateMachineFunc_setInitialValues_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_setLoader(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.setLoader";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::setLoader(QScxmlCompiler::Loader*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtScxmlTypes[SBK_QSCXMLCOMPILER_LOADER_IDX], (pyArg)))) {
        overloadId = 0; // setLoader(QScxmlCompiler::Loader*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_setLoader_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QScxmlCompiler::Loader *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setLoader(QScxmlCompiler::Loader*)
            cppSelf->setLoader(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QScxmlStateMachineFunc_setLoader_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_setRunning(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.setRunning";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::setRunning(bool)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArg)))) {
        overloadId = 0; // setRunning(bool)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_setRunning_TypeError;

    // Call function/method
    {
        bool cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setRunning(bool)
            cppSelf->setRunning(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QScxmlStateMachineFunc_setRunning_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_setTableData(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.setTableData";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QScxmlStateMachine::setTableData(QScxmlTableData*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtScxmlTypes[SBK_QSCXMLTABLEDATA_IDX], (pyArg)))) {
        overloadId = 0; // setTableData(QScxmlTableData*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_setTableData_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QScxmlTableData *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setTableData(QScxmlTableData*)
            cppSelf->setTableData(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QScxmlStateMachineFunc_setTableData_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_start(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.start";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // start()
            cppSelf->start();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QScxmlStateMachineFunc_stateNames(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.stateNames";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QScxmlStateMachineFunc_stateNames_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:stateNames", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: QScxmlStateMachine::stateNames(bool)const->QStringList
    if (numArgs == 0) {
        overloadId = 0; // stateNames(bool)const
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArgs[0])))) {
        overloadId = 0; // stateNames(bool)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_stateNames_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_compress = Shiboken::String::createStaticString("compress");
            if (PyDict_Contains(kwds, key_compress)) {
                value = PyDict_GetItem(kwds, key_compress);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_compress);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QScxmlStateMachineFunc_stateNames_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArgs[0]))))
                        goto Sbk_QScxmlStateMachineFunc_stateNames_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_compress);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QScxmlStateMachineFunc_stateNames_TypeError;
            }
        }
        bool cppArg0 = true;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // stateNames(bool)const
            QStringList cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->stateNames(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QScxmlStateMachineFunc_stateNames_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_stop(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.stop";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // stop()
            cppSelf->stop();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QScxmlStateMachineFunc_submitEvent(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.submitEvent";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths


    if (!PyArg_UnpackTuple(args, "submitEvent", 1, 2, &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QScxmlStateMachine::submitEvent(QScxmlEvent*)
    // 1: QScxmlStateMachine::submitEvent(QString)
    // 2: QScxmlStateMachine::submitEvent(QString,QVariant)
    if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtScxmlTypes[SBK_QSCXMLEVENT_IDX], (pyArgs[0])))) {
        overloadId = 0; // submitEvent(QScxmlEvent*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 1; // submitEvent(QString)
        } else if (numArgs == 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], (pyArgs[1])))) {
            overloadId = 2; // submitEvent(QString,QVariant)
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QScxmlStateMachineFunc_submitEvent_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // submitEvent(QScxmlEvent * event)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return {};
            ::QScxmlEvent *cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // submitEvent(QScxmlEvent*)
                cppSelf->submitEvent(cppArg0);

                // Ownership transferences.
                Shiboken::Object::invalidate(pyArgs[0]);
            }
            break;
        }
        case 1: // submitEvent(const QString & eventName)
        {
            ::QString cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // submitEvent(QString)
                cppSelf->submitEvent(cppArg0);
            }
            break;
        }
        case 2: // submitEvent(const QString & eventName, const QVariant & data)
        {
            ::QString cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            ::QVariant cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);

            if (!PyErr_Occurred()) {
                // submitEvent(QString,QVariant)
                cppSelf->submitEvent(cppArg0, cppArg1);
            }
            break;
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QScxmlStateMachineFunc_submitEvent_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QScxmlStateMachineFunc_tableData(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtScxml.QScxmlStateMachine.tableData";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // tableData()const
            QScxmlTableData * cppResult = const_cast<const ::QScxmlStateMachine *>(cppSelf)->tableData();
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtScxmlTypes[SBK_QSCXMLTABLEDATA_IDX], cppResult);
            Shiboken::Object::setParent(self, pyResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_QScxmlStateMachine_PropertyStrings[] = {
    "dataModel::",
    "initialValues::",
    "initialized:isInitialized",
    "invoked:isInvoked",
    "invokedServices:",
    "loader::",
    "name:",
    "parseErrors:",
    "running:isRunning:",
    "sessionId:",
    "tableData::",
    nullptr // Sentinel
};

static PyMethodDef Sbk_QScxmlStateMachine_methods[] = {
    {"activeStateNames", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_activeStateNames), METH_VARARGS|METH_KEYWORDS},
    {"cancelDelayedEvent", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_cancelDelayedEvent), METH_O},
    {"connectToEvent", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_connectToEvent), METH_VARARGS|METH_KEYWORDS},
    {"connectToState", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_connectToState), METH_VARARGS|METH_KEYWORDS},
    {"dataModel", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_dataModel), METH_NOARGS},
    {"fromData", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_fromData), METH_VARARGS|METH_KEYWORDS|METH_STATIC},
    {"fromFile", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_fromFile), METH_O|METH_STATIC},
    {"init", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_init), METH_NOARGS},
    {"initialValues", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_initialValues), METH_NOARGS},
    {"invokedServices", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_invokedServices), METH_NOARGS},
    {"isActive", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_isActive), METH_O},
    {"isDispatchableTarget", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_isDispatchableTarget), METH_O},
    {"isInitialized", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_isInitialized), METH_NOARGS},
    {"isInvoked", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_isInvoked), METH_NOARGS},
    {"isRunning", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_isRunning), METH_NOARGS},
    {"loader", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_loader), METH_NOARGS},
    {"name", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_name), METH_NOARGS},
    {"parseErrors", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_parseErrors), METH_NOARGS},
    {"sessionId", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_sessionId), METH_NOARGS},
    {"setDataModel", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_setDataModel), METH_O},
    {"setInitialValues", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_setInitialValues), METH_O},
    {"setLoader", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_setLoader), METH_O},
    {"setRunning", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_setRunning), METH_O},
    {"setTableData", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_setTableData), METH_O},
    {"start", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_start), METH_NOARGS},
    {"stateNames", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_stateNames), METH_VARARGS|METH_KEYWORDS},
    {"stop", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_stop), METH_NOARGS},
    {"submitEvent", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_submitEvent), METH_VARARGS},
    {"tableData", reinterpret_cast<PyCFunction>(Sbk_QScxmlStateMachineFunc_tableData), METH_NOARGS},

    {nullptr, nullptr} // Sentinel
};

static int Sbk_QScxmlStateMachine_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value && PyCallable_Check(value)) {
        auto plain_inst = reinterpret_cast< ::QScxmlStateMachine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX], reinterpret_cast<SbkObject *>(self)));
        auto inst = dynamic_cast<QScxmlStateMachineWrapper *>(plain_inst);
        if (inst)
            inst->resetPyMethodCache();
    }
    Shiboken::AutoDecRef pp(reinterpret_cast<PyObject *>(PySide::Property::getObject(self, name)));
    if (!pp.isNull())
        return PySide::Property::setValue(reinterpret_cast<PySideProperty *>(pp.object()), self, value);
    return PyObject_GenericSetAttr(self, name, value);
}

} // extern "C"

static int Sbk_QScxmlStateMachine_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QScxmlStateMachine_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QScxmlStateMachine_Type = nullptr;
static PyTypeObject *Sbk_QScxmlStateMachine_TypeF(void)
{
    return _Sbk_QScxmlStateMachine_Type;
}

static PyType_Slot Sbk_QScxmlStateMachine_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        nullptr},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_QScxmlStateMachine_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QScxmlStateMachine_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QScxmlStateMachine_clear)},
    {Py_tp_richcompare, nullptr},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QScxmlStateMachine_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QScxmlStateMachine_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    {0, nullptr}
};
static PyType_Spec Sbk_QScxmlStateMachine_spec = {
    "2:PySide6.QtScxml.QScxmlStateMachine",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QScxmlStateMachine_slots
};

} //extern "C"

static void *Sbk_QScxmlStateMachine_typeDiscovery(void *cptr, PyTypeObject *instanceType)
{
    if (instanceType == Shiboken::SbkType< ::QObject >())
        return dynamic_cast< ::QScxmlStateMachine *>(reinterpret_cast< ::QObject *>(cptr));
    return {};
}


// Type conversion functions.

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QScxmlStateMachine_PythonToCpp_QScxmlStateMachine_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QScxmlStateMachine_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QScxmlStateMachine_PythonToCpp_QScxmlStateMachine_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QScxmlStateMachine_TypeF())))
        return QScxmlStateMachine_PythonToCpp_QScxmlStateMachine_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QScxmlStateMachine_PTR_CppToPython_QScxmlStateMachine(const void *cppIn)
{
    return PySide::getWrapperForQObject(reinterpret_cast<::QScxmlStateMachine *>(const_cast<void *>(cppIn)), Sbk_QScxmlStateMachine_TypeF());

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QScxmlStateMachine_SignatureStrings[] = {
    "PySide6.QtScxml.QScxmlStateMachine(self,metaObject:PySide6.QtCore.QMetaObject,parent:PySide6.QtCore.QObject=nullptr)",
    "PySide6.QtScxml.QScxmlStateMachine.activeStateNames(self,compress:bool=true)->QStringList",
    "PySide6.QtScxml.QScxmlStateMachine.cancelDelayedEvent(self,sendId:QString)",
    "PySide6.QtScxml.QScxmlStateMachine.connectToEvent(self,scxmlEventSpec:QString,receiver:PySide6.QtCore.QObject,method:char*,type:PySide6.QtCore.Qt.ConnectionType=Qt.AutoConnection)->PySide6.QtCore.QMetaObject.Connection",
    "PySide6.QtScxml.QScxmlStateMachine.connectToState(self,scxmlStateName:QString,receiver:PySide6.QtCore.QObject,method:char*,type:PySide6.QtCore.Qt.ConnectionType=Qt.AutoConnection)->PySide6.QtCore.QMetaObject.Connection",
    "PySide6.QtScxml.QScxmlStateMachine.dataModel(self)->PySide6.QtScxml.QScxmlDataModel",
    "PySide6.QtScxml.QScxmlStateMachine.fromData(data:PySide6.QtCore.QIODevice,fileName:QString=QString())->PySide6.QtScxml.QScxmlStateMachine",
    "PySide6.QtScxml.QScxmlStateMachine.fromFile(fileName:QString)->PySide6.QtScxml.QScxmlStateMachine",
    "PySide6.QtScxml.QScxmlStateMachine.init(self)->bool",
    "PySide6.QtScxml.QScxmlStateMachine.initialValues(self)->QMap[QString, QVariant]",
    "PySide6.QtScxml.QScxmlStateMachine.invokedServices(self)->QList[PySide6.QtScxml.QScxmlInvokableService]",
    "1:PySide6.QtScxml.QScxmlStateMachine.isActive(self,scxmlStateName:QString)->bool",
    "0:PySide6.QtScxml.QScxmlStateMachine.isActive(self,stateIndex:int)->bool",
    "PySide6.QtScxml.QScxmlStateMachine.isDispatchableTarget(self,target:QString)->bool",
    "PySide6.QtScxml.QScxmlStateMachine.isInitialized(self)->bool",
    "PySide6.QtScxml.QScxmlStateMachine.isInvoked(self)->bool",
    "PySide6.QtScxml.QScxmlStateMachine.isRunning(self)->bool",
    "PySide6.QtScxml.QScxmlStateMachine.loader(self)->PySide6.QtScxml.QScxmlCompiler.Loader",
    "PySide6.QtScxml.QScxmlStateMachine.name(self)->QString",
    "PySide6.QtScxml.QScxmlStateMachine.parseErrors(self)->QList[PySide6.QtScxml.QScxmlError]",
    "PySide6.QtScxml.QScxmlStateMachine.sessionId(self)->QString",
    "PySide6.QtScxml.QScxmlStateMachine.setDataModel(self,model:PySide6.QtScxml.QScxmlDataModel)",
    "PySide6.QtScxml.QScxmlStateMachine.setInitialValues(self,initialValues:QMap[QString, QVariant])",
    "PySide6.QtScxml.QScxmlStateMachine.setLoader(self,loader:PySide6.QtScxml.QScxmlCompiler.Loader)",
    "PySide6.QtScxml.QScxmlStateMachine.setRunning(self,running:bool)",
    "PySide6.QtScxml.QScxmlStateMachine.setTableData(self,tableData:PySide6.QtScxml.QScxmlTableData)",
    "PySide6.QtScxml.QScxmlStateMachine.start(self)",
    "PySide6.QtScxml.QScxmlStateMachine.stateNames(self,compress:bool=true)->QStringList",
    "PySide6.QtScxml.QScxmlStateMachine.stop(self)",
    "2:PySide6.QtScxml.QScxmlStateMachine.submitEvent(self,event:PySide6.QtScxml.QScxmlEvent)",
    "1:PySide6.QtScxml.QScxmlStateMachine.submitEvent(self,eventName:QString)",
    "0:PySide6.QtScxml.QScxmlStateMachine.submitEvent(self,eventName:QString,data:QVariant)",
    "PySide6.QtScxml.QScxmlStateMachine.tableData(self)->PySide6.QtScxml.QScxmlTableData",
    nullptr}; // Sentinel

void init_QScxmlStateMachine(PyObject *module)
{
    _Sbk_QScxmlStateMachine_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QScxmlStateMachine",
        "QScxmlStateMachine*",
        &Sbk_QScxmlStateMachine_spec,
        &Shiboken::callCppDestructor< ::QScxmlStateMachine >,
        SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX],
        0,
        0);
    auto *pyType = Sbk_QScxmlStateMachine_TypeF(); // references _Sbk_QScxmlStateMachine_Type
    InitSignatureStrings(pyType, QScxmlStateMachine_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QScxmlStateMachine_Type), Sbk_QScxmlStateMachine_PropertyStrings);
    SbkPySide6_QtScxmlTypes[SBK_QSCXMLSTATEMACHINE_IDX]
        = Sbk_QScxmlStateMachine_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QScxmlStateMachine_TypeF(),
        QScxmlStateMachine_PythonToCpp_QScxmlStateMachine_PTR,
        is_QScxmlStateMachine_PythonToCpp_QScxmlStateMachine_PTR_Convertible,
        QScxmlStateMachine_PTR_CppToPython_QScxmlStateMachine);

    Shiboken::Conversions::registerConverterName(converter, "QScxmlStateMachine");
    Shiboken::Conversions::registerConverterName(converter, "QScxmlStateMachine*");
    Shiboken::Conversions::registerConverterName(converter, "QScxmlStateMachine&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::QScxmlStateMachine).name());
    Shiboken::Conversions::registerConverterName(converter, typeid(::QScxmlStateMachineWrapper).name());


    Shiboken::ObjectType::setTypeDiscoveryFunctionV2(Sbk_QScxmlStateMachine_TypeF(), &Sbk_QScxmlStateMachine_typeDiscovery);

    PySide::Signal::registerSignals(Sbk_QScxmlStateMachine_TypeF(), &::QScxmlStateMachine::staticMetaObject);
    Shiboken::ObjectType::setSubTypeInitHook(Sbk_QScxmlStateMachine_TypeF(), &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(Sbk_QScxmlStateMachine_TypeF(), &::QScxmlStateMachine::staticMetaObject, sizeof(QScxmlStateMachineWrapper));
}
