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


#include "google/protobuf/source_context.qpb.h"

#include <QtProtobuf/qprotobufregistration.h>

#include <cmath>

namespace google::protobuf {

class SourceContext_QtProtobufData : public QSharedData
{
public:
    SourceContext_QtProtobufData()
        : QSharedData()
    {
    }

    SourceContext_QtProtobufData(const SourceContext_QtProtobufData &other)
        : QSharedData(other),
          m_fileName(other.m_fileName)
    {
    }

    QString m_fileName;
};

SourceContext::~SourceContext() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SourceContext_uint_data;
    const char qt_protobuf_SourceContext_char_data[40];
} qt_protobuf_SourceContext_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        29, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        30, /* = fileName */
        39, /* = end-of-string-marker */
        // Field numbers:
        1, /* = fileName */
        // Property indices:
        0, /* = fileName */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = fileName */
    },
    // char_data
    /* metadata char_data: */
    "google.protobuf.SourceContext\0" /* = full message name */
    /* field char_data: */
    "fileName\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SourceContext::staticPropertyOrdering = {
    &qt_protobuf_SourceContext_metadata.data
};

void SourceContext::registerTypes()
{
    qRegisterMetaType<SourceContext>();
    qRegisterMetaType<QList<SourceContext>>();
}

SourceContext::SourceContext()
    : QProtobufMessage(&SourceContext::staticMetaObject, &SourceContext::staticPropertyOrdering),
      dptr(new SourceContext_QtProtobufData)
{
}

SourceContext::SourceContext(const SourceContext &other)
    = default;
SourceContext &SourceContext::operator =(const SourceContext &other)
{
    SourceContext temp(other);
    swap(temp);
    return *this;
}
SourceContext::SourceContext(SourceContext &&other) noexcept
    = default;
SourceContext::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const SourceContext &lhs, const SourceContext &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_fileName == rhs.dptr->m_fileName;
}

const QString &SourceContext::fileName() const &
{
    return dptr->m_fileName;
}

void SourceContext::setFileName(const QString &fileName)
{
    if (dptr->m_fileName != fileName) {
        dptr.detach();
        dptr->m_fileName = fileName;
    }
}

void SourceContext::setFileName(QString &&fileName)
{
    if (dptr->m_fileName != fileName) {
        dptr.detach();
        dptr->m_fileName = std::move(fileName);
    }
}

} // namespace google::protobuf

#include "moc_source_context.qpb.cpp"
