/* This file is autogenerated. DO NOT CHANGE. All changes will be lost */

#include "nopackageexternal.qpb.h"
#include <QtProtobuf/qprotobufserializer.h>
#include <cmath>


class SimpleIntMessageExt_QtProtobufData : public QSharedData
{
public:
    SimpleIntMessageExt_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0)
    {
    }

    SimpleIntMessageExt_QtProtobufData(const SimpleIntMessageExt_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt)
    {
    }

    QtProtobuf::int32 m_testFieldInt;
};

SimpleIntMessageExt::~SimpleIntMessageExt() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleIntMessageExt_uint_data;
    const char qt_protobuf_SimpleIntMessageExt_char_data[34];
} qt_protobuf_SimpleIntMessageExt_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        19, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        20, /* = testFieldInt */
        33, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        // Property indices:
        0, /* = testFieldInt */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = testFieldInt */
    },
    // char_data
    /* metadata char_data: */
    "SimpleIntMessageExt\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleIntMessageExt::propertyOrdering = {
    &qt_protobuf_SimpleIntMessageExt_metadata.data
};

void SimpleIntMessageExt::registerTypes()
{
    qRegisterMetaType<SimpleIntMessageExt>();
    qRegisterMetaType<SimpleIntMessageExtRepeated>();
}

SimpleIntMessageExt::SimpleIntMessageExt()
    : QProtobufMessage(&SimpleIntMessageExt::staticMetaObject),
      dptr(new SimpleIntMessageExt_QtProtobufData)
{
}

SimpleIntMessageExt::SimpleIntMessageExt(const SimpleIntMessageExt &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
SimpleIntMessageExt &SimpleIntMessageExt::operator =(const SimpleIntMessageExt &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
SimpleIntMessageExt::SimpleIntMessageExt(SimpleIntMessageExt &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
SimpleIntMessageExt &SimpleIntMessageExt::operator =(SimpleIntMessageExt &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool SimpleIntMessageExt::operator ==(const SimpleIntMessageExt &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_testFieldInt == other.dptr->m_testFieldInt;
}

bool SimpleIntMessageExt::operator !=(const SimpleIntMessageExt &other) const
{
    return !this->operator ==(other);
}

QtProtobuf::int32 SimpleIntMessageExt::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

void SimpleIntMessageExt::setTestFieldInt(const QtProtobuf::int32 &testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}


#include "moc_nopackageexternal.qpb.cpp"
