2024-09-19 21:52:52 +00:00
|
|
|
/* This file is autogenerated. DO NOT CHANGE. All changes will be lost */
|
|
|
|
|
|
|
|
#ifndef QTPROTOBUFGEN_QPB_H
|
|
|
|
#define QTPROTOBUFGEN_QPB_H
|
|
|
|
|
|
|
|
#include <QtProtobuf/qprotobuflazymessagepointer.h>
|
|
|
|
#include <QtProtobuf/qprotobufmessage.h>
|
|
|
|
#include <QtProtobuf/qprotobufobject.h>
|
|
|
|
#include <QtProtobuf/qprotobufoneof.h>
|
|
|
|
#include <QtProtobuf/qtprotobuftypes.h>
|
|
|
|
|
|
|
|
#include <QtQml/qqmllist.h>
|
|
|
|
#include <QtQml/qqmlregistration.h>
|
|
|
|
|
|
|
|
#include <QtCore/qbytearray.h>
|
|
|
|
#include <QtCore/qlist.h>
|
|
|
|
#include <QtCore/qmetatype.h>
|
|
|
|
#include <QtCore/qshareddata.h>
|
|
|
|
#include <QtCore/qstring.h>
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
namespace qt::protobuf {
|
|
|
|
|
|
|
|
namespace GlobalEnumGadget {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(GlobalEnum)
|
|
|
|
|
|
|
|
enum class GlobalEnum : int32_t {
|
|
|
|
EnumValue1 = 0,
|
|
|
|
ENUMVALUE2 = 1,
|
|
|
|
enumValue3 = 2,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(GlobalEnum)
|
|
|
|
|
|
|
|
void registerTypes();
|
|
|
|
} // namespace GlobalEnumGadget
|
|
|
|
class EnumTypes;
|
|
|
|
namespace EnumTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
enum class NestedEnum : int32_t;
|
|
|
|
enum class FieldOneOfFields;
|
|
|
|
} // namespace EnumTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarTypes;
|
|
|
|
namespace ScalarTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
} // namespace ScalarTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarRepeatedTypes;
|
|
|
|
namespace ScalarRepeatedTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
} // namespace ScalarRepeatedTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarRepeatedNoPackedTypes;
|
|
|
|
namespace ScalarRepeatedNoPackedTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
} // namespace ScalarRepeatedNoPackedTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarOneOfTypes;
|
|
|
|
namespace ScalarOneOfTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
enum class FieldOneOfFields;
|
|
|
|
} // namespace ScalarOneOfTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarOptionalTypes;
|
|
|
|
namespace ScalarOptionalTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
} // namespace ScalarOptionalTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class MapScalarTypes;
|
|
|
|
namespace MapScalarTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
} // namespace MapScalarTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class MessageTypes;
|
|
|
|
namespace MessageTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
enum class FieldOneOfFields;
|
|
|
|
} // namespace MessageTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class MessageNestedTypes;
|
|
|
|
namespace MessageNestedTypes_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
class NestedMessage;
|
|
|
|
namespace NestedMessage_QtProtobufNested {
|
|
|
|
enum class QtProtobufFieldEnum;
|
|
|
|
} // namespace NestedMessage_QtProtobufNested
|
|
|
|
|
|
|
|
} // namespace MessageNestedTypes_QtProtobufNested
|
|
|
|
|
2024-10-03 13:22:24 +00:00
|
|
|
#ifdef QT_USE_PROTOBUF_LIST_ALIASES
|
|
|
|
using EnumTypesRepeated = QList<EnumTypes>;
|
|
|
|
using ScalarTypesRepeated = QList<ScalarTypes>;
|
|
|
|
using ScalarRepeatedTypesRepeated = QList<ScalarRepeatedTypes>;
|
|
|
|
using ScalarRepeatedNoPackedTypesRepeated = QList<ScalarRepeatedNoPackedTypes>;
|
|
|
|
using ScalarOneOfTypesRepeated = QList<ScalarOneOfTypes>;
|
|
|
|
using ScalarOptionalTypesRepeated = QList<ScalarOptionalTypes>;
|
|
|
|
using MapScalarTypesRepeated = QList<MapScalarTypes>;
|
|
|
|
using MessageTypesRepeated = QList<MessageTypes>;
|
|
|
|
using MessageNestedTypesRepeated = QList<MessageNestedTypes>;
|
|
|
|
#endif // QT_USE_PROTOBUF_LIST_ALIASES
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
class EnumTypes_QtProtobufData;
|
|
|
|
class EnumTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(enumTypes)
|
|
|
|
Q_PROPERTY(qt::protobuf::GlobalEnumGadget::GlobalEnum field1 READ field1 WRITE setField1 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(NestedEnum field2 READ field2 WRITE setField2 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::GlobalEnumGadget::GlobalEnum field3 READ field3_p WRITE setField3_p)
|
|
|
|
Q_PROPERTY(bool hasField3 READ hasField3)
|
|
|
|
Q_PROPERTY(NestedEnum field4 READ field4_p WRITE setField4_p)
|
|
|
|
Q_PROPERTY(bool hasField4 READ hasField4)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = EnumTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
using NestedEnum = EnumTypes_QtProtobufNested::NestedEnum;
|
|
|
|
using FieldOneOfFields = EnumTypes_QtProtobufNested::FieldOneOfFields;
|
|
|
|
EnumTypes();
|
|
|
|
~EnumTypes();
|
|
|
|
EnumTypes(const EnumTypes &other);
|
|
|
|
EnumTypes &operator =(const EnumTypes &other);
|
|
|
|
EnumTypes(EnumTypes &&other) noexcept;
|
|
|
|
EnumTypes &operator =(EnumTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(EnumTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
GlobalEnumGadget::GlobalEnum field1() const;
|
|
|
|
|
|
|
|
EnumTypes_QtProtobufNested::NestedEnum field2() const;
|
|
|
|
|
|
|
|
bool hasField3() const;
|
|
|
|
GlobalEnumGadget::GlobalEnum field3() const;
|
|
|
|
|
|
|
|
bool hasField4() const;
|
|
|
|
EnumTypes_QtProtobufNested::NestedEnum field4() const;
|
|
|
|
FieldOneOfFields fieldOneOfField() const;
|
|
|
|
void setField1(GlobalEnumGadget::GlobalEnum field1);
|
|
|
|
void setField2(EnumTypes_QtProtobufNested::NestedEnum field2);
|
|
|
|
void setField3(GlobalEnumGadget::GlobalEnum field3);
|
|
|
|
void setField4(EnumTypes_QtProtobufNested::NestedEnum field4);
|
|
|
|
Q_INVOKABLE void clearFieldOneOf();
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const EnumTypes &lhs, const EnumTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const EnumTypes &lhs, const EnumTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const EnumTypes &lhs, const EnumTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
GlobalEnumGadget::GlobalEnum field3_p() const;
|
|
|
|
EnumTypes_QtProtobufNested::NestedEnum field4_p() const;
|
|
|
|
void setField3_p(GlobalEnumGadget::GlobalEnum field3);
|
|
|
|
void setField4_p(EnumTypes_QtProtobufNested::NestedEnum field4);
|
|
|
|
QExplicitlySharedDataPointer<EnumTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace EnumTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(EnumTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
enum class NestedEnum : int32_t {
|
|
|
|
EnumValue1 = 0,
|
|
|
|
ENUMVALUE2 = 1,
|
|
|
|
enumValue3 = 2,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(NestedEnum)
|
|
|
|
|
|
|
|
enum class FieldOneOfFields : int32_t {
|
|
|
|
UninitializedField = QtProtobuf::InvalidFieldNumber,
|
|
|
|
Field3 = 3,
|
|
|
|
Field4 = 4,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(FieldOneOfFields)
|
|
|
|
|
|
|
|
} // namespace EnumTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarTypes_QtProtobufData;
|
|
|
|
class ScalarTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(scalarTypes)
|
|
|
|
Q_PROPERTY(QtProtobuf::int32 field1 READ field1 WRITE setField1 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint32 field2 READ field2 WRITE setField2 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint32 field3 READ field3 WRITE setField3 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed32 field4 READ field4 WRITE setField4 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed32 field5 READ field5 WRITE setField5 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::int64 field6 READ field6 WRITE setField6 SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint64 field7 READ field7 WRITE setField7 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint64 field8 READ field8 WRITE setField8 SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed64 field9 READ field9 WRITE setField9 SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed64 field10 READ field10 WRITE setField10 SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(float field11 READ field11 WRITE setField11 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(double field12 READ field12 WRITE setField12 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QString field13 READ field13 WRITE setField13 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QByteArray field14 READ field14 WRITE setField14 SCRIPTABLE true)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = ScalarTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
ScalarTypes();
|
|
|
|
~ScalarTypes();
|
|
|
|
ScalarTypes(const ScalarTypes &other);
|
|
|
|
ScalarTypes &operator =(const ScalarTypes &other);
|
|
|
|
ScalarTypes(ScalarTypes &&other) noexcept;
|
|
|
|
ScalarTypes &operator =(ScalarTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(ScalarTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
QtProtobuf::int32 field1() const;
|
|
|
|
|
|
|
|
QtProtobuf::uint32 field2() const;
|
|
|
|
|
|
|
|
QtProtobuf::sint32 field3() const;
|
|
|
|
|
|
|
|
QtProtobuf::fixed32 field4() const;
|
|
|
|
|
|
|
|
QtProtobuf::sfixed32 field5() const;
|
|
|
|
|
|
|
|
QtProtobuf::int64 field6() const;
|
|
|
|
|
|
|
|
QtProtobuf::uint64 field7() const;
|
|
|
|
|
|
|
|
QtProtobuf::sint64 field8() const;
|
|
|
|
|
|
|
|
QtProtobuf::fixed64 field9() const;
|
|
|
|
|
|
|
|
QtProtobuf::sfixed64 field10() const;
|
|
|
|
|
|
|
|
float field11() const;
|
|
|
|
|
|
|
|
double field12() const;
|
|
|
|
|
|
|
|
const QString &field13() const &;
|
|
|
|
|
|
|
|
const QByteArray &field14() const &;
|
|
|
|
void setField1(QtProtobuf::int32 field1);
|
|
|
|
void setField2(QtProtobuf::uint32 field2);
|
|
|
|
void setField3(QtProtobuf::sint32 field3);
|
|
|
|
void setField4(QtProtobuf::fixed32 field4);
|
|
|
|
void setField5(QtProtobuf::sfixed32 field5);
|
|
|
|
void setField6(QtProtobuf::int64 field6);
|
|
|
|
void setField7(QtProtobuf::uint64 field7);
|
|
|
|
void setField8(QtProtobuf::sint64 field8);
|
|
|
|
void setField9(QtProtobuf::fixed64 field9);
|
|
|
|
void setField10(QtProtobuf::sfixed64 field10);
|
|
|
|
void setField11(float field11);
|
|
|
|
void setField12(double field12);
|
|
|
|
void setField13(const QString &field13);
|
|
|
|
void setField13(QString &&field13);
|
|
|
|
void setField14(const QByteArray &field14);
|
|
|
|
void setField14(QByteArray &&field14);
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const ScalarTypes &lhs, const ScalarTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const ScalarTypes &lhs, const ScalarTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const ScalarTypes &lhs, const ScalarTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
QExplicitlySharedDataPointer<ScalarTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace ScalarTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(ScalarTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
Field5ProtoFieldNumber = 5,
|
|
|
|
Field6ProtoFieldNumber = 6,
|
|
|
|
Field7ProtoFieldNumber = 7,
|
|
|
|
Field8ProtoFieldNumber = 8,
|
|
|
|
Field9ProtoFieldNumber = 9,
|
|
|
|
Field10ProtoFieldNumber = 10,
|
|
|
|
Field11ProtoFieldNumber = 11,
|
|
|
|
Field12ProtoFieldNumber = 12,
|
|
|
|
Field13ProtoFieldNumber = 13,
|
|
|
|
Field14ProtoFieldNumber = 14,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
} // namespace ScalarTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarRepeatedTypes_QtProtobufData;
|
|
|
|
class ScalarRepeatedTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(scalarRepeatedTypes)
|
|
|
|
Q_PROPERTY(QtProtobuf::int32List field1 READ field1 WRITE setField1 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint32List field2 READ field2 WRITE setField2 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint32List field3 READ field3 WRITE setField3 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed32List field4 READ field4 WRITE setField4 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed32List field5 READ field5 WRITE setField5 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::int64List field6 READ field6 WRITE setField6 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint64List field7 READ field7 WRITE setField7 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint64List field8 READ field8 WRITE setField8 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed64List field9 READ field9 WRITE setField9 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed64List field10 READ field10 WRITE setField10 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::floatList field11 READ field11 WRITE setField11 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::doubleList field12 READ field12 WRITE setField12 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QStringList field13 READ field13 WRITE setField13 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QByteArrayList field14 READ field14 WRITE setField14 SCRIPTABLE true)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = ScalarRepeatedTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
ScalarRepeatedTypes();
|
|
|
|
~ScalarRepeatedTypes();
|
|
|
|
ScalarRepeatedTypes(const ScalarRepeatedTypes &other);
|
|
|
|
ScalarRepeatedTypes &operator =(const ScalarRepeatedTypes &other);
|
|
|
|
ScalarRepeatedTypes(ScalarRepeatedTypes &&other) noexcept;
|
|
|
|
ScalarRepeatedTypes &operator =(ScalarRepeatedTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(ScalarRepeatedTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
const QtProtobuf::int32List &field1() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::uint32List &field2() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sint32List &field3() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::fixed32List &field4() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sfixed32List &field5() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::int64List &field6() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::uint64List &field7() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sint64List &field8() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::fixed64List &field9() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sfixed64List &field10() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::floatList &field11() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::doubleList &field12() const &;
|
|
|
|
|
|
|
|
const QStringList &field13() const &;
|
|
|
|
|
|
|
|
const QByteArrayList &field14() const &;
|
|
|
|
void setField1(const QtProtobuf::int32List &field1);
|
|
|
|
void setField1(QtProtobuf::int32List &&field1);
|
|
|
|
void setField2(const QtProtobuf::uint32List &field2);
|
|
|
|
void setField2(QtProtobuf::uint32List &&field2);
|
|
|
|
void setField3(const QtProtobuf::sint32List &field3);
|
|
|
|
void setField3(QtProtobuf::sint32List &&field3);
|
|
|
|
void setField4(const QtProtobuf::fixed32List &field4);
|
|
|
|
void setField4(QtProtobuf::fixed32List &&field4);
|
|
|
|
void setField5(const QtProtobuf::sfixed32List &field5);
|
|
|
|
void setField5(QtProtobuf::sfixed32List &&field5);
|
|
|
|
void setField6(const QtProtobuf::int64List &field6);
|
|
|
|
void setField6(QtProtobuf::int64List &&field6);
|
|
|
|
void setField7(const QtProtobuf::uint64List &field7);
|
|
|
|
void setField7(QtProtobuf::uint64List &&field7);
|
|
|
|
void setField8(const QtProtobuf::sint64List &field8);
|
|
|
|
void setField8(QtProtobuf::sint64List &&field8);
|
|
|
|
void setField9(const QtProtobuf::fixed64List &field9);
|
|
|
|
void setField9(QtProtobuf::fixed64List &&field9);
|
|
|
|
void setField10(const QtProtobuf::sfixed64List &field10);
|
|
|
|
void setField10(QtProtobuf::sfixed64List &&field10);
|
|
|
|
void setField11(const QtProtobuf::floatList &field11);
|
|
|
|
void setField11(QtProtobuf::floatList &&field11);
|
|
|
|
void setField12(const QtProtobuf::doubleList &field12);
|
|
|
|
void setField12(QtProtobuf::doubleList &&field12);
|
|
|
|
void setField13(const QStringList &field13);
|
|
|
|
void setField13(QStringList &&field13);
|
|
|
|
void setField14(const QByteArrayList &field14);
|
|
|
|
void setField14(QByteArrayList &&field14);
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const ScalarRepeatedTypes &lhs, const ScalarRepeatedTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const ScalarRepeatedTypes &lhs, const ScalarRepeatedTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const ScalarRepeatedTypes &lhs, const ScalarRepeatedTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
QExplicitlySharedDataPointer<ScalarRepeatedTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace ScalarRepeatedTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(ScalarRepeatedTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
Field5ProtoFieldNumber = 5,
|
|
|
|
Field6ProtoFieldNumber = 6,
|
|
|
|
Field7ProtoFieldNumber = 7,
|
|
|
|
Field8ProtoFieldNumber = 8,
|
|
|
|
Field9ProtoFieldNumber = 9,
|
|
|
|
Field10ProtoFieldNumber = 10,
|
|
|
|
Field11ProtoFieldNumber = 11,
|
|
|
|
Field12ProtoFieldNumber = 12,
|
|
|
|
Field13ProtoFieldNumber = 13,
|
|
|
|
Field14ProtoFieldNumber = 14,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
} // namespace ScalarRepeatedTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarRepeatedNoPackedTypes_QtProtobufData;
|
|
|
|
class ScalarRepeatedNoPackedTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(scalarRepeatedNoPackedTypes)
|
|
|
|
Q_PROPERTY(QtProtobuf::int32List field1 READ field1 WRITE setField1 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint32List field2 READ field2 WRITE setField2 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint32List field3 READ field3 WRITE setField3 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed32List field4 READ field4 WRITE setField4 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed32List field5 READ field5 WRITE setField5 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::int64List field6 READ field6 WRITE setField6 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint64List field7 READ field7 WRITE setField7 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint64List field8 READ field8 WRITE setField8 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed64List field9 READ field9 WRITE setField9 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed64List field10 READ field10 WRITE setField10 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::floatList field11 READ field11 WRITE setField11 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QtProtobuf::doubleList field12 READ field12 WRITE setField12 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QStringList field13 READ field13 WRITE setField13 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(QByteArrayList field14 READ field14 WRITE setField14 SCRIPTABLE true)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = ScalarRepeatedNoPackedTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
ScalarRepeatedNoPackedTypes();
|
|
|
|
~ScalarRepeatedNoPackedTypes();
|
|
|
|
ScalarRepeatedNoPackedTypes(const ScalarRepeatedNoPackedTypes &other);
|
|
|
|
ScalarRepeatedNoPackedTypes &operator =(const ScalarRepeatedNoPackedTypes &other);
|
|
|
|
ScalarRepeatedNoPackedTypes(ScalarRepeatedNoPackedTypes &&other) noexcept;
|
|
|
|
ScalarRepeatedNoPackedTypes &operator =(ScalarRepeatedNoPackedTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(ScalarRepeatedNoPackedTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
const QtProtobuf::int32List &field1() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::uint32List &field2() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sint32List &field3() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::fixed32List &field4() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sfixed32List &field5() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::int64List &field6() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::uint64List &field7() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sint64List &field8() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::fixed64List &field9() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::sfixed64List &field10() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::floatList &field11() const &;
|
|
|
|
|
|
|
|
const QtProtobuf::doubleList &field12() const &;
|
|
|
|
|
|
|
|
const QStringList &field13() const &;
|
|
|
|
|
|
|
|
const QByteArrayList &field14() const &;
|
|
|
|
void setField1(const QtProtobuf::int32List &field1);
|
|
|
|
void setField1(QtProtobuf::int32List &&field1);
|
|
|
|
void setField2(const QtProtobuf::uint32List &field2);
|
|
|
|
void setField2(QtProtobuf::uint32List &&field2);
|
|
|
|
void setField3(const QtProtobuf::sint32List &field3);
|
|
|
|
void setField3(QtProtobuf::sint32List &&field3);
|
|
|
|
void setField4(const QtProtobuf::fixed32List &field4);
|
|
|
|
void setField4(QtProtobuf::fixed32List &&field4);
|
|
|
|
void setField5(const QtProtobuf::sfixed32List &field5);
|
|
|
|
void setField5(QtProtobuf::sfixed32List &&field5);
|
|
|
|
void setField6(const QtProtobuf::int64List &field6);
|
|
|
|
void setField6(QtProtobuf::int64List &&field6);
|
|
|
|
void setField7(const QtProtobuf::uint64List &field7);
|
|
|
|
void setField7(QtProtobuf::uint64List &&field7);
|
|
|
|
void setField8(const QtProtobuf::sint64List &field8);
|
|
|
|
void setField8(QtProtobuf::sint64List &&field8);
|
|
|
|
void setField9(const QtProtobuf::fixed64List &field9);
|
|
|
|
void setField9(QtProtobuf::fixed64List &&field9);
|
|
|
|
void setField10(const QtProtobuf::sfixed64List &field10);
|
|
|
|
void setField10(QtProtobuf::sfixed64List &&field10);
|
|
|
|
void setField11(const QtProtobuf::floatList &field11);
|
|
|
|
void setField11(QtProtobuf::floatList &&field11);
|
|
|
|
void setField12(const QtProtobuf::doubleList &field12);
|
|
|
|
void setField12(QtProtobuf::doubleList &&field12);
|
|
|
|
void setField13(const QStringList &field13);
|
|
|
|
void setField13(QStringList &&field13);
|
|
|
|
void setField14(const QByteArrayList &field14);
|
|
|
|
void setField14(QByteArrayList &&field14);
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const ScalarRepeatedNoPackedTypes &lhs, const ScalarRepeatedNoPackedTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const ScalarRepeatedNoPackedTypes &lhs, const ScalarRepeatedNoPackedTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const ScalarRepeatedNoPackedTypes &lhs, const ScalarRepeatedNoPackedTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
QExplicitlySharedDataPointer<ScalarRepeatedNoPackedTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace ScalarRepeatedNoPackedTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(ScalarRepeatedNoPackedTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
Field5ProtoFieldNumber = 5,
|
|
|
|
Field6ProtoFieldNumber = 6,
|
|
|
|
Field7ProtoFieldNumber = 7,
|
|
|
|
Field8ProtoFieldNumber = 8,
|
|
|
|
Field9ProtoFieldNumber = 9,
|
|
|
|
Field10ProtoFieldNumber = 10,
|
|
|
|
Field11ProtoFieldNumber = 11,
|
|
|
|
Field12ProtoFieldNumber = 12,
|
|
|
|
Field13ProtoFieldNumber = 13,
|
|
|
|
Field14ProtoFieldNumber = 14,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
} // namespace ScalarRepeatedNoPackedTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarOneOfTypes_QtProtobufData;
|
|
|
|
class ScalarOneOfTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(scalarOneOfTypes)
|
|
|
|
Q_PROPERTY(QtProtobuf::int32 field1 READ field1_p WRITE setField1_p)
|
|
|
|
Q_PROPERTY(bool hasField1 READ hasField1)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint32 field2 READ field2_p WRITE setField2_p)
|
|
|
|
Q_PROPERTY(bool hasField2 READ hasField2)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint32 field3 READ field3_p WRITE setField3_p)
|
|
|
|
Q_PROPERTY(bool hasField3 READ hasField3)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed32 field4 READ field4_p WRITE setField4_p)
|
|
|
|
Q_PROPERTY(bool hasField4 READ hasField4)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed32 field5 READ field5_p WRITE setField5_p)
|
|
|
|
Q_PROPERTY(bool hasField5 READ hasField5)
|
|
|
|
Q_PROPERTY(QtProtobuf::int64 field6 READ field6_p WRITE setField6_p)
|
|
|
|
Q_PROPERTY(bool hasField6 READ hasField6)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint64 field7 READ field7_p WRITE setField7_p)
|
|
|
|
Q_PROPERTY(bool hasField7 READ hasField7)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint64 field8 READ field8_p WRITE setField8_p)
|
|
|
|
Q_PROPERTY(bool hasField8 READ hasField8)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed64 field9 READ field9_p WRITE setField9_p)
|
|
|
|
Q_PROPERTY(bool hasField9 READ hasField9)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed64 field10 READ field10_p WRITE setField10_p)
|
|
|
|
Q_PROPERTY(bool hasField10 READ hasField10)
|
|
|
|
Q_PROPERTY(float field11 READ field11_p WRITE setField11_p)
|
|
|
|
Q_PROPERTY(bool hasField11 READ hasField11)
|
|
|
|
Q_PROPERTY(double field12 READ field12_p WRITE setField12_p)
|
|
|
|
Q_PROPERTY(bool hasField12 READ hasField12)
|
|
|
|
Q_PROPERTY(QString field13 READ field13_p WRITE setField13_p)
|
|
|
|
Q_PROPERTY(bool hasField13 READ hasField13)
|
|
|
|
Q_PROPERTY(QByteArray field14 READ field14_p WRITE setField14_p)
|
|
|
|
Q_PROPERTY(bool hasField14 READ hasField14)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = ScalarOneOfTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
using FieldOneOfFields = ScalarOneOfTypes_QtProtobufNested::FieldOneOfFields;
|
|
|
|
ScalarOneOfTypes();
|
|
|
|
~ScalarOneOfTypes();
|
|
|
|
ScalarOneOfTypes(const ScalarOneOfTypes &other);
|
|
|
|
ScalarOneOfTypes &operator =(const ScalarOneOfTypes &other);
|
|
|
|
ScalarOneOfTypes(ScalarOneOfTypes &&other) noexcept;
|
|
|
|
ScalarOneOfTypes &operator =(ScalarOneOfTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(ScalarOneOfTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
bool hasField1() const;
|
|
|
|
QtProtobuf::int32 field1() const;
|
|
|
|
|
|
|
|
bool hasField2() const;
|
|
|
|
QtProtobuf::uint32 field2() const;
|
|
|
|
|
|
|
|
bool hasField3() const;
|
|
|
|
QtProtobuf::sint32 field3() const;
|
|
|
|
|
|
|
|
bool hasField4() const;
|
|
|
|
QtProtobuf::fixed32 field4() const;
|
|
|
|
|
|
|
|
bool hasField5() const;
|
|
|
|
QtProtobuf::sfixed32 field5() const;
|
|
|
|
|
|
|
|
bool hasField6() const;
|
|
|
|
QtProtobuf::int64 field6() const;
|
|
|
|
|
|
|
|
bool hasField7() const;
|
|
|
|
QtProtobuf::uint64 field7() const;
|
|
|
|
|
|
|
|
bool hasField8() const;
|
|
|
|
QtProtobuf::sint64 field8() const;
|
|
|
|
|
|
|
|
bool hasField9() const;
|
|
|
|
QtProtobuf::fixed64 field9() const;
|
|
|
|
|
|
|
|
bool hasField10() const;
|
|
|
|
QtProtobuf::sfixed64 field10() const;
|
|
|
|
|
|
|
|
bool hasField11() const;
|
|
|
|
float field11() const;
|
|
|
|
|
|
|
|
bool hasField12() const;
|
|
|
|
double field12() const;
|
|
|
|
|
|
|
|
bool hasField13() const;
|
|
|
|
QString field13() const;
|
|
|
|
|
|
|
|
bool hasField14() const;
|
|
|
|
QByteArray field14() const;
|
|
|
|
FieldOneOfFields fieldOneOfField() const;
|
|
|
|
void setField1(QtProtobuf::int32 field1);
|
|
|
|
void setField2(QtProtobuf::uint32 field2);
|
|
|
|
void setField3(QtProtobuf::sint32 field3);
|
|
|
|
void setField4(QtProtobuf::fixed32 field4);
|
|
|
|
void setField5(QtProtobuf::sfixed32 field5);
|
|
|
|
void setField6(QtProtobuf::int64 field6);
|
|
|
|
void setField7(QtProtobuf::uint64 field7);
|
|
|
|
void setField8(QtProtobuf::sint64 field8);
|
|
|
|
void setField9(QtProtobuf::fixed64 field9);
|
|
|
|
void setField10(QtProtobuf::sfixed64 field10);
|
|
|
|
void setField11(float field11);
|
|
|
|
void setField12(double field12);
|
|
|
|
void setField13(const QString &field13);
|
|
|
|
void setField13(QString &&field13);
|
|
|
|
void setField14(const QByteArray &field14);
|
|
|
|
void setField14(QByteArray &&field14);
|
|
|
|
Q_INVOKABLE void clearFieldOneOf();
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const ScalarOneOfTypes &lhs, const ScalarOneOfTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const ScalarOneOfTypes &lhs, const ScalarOneOfTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const ScalarOneOfTypes &lhs, const ScalarOneOfTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
QtProtobuf::int32 field1_p() const;
|
|
|
|
QtProtobuf::uint32 field2_p() const;
|
|
|
|
QtProtobuf::sint32 field3_p() const;
|
|
|
|
QtProtobuf::fixed32 field4_p() const;
|
|
|
|
QtProtobuf::sfixed32 field5_p() const;
|
|
|
|
QtProtobuf::int64 field6_p() const;
|
|
|
|
QtProtobuf::uint64 field7_p() const;
|
|
|
|
QtProtobuf::sint64 field8_p() const;
|
|
|
|
QtProtobuf::fixed64 field9_p() const;
|
|
|
|
QtProtobuf::sfixed64 field10_p() const;
|
|
|
|
float field11_p() const;
|
|
|
|
double field12_p() const;
|
|
|
|
QString field13_p() const;
|
|
|
|
QByteArray field14_p() const;
|
|
|
|
void setField1_p(QtProtobuf::int32 field1);
|
|
|
|
void setField2_p(QtProtobuf::uint32 field2);
|
|
|
|
void setField3_p(QtProtobuf::sint32 field3);
|
|
|
|
void setField4_p(QtProtobuf::fixed32 field4);
|
|
|
|
void setField5_p(QtProtobuf::sfixed32 field5);
|
|
|
|
void setField6_p(QtProtobuf::int64 field6);
|
|
|
|
void setField7_p(QtProtobuf::uint64 field7);
|
|
|
|
void setField8_p(QtProtobuf::sint64 field8);
|
|
|
|
void setField9_p(QtProtobuf::fixed64 field9);
|
|
|
|
void setField10_p(QtProtobuf::sfixed64 field10);
|
|
|
|
void setField11_p(float field11);
|
|
|
|
void setField12_p(double field12);
|
|
|
|
void setField13_p(QString field13);
|
|
|
|
void setField14_p(QByteArray field14);
|
|
|
|
QExplicitlySharedDataPointer<ScalarOneOfTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace ScalarOneOfTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(ScalarOneOfTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
Field5ProtoFieldNumber = 5,
|
|
|
|
Field6ProtoFieldNumber = 6,
|
|
|
|
Field7ProtoFieldNumber = 7,
|
|
|
|
Field8ProtoFieldNumber = 8,
|
|
|
|
Field9ProtoFieldNumber = 9,
|
|
|
|
Field10ProtoFieldNumber = 10,
|
|
|
|
Field11ProtoFieldNumber = 11,
|
|
|
|
Field12ProtoFieldNumber = 12,
|
|
|
|
Field13ProtoFieldNumber = 13,
|
|
|
|
Field14ProtoFieldNumber = 14,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
enum class FieldOneOfFields : int32_t {
|
|
|
|
UninitializedField = QtProtobuf::InvalidFieldNumber,
|
|
|
|
Field1 = 1,
|
|
|
|
Field2 = 2,
|
|
|
|
Field3 = 3,
|
|
|
|
Field4 = 4,
|
|
|
|
Field5 = 5,
|
|
|
|
Field6 = 6,
|
|
|
|
Field7 = 7,
|
|
|
|
Field8 = 8,
|
|
|
|
Field9 = 9,
|
|
|
|
Field10 = 10,
|
|
|
|
Field11 = 11,
|
|
|
|
Field12 = 12,
|
|
|
|
Field13 = 13,
|
|
|
|
Field14 = 14,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(FieldOneOfFields)
|
|
|
|
|
|
|
|
} // namespace ScalarOneOfTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class ScalarOptionalTypes_QtProtobufData;
|
|
|
|
class ScalarOptionalTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(scalarOptionalTypes)
|
|
|
|
Q_PROPERTY(QtProtobuf::int32 field1 READ field1_p WRITE setField1_p)
|
|
|
|
Q_PROPERTY(bool hasField1 READ hasField1)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint32 field2 READ field2_p WRITE setField2_p)
|
|
|
|
Q_PROPERTY(bool hasField2 READ hasField2)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint32 field3 READ field3_p WRITE setField3_p)
|
|
|
|
Q_PROPERTY(bool hasField3 READ hasField3)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed32 field4 READ field4_p WRITE setField4_p)
|
|
|
|
Q_PROPERTY(bool hasField4 READ hasField4)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed32 field5 READ field5_p WRITE setField5_p)
|
|
|
|
Q_PROPERTY(bool hasField5 READ hasField5)
|
|
|
|
Q_PROPERTY(QtProtobuf::int64 field6 READ field6_p WRITE setField6_p)
|
|
|
|
Q_PROPERTY(bool hasField6 READ hasField6)
|
|
|
|
Q_PROPERTY(QtProtobuf::uint64 field7 READ field7_p WRITE setField7_p)
|
|
|
|
Q_PROPERTY(bool hasField7 READ hasField7)
|
|
|
|
Q_PROPERTY(QtProtobuf::sint64 field8 READ field8_p WRITE setField8_p)
|
|
|
|
Q_PROPERTY(bool hasField8 READ hasField8)
|
|
|
|
Q_PROPERTY(QtProtobuf::fixed64 field9 READ field9_p WRITE setField9_p)
|
|
|
|
Q_PROPERTY(bool hasField9 READ hasField9)
|
|
|
|
Q_PROPERTY(QtProtobuf::sfixed64 field10 READ field10_p WRITE setField10_p)
|
|
|
|
Q_PROPERTY(bool hasField10 READ hasField10)
|
|
|
|
Q_PROPERTY(float field11 READ field11_p WRITE setField11_p)
|
|
|
|
Q_PROPERTY(bool hasField11 READ hasField11)
|
|
|
|
Q_PROPERTY(double field12 READ field12_p WRITE setField12_p)
|
|
|
|
Q_PROPERTY(bool hasField12 READ hasField12)
|
|
|
|
Q_PROPERTY(QString field13 READ field13_p WRITE setField13_p)
|
|
|
|
Q_PROPERTY(bool hasField13 READ hasField13)
|
|
|
|
Q_PROPERTY(QByteArray field14 READ field14_p WRITE setField14_p)
|
|
|
|
Q_PROPERTY(bool hasField14 READ hasField14)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = ScalarOptionalTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
ScalarOptionalTypes();
|
|
|
|
~ScalarOptionalTypes();
|
|
|
|
ScalarOptionalTypes(const ScalarOptionalTypes &other);
|
|
|
|
ScalarOptionalTypes &operator =(const ScalarOptionalTypes &other);
|
|
|
|
ScalarOptionalTypes(ScalarOptionalTypes &&other) noexcept;
|
|
|
|
ScalarOptionalTypes &operator =(ScalarOptionalTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(ScalarOptionalTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
bool hasField1() const;
|
|
|
|
QtProtobuf::int32 field1() const;
|
|
|
|
|
|
|
|
bool hasField2() const;
|
|
|
|
QtProtobuf::uint32 field2() const;
|
|
|
|
|
|
|
|
bool hasField3() const;
|
|
|
|
QtProtobuf::sint32 field3() const;
|
|
|
|
|
|
|
|
bool hasField4() const;
|
|
|
|
QtProtobuf::fixed32 field4() const;
|
|
|
|
|
|
|
|
bool hasField5() const;
|
|
|
|
QtProtobuf::sfixed32 field5() const;
|
|
|
|
|
|
|
|
bool hasField6() const;
|
|
|
|
QtProtobuf::int64 field6() const;
|
|
|
|
|
|
|
|
bool hasField7() const;
|
|
|
|
QtProtobuf::uint64 field7() const;
|
|
|
|
|
|
|
|
bool hasField8() const;
|
|
|
|
QtProtobuf::sint64 field8() const;
|
|
|
|
|
|
|
|
bool hasField9() const;
|
|
|
|
QtProtobuf::fixed64 field9() const;
|
|
|
|
|
|
|
|
bool hasField10() const;
|
|
|
|
QtProtobuf::sfixed64 field10() const;
|
|
|
|
|
|
|
|
bool hasField11() const;
|
|
|
|
float field11() const;
|
|
|
|
|
|
|
|
bool hasField12() const;
|
|
|
|
double field12() const;
|
|
|
|
|
|
|
|
bool hasField13() const;
|
|
|
|
QString field13() const;
|
|
|
|
|
|
|
|
bool hasField14() const;
|
|
|
|
QByteArray field14() const;
|
|
|
|
void setField1(QtProtobuf::int32 field1);
|
|
|
|
Q_INVOKABLE void clearField1();
|
|
|
|
void setField2(QtProtobuf::uint32 field2);
|
|
|
|
Q_INVOKABLE void clearField2();
|
|
|
|
void setField3(QtProtobuf::sint32 field3);
|
|
|
|
Q_INVOKABLE void clearField3();
|
|
|
|
void setField4(QtProtobuf::fixed32 field4);
|
|
|
|
Q_INVOKABLE void clearField4();
|
|
|
|
void setField5(QtProtobuf::sfixed32 field5);
|
|
|
|
Q_INVOKABLE void clearField5();
|
|
|
|
void setField6(QtProtobuf::int64 field6);
|
|
|
|
Q_INVOKABLE void clearField6();
|
|
|
|
void setField7(QtProtobuf::uint64 field7);
|
|
|
|
Q_INVOKABLE void clearField7();
|
|
|
|
void setField8(QtProtobuf::sint64 field8);
|
|
|
|
Q_INVOKABLE void clearField8();
|
|
|
|
void setField9(QtProtobuf::fixed64 field9);
|
|
|
|
Q_INVOKABLE void clearField9();
|
|
|
|
void setField10(QtProtobuf::sfixed64 field10);
|
|
|
|
Q_INVOKABLE void clearField10();
|
|
|
|
void setField11(float field11);
|
|
|
|
Q_INVOKABLE void clearField11();
|
|
|
|
void setField12(double field12);
|
|
|
|
Q_INVOKABLE void clearField12();
|
|
|
|
void setField13(const QString &field13);
|
|
|
|
void setField13(QString &&field13);
|
|
|
|
Q_INVOKABLE void clearField13();
|
|
|
|
void setField14(const QByteArray &field14);
|
|
|
|
void setField14(QByteArray &&field14);
|
|
|
|
Q_INVOKABLE void clearField14();
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const ScalarOptionalTypes &lhs, const ScalarOptionalTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const ScalarOptionalTypes &lhs, const ScalarOptionalTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const ScalarOptionalTypes &lhs, const ScalarOptionalTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
QtProtobuf::int32 field1_p() const;
|
|
|
|
QtProtobuf::uint32 field2_p() const;
|
|
|
|
QtProtobuf::sint32 field3_p() const;
|
|
|
|
QtProtobuf::fixed32 field4_p() const;
|
|
|
|
QtProtobuf::sfixed32 field5_p() const;
|
|
|
|
QtProtobuf::int64 field6_p() const;
|
|
|
|
QtProtobuf::uint64 field7_p() const;
|
|
|
|
QtProtobuf::sint64 field8_p() const;
|
|
|
|
QtProtobuf::fixed64 field9_p() const;
|
|
|
|
QtProtobuf::sfixed64 field10_p() const;
|
|
|
|
float field11_p() const;
|
|
|
|
double field12_p() const;
|
|
|
|
QString field13_p() const;
|
|
|
|
QByteArray field14_p() const;
|
|
|
|
void setField1_p(QtProtobuf::int32 field1);
|
|
|
|
void setField2_p(QtProtobuf::uint32 field2);
|
|
|
|
void setField3_p(QtProtobuf::sint32 field3);
|
|
|
|
void setField4_p(QtProtobuf::fixed32 field4);
|
|
|
|
void setField5_p(QtProtobuf::sfixed32 field5);
|
|
|
|
void setField6_p(QtProtobuf::int64 field6);
|
|
|
|
void setField7_p(QtProtobuf::uint64 field7);
|
|
|
|
void setField8_p(QtProtobuf::sint64 field8);
|
|
|
|
void setField9_p(QtProtobuf::fixed64 field9);
|
|
|
|
void setField10_p(QtProtobuf::sfixed64 field10);
|
|
|
|
void setField11_p(float field11);
|
|
|
|
void setField12_p(double field12);
|
|
|
|
void setField13_p(QString field13);
|
|
|
|
void setField14_p(QByteArray field14);
|
|
|
|
QExplicitlySharedDataPointer<ScalarOptionalTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace ScalarOptionalTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(ScalarOptionalTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
Field5ProtoFieldNumber = 5,
|
|
|
|
Field6ProtoFieldNumber = 6,
|
|
|
|
Field7ProtoFieldNumber = 7,
|
|
|
|
Field8ProtoFieldNumber = 8,
|
|
|
|
Field9ProtoFieldNumber = 9,
|
|
|
|
Field10ProtoFieldNumber = 10,
|
|
|
|
Field11ProtoFieldNumber = 11,
|
|
|
|
Field12ProtoFieldNumber = 12,
|
|
|
|
Field13ProtoFieldNumber = 13,
|
|
|
|
Field14ProtoFieldNumber = 14,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
} // namespace ScalarOptionalTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class MapScalarTypes_QtProtobufData;
|
|
|
|
class MapScalarTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(mapScalarTypes)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field1Entry field1 READ field1 WRITE setField1 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field2Entry field2 READ field2 WRITE setField2 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field3Entry field3 READ field3 WRITE setField3 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field4Entry field4 READ field4 WRITE setField4 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field5Entry field5 READ field5 WRITE setField5 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field6Entry field6 READ field6 WRITE setField6 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field7Entry field7 READ field7 WRITE setField7 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field8Entry field8 READ field8 WRITE setField8 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field9Entry field9 READ field9 WRITE setField9 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field10Entry field10 READ field10 WRITE setField10 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MapScalarTypes::Field11Entry field11 READ field11 WRITE setField11 SCRIPTABLE true)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = MapScalarTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
using Field1Entry = QHash<QtProtobuf::int32, QtProtobuf::int64>;
|
|
|
|
using Field2Entry = QHash<QtProtobuf::int64, QtProtobuf::sint32>;
|
|
|
|
using Field3Entry = QHash<QtProtobuf::sint32, QtProtobuf::sint64>;
|
|
|
|
using Field4Entry = QHash<QtProtobuf::sint64, QtProtobuf::uint32>;
|
|
|
|
using Field5Entry = QHash<QtProtobuf::uint32, QtProtobuf::uint64>;
|
|
|
|
using Field6Entry = QHash<QtProtobuf::uint64, QtProtobuf::fixed32>;
|
|
|
|
using Field7Entry = QHash<QtProtobuf::fixed32, QtProtobuf::fixed64>;
|
|
|
|
using Field8Entry = QHash<QtProtobuf::fixed64, QtProtobuf::sfixed32>;
|
|
|
|
using Field9Entry = QHash<QtProtobuf::sfixed32, QtProtobuf::sfixed64>;
|
|
|
|
using Field10Entry = QHash<QtProtobuf::sfixed64, QString>;
|
|
|
|
using Field11Entry = QHash<QString, QtProtobuf::int32>;
|
|
|
|
MapScalarTypes();
|
|
|
|
~MapScalarTypes();
|
|
|
|
MapScalarTypes(const MapScalarTypes &other);
|
|
|
|
MapScalarTypes &operator =(const MapScalarTypes &other);
|
|
|
|
MapScalarTypes(MapScalarTypes &&other) noexcept;
|
|
|
|
MapScalarTypes &operator =(MapScalarTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(MapScalarTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
const MapScalarTypes::Field1Entry &field1() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field2Entry &field2() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field3Entry &field3() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field4Entry &field4() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field5Entry &field5() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field6Entry &field6() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field7Entry &field7() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field8Entry &field8() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field9Entry &field9() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field10Entry &field10() const &;
|
|
|
|
|
|
|
|
const MapScalarTypes::Field11Entry &field11() const &;
|
|
|
|
void setField1(const MapScalarTypes::Field1Entry &field1);
|
|
|
|
void setField1(MapScalarTypes::Field1Entry &&field1);
|
|
|
|
void setField2(const MapScalarTypes::Field2Entry &field2);
|
|
|
|
void setField2(MapScalarTypes::Field2Entry &&field2);
|
|
|
|
void setField3(const MapScalarTypes::Field3Entry &field3);
|
|
|
|
void setField3(MapScalarTypes::Field3Entry &&field3);
|
|
|
|
void setField4(const MapScalarTypes::Field4Entry &field4);
|
|
|
|
void setField4(MapScalarTypes::Field4Entry &&field4);
|
|
|
|
void setField5(const MapScalarTypes::Field5Entry &field5);
|
|
|
|
void setField5(MapScalarTypes::Field5Entry &&field5);
|
|
|
|
void setField6(const MapScalarTypes::Field6Entry &field6);
|
|
|
|
void setField6(MapScalarTypes::Field6Entry &&field6);
|
|
|
|
void setField7(const MapScalarTypes::Field7Entry &field7);
|
|
|
|
void setField7(MapScalarTypes::Field7Entry &&field7);
|
|
|
|
void setField8(const MapScalarTypes::Field8Entry &field8);
|
|
|
|
void setField8(MapScalarTypes::Field8Entry &&field8);
|
|
|
|
void setField9(const MapScalarTypes::Field9Entry &field9);
|
|
|
|
void setField9(MapScalarTypes::Field9Entry &&field9);
|
|
|
|
void setField10(const MapScalarTypes::Field10Entry &field10);
|
|
|
|
void setField10(MapScalarTypes::Field10Entry &&field10);
|
|
|
|
void setField11(const MapScalarTypes::Field11Entry &field11);
|
|
|
|
void setField11(MapScalarTypes::Field11Entry &&field11);
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const MapScalarTypes &lhs, const MapScalarTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const MapScalarTypes &lhs, const MapScalarTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const MapScalarTypes &lhs, const MapScalarTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
QExplicitlySharedDataPointer<MapScalarTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace MapScalarTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(MapScalarTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
Field5ProtoFieldNumber = 5,
|
|
|
|
Field6ProtoFieldNumber = 6,
|
|
|
|
Field7ProtoFieldNumber = 7,
|
|
|
|
Field8ProtoFieldNumber = 8,
|
|
|
|
Field9ProtoFieldNumber = 9,
|
|
|
|
Field10ProtoFieldNumber = 10,
|
|
|
|
Field11ProtoFieldNumber = 11,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
} // namespace MapScalarTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class MessageTypes_QtProtobufData;
|
|
|
|
class MessageTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(messageTypes)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarTypes *field1_p READ field1_p WRITE setField1_p SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(bool hasField1 READ hasField1)
|
2024-10-03 13:22:24 +00:00
|
|
|
Q_PROPERTY(QList<qt::protobuf::ScalarTypes> field2Data READ field2 WRITE setField2 SCRIPTABLE true)
|
2024-09-19 21:52:52 +00:00
|
|
|
Q_PROPERTY(qt::protobuf::ScalarTypes *field3_p READ field3_p WRITE setField3_p SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(bool hasField3 READ hasField3)
|
|
|
|
Q_PROPERTY(qt::protobuf::EnumTypes::NestedEnum field4 READ field4 WRITE setField4 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MessageTypes::Field5Entry field5 READ field5 WRITE setField5 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarTypes *field6_p READ field6_p WRITE setField6_p SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(bool hasField6 READ hasField6)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarRepeatedTypes *field7_p READ field7_p WRITE setField7_p SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(bool hasField7 READ hasField7)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarOneOfTypes *field8_p READ field8_p WRITE setField8_p SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(bool hasField8 READ hasField8)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarTypes field1 READ field1 WRITE setField1)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarTypes field3 READ field3 WRITE setField3)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarTypes field6 READ field6 WRITE setField6)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarRepeatedTypes field7 READ field7 WRITE setField7)
|
|
|
|
Q_PROPERTY(qt::protobuf::ScalarOneOfTypes field8 READ field8 WRITE setField8)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = MessageTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
using FieldOneOfFields = MessageTypes_QtProtobufNested::FieldOneOfFields;
|
|
|
|
using Field5Entry = QHash<QtProtobuf::int32, ScalarTypes>;
|
|
|
|
MessageTypes();
|
|
|
|
~MessageTypes();
|
|
|
|
MessageTypes(const MessageTypes &other);
|
|
|
|
MessageTypes &operator =(const MessageTypes &other);
|
|
|
|
MessageTypes(MessageTypes &&other) noexcept;
|
|
|
|
MessageTypes &operator =(MessageTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(MessageTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
bool hasField1() const;
|
|
|
|
const ScalarTypes &field1() const &;
|
Long live mutable getters
The functionality is desirable by some users, we re-enable it.
New API addresses the core issue that is partially related to
QTBUG-119912, but has wider concequences in blind use in user
projects. We add the 'mut' prefix to all mutable getters to make
the mutable access explicit. Overload approach leads to unwanted
detaches not only whe is used be moc-generated code, but also
in user projects if developers do not pay enough attention to
const modifiers of their variables/references. We declined to
restore it, dispite it was the better looking API, in favor to
the code safety.
This also reveals the code clashing scenario, when the overload
might happen if the message has both 'a' and 'mutA' fields in
its definition. This scenario is kindly forbidden by our generator,
and sanitized at very early stages. We expect that it won't happen
in user projects, but even if it will, the solution is to rename
the field when generating Qt code. The serialization/deserialization
do not depend on field naming directly. json_name attribute also
will help to workaround this.
The undocumented ALLOW_MUTABLE_GETTER_CONFLICTS option allows clashing
the mutable getter names, but its usage currently limited by our
internal code only. The reason unfixed QTBUG-119912 issue in moc.
Once the issue is fixed, the moc version check should get the proper
version, but not '99' as for now and the ALLOW_MUTABLE_GETTER_CONFLICTS
will become public.
Another design solution is the use of overloaded functions that
return pointers, like it's done it the reference protobuf. But this
kind of API leaves the pointer ownership undefined and decided to
not be used.
[ChangeLog][Protobuf] The generated messages now have the mutable
getters for the fiels of the message type. The getters have 'mut'
prefix and implicily allocate the respective fields if needed, so the
use of intermediate message objects is not required.
Task-number: QTBUG-119913
Change-Id: I09b9ee37e1fbbe37b9c3cb501e92442da8ad3e4b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-14 11:40:54 +00:00
|
|
|
ScalarTypes &mutField1() &;
|
2024-09-19 21:52:52 +00:00
|
|
|
Q_INVOKABLE void clearField1();
|
|
|
|
|
2024-10-03 13:22:24 +00:00
|
|
|
const QList<ScalarTypes> &field2() const &;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
bool hasField3() const;
|
|
|
|
const ScalarTypes &field3() const &;
|
Long live mutable getters
The functionality is desirable by some users, we re-enable it.
New API addresses the core issue that is partially related to
QTBUG-119912, but has wider concequences in blind use in user
projects. We add the 'mut' prefix to all mutable getters to make
the mutable access explicit. Overload approach leads to unwanted
detaches not only whe is used be moc-generated code, but also
in user projects if developers do not pay enough attention to
const modifiers of their variables/references. We declined to
restore it, dispite it was the better looking API, in favor to
the code safety.
This also reveals the code clashing scenario, when the overload
might happen if the message has both 'a' and 'mutA' fields in
its definition. This scenario is kindly forbidden by our generator,
and sanitized at very early stages. We expect that it won't happen
in user projects, but even if it will, the solution is to rename
the field when generating Qt code. The serialization/deserialization
do not depend on field naming directly. json_name attribute also
will help to workaround this.
The undocumented ALLOW_MUTABLE_GETTER_CONFLICTS option allows clashing
the mutable getter names, but its usage currently limited by our
internal code only. The reason unfixed QTBUG-119912 issue in moc.
Once the issue is fixed, the moc version check should get the proper
version, but not '99' as for now and the ALLOW_MUTABLE_GETTER_CONFLICTS
will become public.
Another design solution is the use of overloaded functions that
return pointers, like it's done it the reference protobuf. But this
kind of API leaves the pointer ownership undefined and decided to
not be used.
[ChangeLog][Protobuf] The generated messages now have the mutable
getters for the fiels of the message type. The getters have 'mut'
prefix and implicily allocate the respective fields if needed, so the
use of intermediate message objects is not required.
Task-number: QTBUG-119913
Change-Id: I09b9ee37e1fbbe37b9c3cb501e92442da8ad3e4b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-14 11:40:54 +00:00
|
|
|
ScalarTypes &mutField3() &;
|
2024-09-19 21:52:52 +00:00
|
|
|
Q_INVOKABLE void clearField3();
|
|
|
|
|
|
|
|
EnumTypes_QtProtobufNested::NestedEnum field4() const;
|
|
|
|
|
|
|
|
const MessageTypes::Field5Entry &field5() const &;
|
|
|
|
|
|
|
|
bool hasField6() const;
|
|
|
|
ScalarTypes &field6() const;
|
|
|
|
|
|
|
|
bool hasField7() const;
|
|
|
|
ScalarRepeatedTypes &field7() const;
|
|
|
|
|
|
|
|
bool hasField8() const;
|
|
|
|
ScalarOneOfTypes &field8() const;
|
|
|
|
FieldOneOfFields fieldOneOfField() const;
|
|
|
|
void setField1(const ScalarTypes &field1);
|
|
|
|
void setField1(ScalarTypes &&field1);
|
2024-10-03 13:22:24 +00:00
|
|
|
void setField2(const QList<ScalarTypes> &field2);
|
|
|
|
void setField2(QList<ScalarTypes> &&field2);
|
2024-09-19 21:52:52 +00:00
|
|
|
void setField3(const ScalarTypes &field3);
|
|
|
|
void setField3(ScalarTypes &&field3);
|
|
|
|
void setField4(EnumTypes_QtProtobufNested::NestedEnum field4);
|
|
|
|
void setField5(const MessageTypes::Field5Entry &field5);
|
|
|
|
void setField5(MessageTypes::Field5Entry &&field5);
|
|
|
|
void setField6(const ScalarTypes &field6);
|
|
|
|
void setField6(ScalarTypes &&field6);
|
|
|
|
void setField7(const ScalarRepeatedTypes &field7);
|
|
|
|
void setField7(ScalarRepeatedTypes &&field7);
|
|
|
|
void setField8(const ScalarOneOfTypes &field8);
|
|
|
|
void setField8(ScalarOneOfTypes &&field8);
|
|
|
|
Q_INVOKABLE void clearFieldOneOf();
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const MessageTypes &lhs, const MessageTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const MessageTypes &lhs, const MessageTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const MessageTypes &lhs, const MessageTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
ScalarTypes *field1_p();
|
|
|
|
ScalarTypes *field3_p();
|
|
|
|
ScalarTypes *field6_p();
|
|
|
|
ScalarRepeatedTypes *field7_p();
|
|
|
|
ScalarOneOfTypes *field8_p();
|
|
|
|
void setField1_p(ScalarTypes *field1);
|
|
|
|
void setField3_p(ScalarTypes *field3);
|
|
|
|
void setField6_p(ScalarTypes *field6);
|
|
|
|
void setField7_p(ScalarRepeatedTypes *field7);
|
|
|
|
void setField8_p(ScalarOneOfTypes *field8);
|
|
|
|
QExplicitlySharedDataPointer<MessageTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace MessageTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(MessageTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
Field3ProtoFieldNumber = 3,
|
|
|
|
Field4ProtoFieldNumber = 4,
|
|
|
|
Field5ProtoFieldNumber = 5,
|
|
|
|
Field6ProtoFieldNumber = 6,
|
|
|
|
Field7ProtoFieldNumber = 7,
|
|
|
|
Field8ProtoFieldNumber = 8,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
enum class FieldOneOfFields : int32_t {
|
|
|
|
UninitializedField = QtProtobuf::InvalidFieldNumber,
|
|
|
|
Field6 = 6,
|
|
|
|
Field7 = 7,
|
|
|
|
Field8 = 8,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(FieldOneOfFields)
|
|
|
|
|
|
|
|
} // namespace MessageTypes_QtProtobufNested
|
|
|
|
|
|
|
|
class MessageNestedTypes_QtProtobufData;
|
|
|
|
class MessageNestedTypes : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(messageNestedTypes)
|
|
|
|
Q_PROPERTY(qt::protobuf::MessageNestedTypes::NestedMessage *field1_p READ field1_p WRITE setField1_p SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(bool hasField1 READ hasField1)
|
|
|
|
Q_PROPERTY(qt::protobuf::MessageNestedTypes::NestedMessage field1 READ field1 WRITE setField1)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = MessageNestedTypes_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
using NestedMessage = MessageNestedTypes_QtProtobufNested::NestedMessage;
|
|
|
|
MessageNestedTypes();
|
|
|
|
~MessageNestedTypes();
|
|
|
|
MessageNestedTypes(const MessageNestedTypes &other);
|
|
|
|
MessageNestedTypes &operator =(const MessageNestedTypes &other);
|
|
|
|
MessageNestedTypes(MessageNestedTypes &&other) noexcept;
|
|
|
|
MessageNestedTypes &operator =(MessageNestedTypes &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(MessageNestedTypes &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
bool hasField1() const;
|
|
|
|
const MessageNestedTypes_QtProtobufNested::NestedMessage &field1() const &;
|
Long live mutable getters
The functionality is desirable by some users, we re-enable it.
New API addresses the core issue that is partially related to
QTBUG-119912, but has wider concequences in blind use in user
projects. We add the 'mut' prefix to all mutable getters to make
the mutable access explicit. Overload approach leads to unwanted
detaches not only whe is used be moc-generated code, but also
in user projects if developers do not pay enough attention to
const modifiers of their variables/references. We declined to
restore it, dispite it was the better looking API, in favor to
the code safety.
This also reveals the code clashing scenario, when the overload
might happen if the message has both 'a' and 'mutA' fields in
its definition. This scenario is kindly forbidden by our generator,
and sanitized at very early stages. We expect that it won't happen
in user projects, but even if it will, the solution is to rename
the field when generating Qt code. The serialization/deserialization
do not depend on field naming directly. json_name attribute also
will help to workaround this.
The undocumented ALLOW_MUTABLE_GETTER_CONFLICTS option allows clashing
the mutable getter names, but its usage currently limited by our
internal code only. The reason unfixed QTBUG-119912 issue in moc.
Once the issue is fixed, the moc version check should get the proper
version, but not '99' as for now and the ALLOW_MUTABLE_GETTER_CONFLICTS
will become public.
Another design solution is the use of overloaded functions that
return pointers, like it's done it the reference protobuf. But this
kind of API leaves the pointer ownership undefined and decided to
not be used.
[ChangeLog][Protobuf] The generated messages now have the mutable
getters for the fiels of the message type. The getters have 'mut'
prefix and implicily allocate the respective fields if needed, so the
use of intermediate message objects is not required.
Task-number: QTBUG-119913
Change-Id: I09b9ee37e1fbbe37b9c3cb501e92442da8ad3e4b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-14 11:40:54 +00:00
|
|
|
MessageNestedTypes_QtProtobufNested::NestedMessage &mutField1() &;
|
2024-09-19 21:52:52 +00:00
|
|
|
Q_INVOKABLE void clearField1();
|
|
|
|
void setField1(const MessageNestedTypes_QtProtobufNested::NestedMessage &field1);
|
|
|
|
void setField1(MessageNestedTypes_QtProtobufNested::NestedMessage &&field1);
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const MessageNestedTypes &lhs, const MessageNestedTypes &rhs) noexcept;
|
|
|
|
friend bool operator==(const MessageNestedTypes &lhs, const MessageNestedTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const MessageNestedTypes &lhs, const MessageNestedTypes &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
MessageNestedTypes_QtProtobufNested::NestedMessage *field1_p();
|
|
|
|
void setField1_p(MessageNestedTypes_QtProtobufNested::NestedMessage *field1);
|
|
|
|
QExplicitlySharedDataPointer<MessageNestedTypes_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace MessageNestedTypes_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(MessageNestedTypes)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
|
|
|
|
class NestedMessage_QtProtobufData;
|
|
|
|
class NestedMessage : public QProtobufMessage
|
|
|
|
{
|
|
|
|
Q_PROTOBUF_OBJECT
|
|
|
|
QML_VALUE_TYPE(nestedMessage)
|
|
|
|
Q_PROPERTY(QtProtobuf::int32 field1 READ field1 WRITE setField1 SCRIPTABLE true)
|
|
|
|
Q_PROPERTY(qt::protobuf::MessageTypes *field2_p READ field2_p WRITE setField2_p SCRIPTABLE false)
|
|
|
|
Q_PROPERTY(bool hasField2 READ hasField2)
|
|
|
|
Q_PROPERTY(qt::protobuf::MessageTypes field2 READ field2 WRITE setField2)
|
|
|
|
|
|
|
|
public:
|
|
|
|
using QtProtobufFieldEnum = NestedMessage_QtProtobufNested::QtProtobufFieldEnum;
|
|
|
|
NestedMessage();
|
|
|
|
~NestedMessage();
|
|
|
|
NestedMessage(const NestedMessage &other);
|
|
|
|
NestedMessage &operator =(const NestedMessage &other);
|
|
|
|
NestedMessage(NestedMessage &&other) noexcept;
|
|
|
|
NestedMessage &operator =(NestedMessage &&other) noexcept
|
|
|
|
{
|
|
|
|
swap(other);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void swap(NestedMessage &other) noexcept
|
|
|
|
{
|
|
|
|
QProtobufMessage::swap(other);
|
|
|
|
dptr.swap(other.dptr);
|
|
|
|
}
|
2024-10-15 11:42:44 +00:00
|
|
|
Q_IMPLICIT operator QVariant() const;
|
2024-09-19 21:52:52 +00:00
|
|
|
|
|
|
|
QtProtobuf::int32 field1() const;
|
|
|
|
|
|
|
|
bool hasField2() const;
|
|
|
|
const MessageTypes &field2() const &;
|
Long live mutable getters
The functionality is desirable by some users, we re-enable it.
New API addresses the core issue that is partially related to
QTBUG-119912, but has wider concequences in blind use in user
projects. We add the 'mut' prefix to all mutable getters to make
the mutable access explicit. Overload approach leads to unwanted
detaches not only whe is used be moc-generated code, but also
in user projects if developers do not pay enough attention to
const modifiers of their variables/references. We declined to
restore it, dispite it was the better looking API, in favor to
the code safety.
This also reveals the code clashing scenario, when the overload
might happen if the message has both 'a' and 'mutA' fields in
its definition. This scenario is kindly forbidden by our generator,
and sanitized at very early stages. We expect that it won't happen
in user projects, but even if it will, the solution is to rename
the field when generating Qt code. The serialization/deserialization
do not depend on field naming directly. json_name attribute also
will help to workaround this.
The undocumented ALLOW_MUTABLE_GETTER_CONFLICTS option allows clashing
the mutable getter names, but its usage currently limited by our
internal code only. The reason unfixed QTBUG-119912 issue in moc.
Once the issue is fixed, the moc version check should get the proper
version, but not '99' as for now and the ALLOW_MUTABLE_GETTER_CONFLICTS
will become public.
Another design solution is the use of overloaded functions that
return pointers, like it's done it the reference protobuf. But this
kind of API leaves the pointer ownership undefined and decided to
not be used.
[ChangeLog][Protobuf] The generated messages now have the mutable
getters for the fiels of the message type. The getters have 'mut'
prefix and implicily allocate the respective fields if needed, so the
use of intermediate message objects is not required.
Task-number: QTBUG-119913
Change-Id: I09b9ee37e1fbbe37b9c3cb501e92442da8ad3e4b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-14 11:40:54 +00:00
|
|
|
MessageTypes &mutField2() &;
|
2024-09-19 21:52:52 +00:00
|
|
|
Q_INVOKABLE void clearField2();
|
|
|
|
void setField1(QtProtobuf::int32 field1);
|
|
|
|
void setField2(const MessageTypes &field2);
|
|
|
|
void setField2(MessageTypes &&field2);
|
|
|
|
static void registerTypes();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend bool comparesEqual(const NestedMessage &lhs, const NestedMessage &rhs) noexcept;
|
|
|
|
friend bool operator==(const NestedMessage &lhs, const NestedMessage &rhs) noexcept
|
|
|
|
{
|
|
|
|
return comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
friend bool operator!=(const NestedMessage &lhs, const NestedMessage &rhs) noexcept
|
|
|
|
{
|
|
|
|
return !comparesEqual(lhs, rhs);
|
|
|
|
}
|
|
|
|
MessageTypes *field2_p();
|
|
|
|
void setField2_p(MessageTypes *field2);
|
|
|
|
QExplicitlySharedDataPointer<NestedMessage_QtProtobufData> dptr;
|
|
|
|
};
|
|
|
|
namespace NestedMessage_QtProtobufNested {
|
|
|
|
Q_NAMESPACE
|
|
|
|
QML_NAMED_ELEMENT(NestedMessage)
|
|
|
|
|
|
|
|
enum class QtProtobufFieldEnum {
|
|
|
|
Field1ProtoFieldNumber = 1,
|
|
|
|
Field2ProtoFieldNumber = 2,
|
|
|
|
};
|
|
|
|
Q_ENUM_NS(QtProtobufFieldEnum)
|
|
|
|
|
|
|
|
} // namespace NestedMessage_QtProtobufNested
|
|
|
|
} // namespace MessageNestedTypes_QtProtobufNested
|
|
|
|
} // namespace qt::protobuf
|
|
|
|
|
|
|
|
#endif // QTPROTOBUFGEN_QPB_H
|