/****************************************************************************
** Meta object code from reading C++ file 'protocol.h'
**
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.12.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include "../../../../knights-26.07.80/src/proto/protocol.h"
#include <QtCore/qmetatype.h>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'protocol.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.12.0. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

#ifndef Q_CONSTINIT
#define Q_CONSTINIT
#endif

QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
namespace {
struct qt_meta_tag_ZN7Knights8ProtocolE_t {};
} // unnamed namespace

template <> constexpr inline auto Knights::Protocol::qt_create_metaobjectdata<qt_meta_tag_ZN7Knights8ProtocolE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Knights::Protocol",
        "pieceMoved",
        "",
        "Move",
        "m",
        "illegalMove",
        "gameOver",
        "Color",
        "winner",
        "initSuccesful",
        "error",
        "Protocol::ErrorCode",
        "errorCode",
        "errorString",
        "timeChanged",
        "time",
        "undoPossible",
        "possible",
        "redoPossible",
        "move",
        "init",
        "startGame",
        "makeOffer",
        "Offer",
        "offer",
        "acceptOffer",
        "declineOffer",
        "setWinner",
        "color",
        "playerName",
        "Feature",
        "NoFeatures",
        "TimeLimit",
        "SetTimeLimit",
        "UpdateTime",
        "Pause",
        "History",
        "Undo",
        "GameOver",
        "Draw",
        "Adjourn",
        "Resign",
        "Abort",
        "SetDifficulty",
        "AdjustDifficulty",
        "Features",
        "ErrorCode",
        "NoError",
        "UserCancelled",
        "NetworkError",
        "InstallationError",
        "UnknownError"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'pieceMoved'
        QtMocHelpers::SignalData<void(const Move &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'illegalMove'
        QtMocHelpers::SignalData<void()>(5, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'gameOver'
        QtMocHelpers::SignalData<void(Color)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 8 },
        }}),
        // Signal 'initSuccesful'
        QtMocHelpers::SignalData<void()>(9, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'error'
        QtMocHelpers::SignalData<void(const Protocol::ErrorCode &, const QString &)>(10, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 11, 12 }, { QMetaType::QString, 13 },
        }}),
        // Signal 'error'
        QtMocHelpers::SignalData<void(const Protocol::ErrorCode &)>(10, 2, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Void, {{
            { 0x80000000 | 11, 12 },
        }}),
        // Signal 'timeChanged'
        QtMocHelpers::SignalData<void(const QTime &)>(14, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QTime, 15 },
        }}),
        // Signal 'undoPossible'
        QtMocHelpers::SignalData<void(bool)>(16, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Bool, 17 },
        }}),
        // Signal 'redoPossible'
        QtMocHelpers::SignalData<void(bool)>(18, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Bool, 17 },
        }}),
        // Slot 'move'
        QtMocHelpers::SlotData<void(const Move &)>(19, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Slot 'init'
        QtMocHelpers::SlotData<void()>(20, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'startGame'
        QtMocHelpers::SlotData<void()>(21, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'makeOffer'
        QtMocHelpers::SlotData<void(const Offer &)>(22, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 23, 24 },
        }}),
        // Slot 'acceptOffer'
        QtMocHelpers::SlotData<void(const Offer &)>(25, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 23, 24 },
        }}),
        // Slot 'declineOffer'
        QtMocHelpers::SlotData<void(const Offer &)>(26, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 23, 24 },
        }}),
        // Slot 'setWinner'
        QtMocHelpers::SlotData<void(Color)>(27, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 8 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'color'
        QtMocHelpers::PropertyData<Color>(28, 0x80000000 | 7, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'playerName'
        QtMocHelpers::PropertyData<QString>(29, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Feature'
        QtMocHelpers::EnumData<enum Feature>(30, 30, QMC::EnumFlags{}).add({
            {   31, Feature::NoFeatures },
            {   32, Feature::TimeLimit },
            {   33, Feature::SetTimeLimit },
            {   34, Feature::UpdateTime },
            {   35, Feature::Pause },
            {   36, Feature::History },
            {   37, Feature::Undo },
            {   38, Feature::GameOver },
            {   39, Feature::Draw },
            {   40, Feature::Adjourn },
            {   41, Feature::Resign },
            {   42, Feature::Abort },
            {   43, Feature::SetDifficulty },
            {   44, Feature::AdjustDifficulty },
        }),
        // flag 'Features'
        QtMocHelpers::EnumData<Features>(45, 30, QMC::EnumIsFlag).add({
            {   31, Feature::NoFeatures },
            {   32, Feature::TimeLimit },
            {   33, Feature::SetTimeLimit },
            {   34, Feature::UpdateTime },
            {   35, Feature::Pause },
            {   36, Feature::History },
            {   37, Feature::Undo },
            {   38, Feature::GameOver },
            {   39, Feature::Draw },
            {   40, Feature::Adjourn },
            {   41, Feature::Resign },
            {   42, Feature::Abort },
            {   43, Feature::SetDifficulty },
            {   44, Feature::AdjustDifficulty },
        }),
        // enum 'ErrorCode'
        QtMocHelpers::EnumData<enum ErrorCode>(46, 46, QMC::EnumFlags{}).add({
            {   47, ErrorCode::NoError },
            {   48, ErrorCode::UserCancelled },
            {   49, ErrorCode::NetworkError },
            {   50, ErrorCode::InstallationError },
            {   51, ErrorCode::UnknownError },
        }),
    };
    return QtMocHelpers::metaObjectData<Protocol, qt_meta_tag_ZN7Knights8ProtocolE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Knights::Protocol::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN7Knights8ProtocolE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN7Knights8ProtocolE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN7Knights8ProtocolE_t>.metaTypes,
    nullptr
} };

void Knights::Protocol::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<Protocol *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->pieceMoved((*reinterpret_cast<std::add_pointer_t<Move>>(_a[1]))); break;
        case 1: _t->illegalMove(); break;
        case 2: _t->gameOver((*reinterpret_cast<std::add_pointer_t<Color>>(_a[1]))); break;
        case 3: _t->initSuccesful(); break;
        case 4: _t->error((*reinterpret_cast<std::add_pointer_t<Protocol::ErrorCode>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2]))); break;
        case 5: _t->error((*reinterpret_cast<std::add_pointer_t<Protocol::ErrorCode>>(_a[1]))); break;
        case 6: _t->timeChanged((*reinterpret_cast<std::add_pointer_t<QTime>>(_a[1]))); break;
        case 7: _t->undoPossible((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
        case 8: _t->redoPossible((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
        case 9: _t->move((*reinterpret_cast<std::add_pointer_t<Move>>(_a[1]))); break;
        case 10: _t->init(); break;
        case 11: _t->startGame(); break;
        case 12: _t->makeOffer((*reinterpret_cast<std::add_pointer_t<Offer>>(_a[1]))); break;
        case 13: _t->acceptOffer((*reinterpret_cast<std::add_pointer_t<Offer>>(_a[1]))); break;
        case 14: _t->declineOffer((*reinterpret_cast<std::add_pointer_t<Offer>>(_a[1]))); break;
        case 15: _t->setWinner((*reinterpret_cast<std::add_pointer_t<Color>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)(const Move & )>(_a, &Protocol::pieceMoved, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)()>(_a, &Protocol::illegalMove, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)(Color )>(_a, &Protocol::gameOver, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)()>(_a, &Protocol::initSuccesful, 3))
            return;
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)(const Protocol::ErrorCode & , const QString & )>(_a, &Protocol::error, 4))
            return;
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)(const QTime & )>(_a, &Protocol::timeChanged, 6))
            return;
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)(bool )>(_a, &Protocol::undoPossible, 7))
            return;
        if (QtMocHelpers::indexOfMethod<void (Protocol::*)(bool )>(_a, &Protocol::redoPossible, 8))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<Color*>(_v) = _t->color(); break;
        case 1: *reinterpret_cast<QString*>(_v) = _t->playerName(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setColor(*reinterpret_cast<Color*>(_v)); break;
        case 1: _t->setPlayerName(*reinterpret_cast<QString*>(_v)); break;
        default: break;
        }
    }
}

const QMetaObject *Knights::Protocol::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *Knights::Protocol::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN7Knights8ProtocolE_t>.strings))
        return static_cast<void*>(this);
    return QObject::qt_metacast(_clname);
}

int Knights::Protocol::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 16)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 16;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 16)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 16;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 2;
    }
    return _id;
}

// SIGNAL 0
void Knights::Protocol::pieceMoved(const Move & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void Knights::Protocol::illegalMove()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}

// SIGNAL 2
void Knights::Protocol::gameOver(Color _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}

// SIGNAL 3
void Knights::Protocol::initSuccesful()
{
    QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
}

// SIGNAL 4
void Knights::Protocol::error(const Protocol::ErrorCode & _t1, const QString & _t2)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 4, nullptr, _t1, _t2);
}

// SIGNAL 6
void Knights::Protocol::timeChanged(const QTime & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 6, nullptr, _t1);
}

// SIGNAL 7
void Knights::Protocol::undoPossible(bool _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 7, nullptr, _t1);
}

// SIGNAL 8
void Knights::Protocol::redoPossible(bool _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 8, nullptr, _t1);
}
QT_WARNING_POP
