123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/unittest_preserve_unknown_enum.proto
- #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto
- #define PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto
- #include <string>
- #include <google/protobuf/stubs/common.h>
- #if GOOGLE_PROTOBUF_VERSION < 3006001
- #error This file was generated by a newer version of protoc which is
- #error incompatible with your Protocol Buffer headers. Please update
- #error your headers.
- #endif
- #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
- #error This file was generated by an older version of protoc which is
- #error incompatible with your Protocol Buffer headers. Please
- #error regenerate this file with a newer version of protoc.
- #endif
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/arena.h>
- #include <google/protobuf/arenastring.h>
- #include <google/protobuf/generated_message_table_driven.h>
- #include <google/protobuf/generated_message_util.h>
- #include <google/protobuf/inlined_string_field.h>
- #include <google/protobuf/metadata.h>
- #include <google/protobuf/message.h>
- #include <google/protobuf/repeated_field.h> // IWYU pragma: export
- #include <google/protobuf/extension_set.h> // IWYU pragma: export
- #include <google/protobuf/generated_enum_reflection.h>
- #include <google/protobuf/unknown_field_set.h>
- // @@protoc_insertion_point(includes)
- #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto
- namespace protobuf_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto {
- // Internal implementation detail -- do not use these members.
- struct TableStruct {
- static const ::google::protobuf::internal::ParseTableField entries[];
- static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
- static const ::google::protobuf::internal::ParseTable schema[2];
- static const ::google::protobuf::internal::FieldMetadata field_metadata[];
- static const ::google::protobuf::internal::SerializationTable serialization_table[];
- static const ::google::protobuf::uint32 offsets[];
- };
- void AddDescriptors();
- } // namespace protobuf_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto
- namespace proto3_preserve_unknown_enum_unittest {
- class MyMessage;
- class MyMessageDefaultTypeInternal;
- extern MyMessageDefaultTypeInternal _MyMessage_default_instance_;
- class MyMessagePlusExtra;
- class MyMessagePlusExtraDefaultTypeInternal;
- extern MyMessagePlusExtraDefaultTypeInternal _MyMessagePlusExtra_default_instance_;
- } // namespace proto3_preserve_unknown_enum_unittest
- namespace google {
- namespace protobuf {
- template<> ::proto3_preserve_unknown_enum_unittest::MyMessage* Arena::CreateMaybeMessage<::proto3_preserve_unknown_enum_unittest::MyMessage>(Arena*);
- template<> ::proto3_preserve_unknown_enum_unittest::MyMessagePlusExtra* Arena::CreateMaybeMessage<::proto3_preserve_unknown_enum_unittest::MyMessagePlusExtra>(Arena*);
- } // namespace protobuf
- } // namespace google
- namespace proto3_preserve_unknown_enum_unittest {
- enum MyEnum {
- FOO = 0,
- BAR = 1,
- BAZ = 2,
- MyEnum_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
- MyEnum_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
- };
- bool MyEnum_IsValid(int value);
- const MyEnum MyEnum_MIN = FOO;
- const MyEnum MyEnum_MAX = BAZ;
- const int MyEnum_ARRAYSIZE = MyEnum_MAX + 1;
- const ::google::protobuf::EnumDescriptor* MyEnum_descriptor();
- inline const ::std::string& MyEnum_Name(MyEnum value) {
- return ::google::protobuf::internal::NameOfEnum(
- MyEnum_descriptor(), value);
- }
- inline bool MyEnum_Parse(
- const ::std::string& name, MyEnum* value) {
- return ::google::protobuf::internal::ParseNamedEnum<MyEnum>(
- MyEnum_descriptor(), name, value);
- }
- enum MyEnumPlusExtra {
- E_FOO = 0,
- E_BAR = 1,
- E_BAZ = 2,
- E_EXTRA = 3,
- MyEnumPlusExtra_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
- MyEnumPlusExtra_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
- };
- bool MyEnumPlusExtra_IsValid(int value);
- const MyEnumPlusExtra MyEnumPlusExtra_MIN = E_FOO;
- const MyEnumPlusExtra MyEnumPlusExtra_MAX = E_EXTRA;
- const int MyEnumPlusExtra_ARRAYSIZE = MyEnumPlusExtra_MAX + 1;
- const ::google::protobuf::EnumDescriptor* MyEnumPlusExtra_descriptor();
- inline const ::std::string& MyEnumPlusExtra_Name(MyEnumPlusExtra value) {
- return ::google::protobuf::internal::NameOfEnum(
- MyEnumPlusExtra_descriptor(), value);
- }
- inline bool MyEnumPlusExtra_Parse(
- const ::std::string& name, MyEnumPlusExtra* value) {
- return ::google::protobuf::internal::ParseNamedEnum<MyEnumPlusExtra>(
- MyEnumPlusExtra_descriptor(), name, value);
- }
- // ===================================================================
- class MyMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:proto3_preserve_unknown_enum_unittest.MyMessage) */ {
- public:
- MyMessage();
- virtual ~MyMessage();
- MyMessage(const MyMessage& from);
- inline MyMessage& operator=(const MyMessage& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- MyMessage(MyMessage&& from) noexcept
- : MyMessage() {
- *this = ::std::move(from);
- }
- inline MyMessage& operator=(MyMessage&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- static const ::google::protobuf::Descriptor* descriptor();
- static const MyMessage& default_instance();
- enum OCase {
- kOneofE1 = 5,
- kOneofE2 = 6,
- O_NOT_SET = 0,
- };
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const MyMessage* internal_default_instance() {
- return reinterpret_cast<const MyMessage*>(
- &_MyMessage_default_instance_);
- }
- static constexpr int kIndexInFileMessages =
- 0;
- void Swap(MyMessage* other);
- friend void swap(MyMessage& a, MyMessage& b) {
- a.Swap(&b);
- }
- // implements Message ----------------------------------------------
- inline MyMessage* New() const final {
- return CreateMaybeMessage<MyMessage>(NULL);
- }
- MyMessage* New(::google::protobuf::Arena* arena) const final {
- return CreateMaybeMessage<MyMessage>(arena);
- }
- void CopyFrom(const ::google::protobuf::Message& from) final;
- void MergeFrom(const ::google::protobuf::Message& from) final;
- void CopyFrom(const MyMessage& from);
- void MergeFrom(const MyMessage& from);
- void Clear() final;
- bool IsInitialized() const final;
- size_t ByteSizeLong() const final;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) final;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const final;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const final;
- void InternalSwap(MyMessage* other);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return NULL;
- }
- inline void* MaybeArenaPtr() const {
- return NULL;
- }
- public:
- ::google::protobuf::Metadata GetMetadata() const final;
- // nested types ----------------------------------------------------
- // accessors -------------------------------------------------------
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnum repeated_e = 2;
- int repeated_e_size() const;
- void clear_repeated_e();
- static const int kRepeatedEFieldNumber = 2;
- ::proto3_preserve_unknown_enum_unittest::MyEnum repeated_e(int index) const;
- void set_repeated_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnum value);
- void add_repeated_e(::proto3_preserve_unknown_enum_unittest::MyEnum value);
- const ::google::protobuf::RepeatedField<int>& repeated_e() const;
- ::google::protobuf::RepeatedField<int>* mutable_repeated_e();
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnum repeated_packed_e = 3 [packed = true];
- int repeated_packed_e_size() const;
- void clear_repeated_packed_e();
- static const int kRepeatedPackedEFieldNumber = 3;
- ::proto3_preserve_unknown_enum_unittest::MyEnum repeated_packed_e(int index) const;
- void set_repeated_packed_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnum value);
- void add_repeated_packed_e(::proto3_preserve_unknown_enum_unittest::MyEnum value);
- const ::google::protobuf::RepeatedField<int>& repeated_packed_e() const;
- ::google::protobuf::RepeatedField<int>* mutable_repeated_packed_e();
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_packed_unexpected_e = 4;
- int repeated_packed_unexpected_e_size() const;
- void clear_repeated_packed_unexpected_e();
- static const int kRepeatedPackedUnexpectedEFieldNumber = 4;
- ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra repeated_packed_unexpected_e(int index) const;
- void set_repeated_packed_unexpected_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- void add_repeated_packed_unexpected_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- const ::google::protobuf::RepeatedField<int>& repeated_packed_unexpected_e() const;
- ::google::protobuf::RepeatedField<int>* mutable_repeated_packed_unexpected_e();
- // .proto3_preserve_unknown_enum_unittest.MyEnum e = 1;
- void clear_e();
- static const int kEFieldNumber = 1;
- ::proto3_preserve_unknown_enum_unittest::MyEnum e() const;
- void set_e(::proto3_preserve_unknown_enum_unittest::MyEnum value);
- // .proto3_preserve_unknown_enum_unittest.MyEnum oneof_e_1 = 5;
- private:
- bool has_oneof_e_1() const;
- public:
- void clear_oneof_e_1();
- static const int kOneofE1FieldNumber = 5;
- ::proto3_preserve_unknown_enum_unittest::MyEnum oneof_e_1() const;
- void set_oneof_e_1(::proto3_preserve_unknown_enum_unittest::MyEnum value);
- // .proto3_preserve_unknown_enum_unittest.MyEnum oneof_e_2 = 6;
- private:
- bool has_oneof_e_2() const;
- public:
- void clear_oneof_e_2();
- static const int kOneofE2FieldNumber = 6;
- ::proto3_preserve_unknown_enum_unittest::MyEnum oneof_e_2() const;
- void set_oneof_e_2(::proto3_preserve_unknown_enum_unittest::MyEnum value);
- void clear_o();
- OCase o_case() const;
- // @@protoc_insertion_point(class_scope:proto3_preserve_unknown_enum_unittest.MyMessage)
- private:
- void set_has_oneof_e_1();
- void set_has_oneof_e_2();
- inline bool has_o() const;
- inline void clear_has_o();
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedField<int> repeated_e_;
- mutable int _repeated_e_cached_byte_size_;
- ::google::protobuf::RepeatedField<int> repeated_packed_e_;
- mutable int _repeated_packed_e_cached_byte_size_;
- ::google::protobuf::RepeatedField<int> repeated_packed_unexpected_e_;
- mutable int _repeated_packed_unexpected_e_cached_byte_size_;
- int e_;
- union OUnion {
- OUnion() {}
- int oneof_e_1_;
- int oneof_e_2_;
- } o_;
- mutable ::google::protobuf::internal::CachedSize _cached_size_;
- ::google::protobuf::uint32 _oneof_case_[1];
- friend struct ::protobuf_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto::TableStruct;
- };
- // -------------------------------------------------------------------
- class MyMessagePlusExtra : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra) */ {
- public:
- MyMessagePlusExtra();
- virtual ~MyMessagePlusExtra();
- MyMessagePlusExtra(const MyMessagePlusExtra& from);
- inline MyMessagePlusExtra& operator=(const MyMessagePlusExtra& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- MyMessagePlusExtra(MyMessagePlusExtra&& from) noexcept
- : MyMessagePlusExtra() {
- *this = ::std::move(from);
- }
- inline MyMessagePlusExtra& operator=(MyMessagePlusExtra&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- static const ::google::protobuf::Descriptor* descriptor();
- static const MyMessagePlusExtra& default_instance();
- enum OCase {
- kOneofE1 = 5,
- kOneofE2 = 6,
- O_NOT_SET = 0,
- };
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const MyMessagePlusExtra* internal_default_instance() {
- return reinterpret_cast<const MyMessagePlusExtra*>(
- &_MyMessagePlusExtra_default_instance_);
- }
- static constexpr int kIndexInFileMessages =
- 1;
- void Swap(MyMessagePlusExtra* other);
- friend void swap(MyMessagePlusExtra& a, MyMessagePlusExtra& b) {
- a.Swap(&b);
- }
- // implements Message ----------------------------------------------
- inline MyMessagePlusExtra* New() const final {
- return CreateMaybeMessage<MyMessagePlusExtra>(NULL);
- }
- MyMessagePlusExtra* New(::google::protobuf::Arena* arena) const final {
- return CreateMaybeMessage<MyMessagePlusExtra>(arena);
- }
- void CopyFrom(const ::google::protobuf::Message& from) final;
- void MergeFrom(const ::google::protobuf::Message& from) final;
- void CopyFrom(const MyMessagePlusExtra& from);
- void MergeFrom(const MyMessagePlusExtra& from);
- void Clear() final;
- bool IsInitialized() const final;
- size_t ByteSizeLong() const final;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) final;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const final;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const final;
- void InternalSwap(MyMessagePlusExtra* other);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return NULL;
- }
- inline void* MaybeArenaPtr() const {
- return NULL;
- }
- public:
- ::google::protobuf::Metadata GetMetadata() const final;
- // nested types ----------------------------------------------------
- // accessors -------------------------------------------------------
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_e = 2;
- int repeated_e_size() const;
- void clear_repeated_e();
- static const int kRepeatedEFieldNumber = 2;
- ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra repeated_e(int index) const;
- void set_repeated_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- void add_repeated_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- const ::google::protobuf::RepeatedField<int>& repeated_e() const;
- ::google::protobuf::RepeatedField<int>* mutable_repeated_e();
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_packed_e = 3 [packed = true];
- int repeated_packed_e_size() const;
- void clear_repeated_packed_e();
- static const int kRepeatedPackedEFieldNumber = 3;
- ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra repeated_packed_e(int index) const;
- void set_repeated_packed_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- void add_repeated_packed_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- const ::google::protobuf::RepeatedField<int>& repeated_packed_e() const;
- ::google::protobuf::RepeatedField<int>* mutable_repeated_packed_e();
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_packed_unexpected_e = 4 [packed = true];
- int repeated_packed_unexpected_e_size() const;
- void clear_repeated_packed_unexpected_e();
- static const int kRepeatedPackedUnexpectedEFieldNumber = 4;
- ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra repeated_packed_unexpected_e(int index) const;
- void set_repeated_packed_unexpected_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- void add_repeated_packed_unexpected_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- const ::google::protobuf::RepeatedField<int>& repeated_packed_unexpected_e() const;
- ::google::protobuf::RepeatedField<int>* mutable_repeated_packed_unexpected_e();
- // .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra e = 1;
- void clear_e();
- static const int kEFieldNumber = 1;
- ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra e() const;
- void set_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- // .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra oneof_e_1 = 5;
- private:
- bool has_oneof_e_1() const;
- public:
- void clear_oneof_e_1();
- static const int kOneofE1FieldNumber = 5;
- ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra oneof_e_1() const;
- void set_oneof_e_1(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- // .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra oneof_e_2 = 6;
- private:
- bool has_oneof_e_2() const;
- public:
- void clear_oneof_e_2();
- static const int kOneofE2FieldNumber = 6;
- ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra oneof_e_2() const;
- void set_oneof_e_2(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value);
- void clear_o();
- OCase o_case() const;
- // @@protoc_insertion_point(class_scope:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra)
- private:
- void set_has_oneof_e_1();
- void set_has_oneof_e_2();
- inline bool has_o() const;
- inline void clear_has_o();
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedField<int> repeated_e_;
- mutable int _repeated_e_cached_byte_size_;
- ::google::protobuf::RepeatedField<int> repeated_packed_e_;
- mutable int _repeated_packed_e_cached_byte_size_;
- ::google::protobuf::RepeatedField<int> repeated_packed_unexpected_e_;
- mutable int _repeated_packed_unexpected_e_cached_byte_size_;
- int e_;
- union OUnion {
- OUnion() {}
- int oneof_e_1_;
- int oneof_e_2_;
- } o_;
- mutable ::google::protobuf::internal::CachedSize _cached_size_;
- ::google::protobuf::uint32 _oneof_case_[1];
- friend struct ::protobuf_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto::TableStruct;
- };
- // ===================================================================
- // ===================================================================
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
- #endif // __GNUC__
- // MyMessage
- // .proto3_preserve_unknown_enum_unittest.MyEnum e = 1;
- inline void MyMessage::clear_e() {
- e_ = 0;
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnum MyMessage::e() const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessage.e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnum >(e_);
- }
- inline void MyMessage::set_e(::proto3_preserve_unknown_enum_unittest::MyEnum value) {
-
- e_ = value;
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessage.e)
- }
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnum repeated_e = 2;
- inline int MyMessage::repeated_e_size() const {
- return repeated_e_.size();
- }
- inline void MyMessage::clear_repeated_e() {
- repeated_e_.Clear();
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnum MyMessage::repeated_e(int index) const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnum >(repeated_e_.Get(index));
- }
- inline void MyMessage::set_repeated_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnum value) {
- repeated_e_.Set(index, value);
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_e)
- }
- inline void MyMessage::add_repeated_e(::proto3_preserve_unknown_enum_unittest::MyEnum value) {
- repeated_e_.Add(value);
- // @@protoc_insertion_point(field_add:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_e)
- }
- inline const ::google::protobuf::RepeatedField<int>&
- MyMessage::repeated_e() const {
- // @@protoc_insertion_point(field_list:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_e)
- return repeated_e_;
- }
- inline ::google::protobuf::RepeatedField<int>*
- MyMessage::mutable_repeated_e() {
- // @@protoc_insertion_point(field_mutable_list:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_e)
- return &repeated_e_;
- }
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnum repeated_packed_e = 3 [packed = true];
- inline int MyMessage::repeated_packed_e_size() const {
- return repeated_packed_e_.size();
- }
- inline void MyMessage::clear_repeated_packed_e() {
- repeated_packed_e_.Clear();
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnum MyMessage::repeated_packed_e(int index) const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnum >(repeated_packed_e_.Get(index));
- }
- inline void MyMessage::set_repeated_packed_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnum value) {
- repeated_packed_e_.Set(index, value);
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_e)
- }
- inline void MyMessage::add_repeated_packed_e(::proto3_preserve_unknown_enum_unittest::MyEnum value) {
- repeated_packed_e_.Add(value);
- // @@protoc_insertion_point(field_add:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_e)
- }
- inline const ::google::protobuf::RepeatedField<int>&
- MyMessage::repeated_packed_e() const {
- // @@protoc_insertion_point(field_list:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_e)
- return repeated_packed_e_;
- }
- inline ::google::protobuf::RepeatedField<int>*
- MyMessage::mutable_repeated_packed_e() {
- // @@protoc_insertion_point(field_mutable_list:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_e)
- return &repeated_packed_e_;
- }
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_packed_unexpected_e = 4;
- inline int MyMessage::repeated_packed_unexpected_e_size() const {
- return repeated_packed_unexpected_e_.size();
- }
- inline void MyMessage::clear_repeated_packed_unexpected_e() {
- repeated_packed_unexpected_e_.Clear();
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra MyMessage::repeated_packed_unexpected_e(int index) const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_unexpected_e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(repeated_packed_unexpected_e_.Get(index));
- }
- inline void MyMessage::set_repeated_packed_unexpected_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_packed_unexpected_e_.Set(index, value);
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_unexpected_e)
- }
- inline void MyMessage::add_repeated_packed_unexpected_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_packed_unexpected_e_.Add(value);
- // @@protoc_insertion_point(field_add:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_unexpected_e)
- }
- inline const ::google::protobuf::RepeatedField<int>&
- MyMessage::repeated_packed_unexpected_e() const {
- // @@protoc_insertion_point(field_list:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_unexpected_e)
- return repeated_packed_unexpected_e_;
- }
- inline ::google::protobuf::RepeatedField<int>*
- MyMessage::mutable_repeated_packed_unexpected_e() {
- // @@protoc_insertion_point(field_mutable_list:proto3_preserve_unknown_enum_unittest.MyMessage.repeated_packed_unexpected_e)
- return &repeated_packed_unexpected_e_;
- }
- // .proto3_preserve_unknown_enum_unittest.MyEnum oneof_e_1 = 5;
- inline bool MyMessage::has_oneof_e_1() const {
- return o_case() == kOneofE1;
- }
- inline void MyMessage::set_has_oneof_e_1() {
- _oneof_case_[0] = kOneofE1;
- }
- inline void MyMessage::clear_oneof_e_1() {
- if (has_oneof_e_1()) {
- o_.oneof_e_1_ = 0;
- clear_has_o();
- }
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnum MyMessage::oneof_e_1() const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessage.oneof_e_1)
- if (has_oneof_e_1()) {
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnum >(o_.oneof_e_1_);
- }
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnum >(0);
- }
- inline void MyMessage::set_oneof_e_1(::proto3_preserve_unknown_enum_unittest::MyEnum value) {
- if (!has_oneof_e_1()) {
- clear_o();
- set_has_oneof_e_1();
- }
- o_.oneof_e_1_ = value;
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessage.oneof_e_1)
- }
- // .proto3_preserve_unknown_enum_unittest.MyEnum oneof_e_2 = 6;
- inline bool MyMessage::has_oneof_e_2() const {
- return o_case() == kOneofE2;
- }
- inline void MyMessage::set_has_oneof_e_2() {
- _oneof_case_[0] = kOneofE2;
- }
- inline void MyMessage::clear_oneof_e_2() {
- if (has_oneof_e_2()) {
- o_.oneof_e_2_ = 0;
- clear_has_o();
- }
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnum MyMessage::oneof_e_2() const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessage.oneof_e_2)
- if (has_oneof_e_2()) {
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnum >(o_.oneof_e_2_);
- }
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnum >(0);
- }
- inline void MyMessage::set_oneof_e_2(::proto3_preserve_unknown_enum_unittest::MyEnum value) {
- if (!has_oneof_e_2()) {
- clear_o();
- set_has_oneof_e_2();
- }
- o_.oneof_e_2_ = value;
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessage.oneof_e_2)
- }
- inline bool MyMessage::has_o() const {
- return o_case() != O_NOT_SET;
- }
- inline void MyMessage::clear_has_o() {
- _oneof_case_[0] = O_NOT_SET;
- }
- inline MyMessage::OCase MyMessage::o_case() const {
- return MyMessage::OCase(_oneof_case_[0]);
- }
- // -------------------------------------------------------------------
- // MyMessagePlusExtra
- // .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra e = 1;
- inline void MyMessagePlusExtra::clear_e() {
- e_ = 0;
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra MyMessagePlusExtra::e() const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(e_);
- }
- inline void MyMessagePlusExtra::set_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
-
- e_ = value;
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.e)
- }
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_e = 2;
- inline int MyMessagePlusExtra::repeated_e_size() const {
- return repeated_e_.size();
- }
- inline void MyMessagePlusExtra::clear_repeated_e() {
- repeated_e_.Clear();
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra MyMessagePlusExtra::repeated_e(int index) const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(repeated_e_.Get(index));
- }
- inline void MyMessagePlusExtra::set_repeated_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_e_.Set(index, value);
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_e)
- }
- inline void MyMessagePlusExtra::add_repeated_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_e_.Add(value);
- // @@protoc_insertion_point(field_add:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_e)
- }
- inline const ::google::protobuf::RepeatedField<int>&
- MyMessagePlusExtra::repeated_e() const {
- // @@protoc_insertion_point(field_list:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_e)
- return repeated_e_;
- }
- inline ::google::protobuf::RepeatedField<int>*
- MyMessagePlusExtra::mutable_repeated_e() {
- // @@protoc_insertion_point(field_mutable_list:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_e)
- return &repeated_e_;
- }
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_packed_e = 3 [packed = true];
- inline int MyMessagePlusExtra::repeated_packed_e_size() const {
- return repeated_packed_e_.size();
- }
- inline void MyMessagePlusExtra::clear_repeated_packed_e() {
- repeated_packed_e_.Clear();
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra MyMessagePlusExtra::repeated_packed_e(int index) const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(repeated_packed_e_.Get(index));
- }
- inline void MyMessagePlusExtra::set_repeated_packed_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_packed_e_.Set(index, value);
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_e)
- }
- inline void MyMessagePlusExtra::add_repeated_packed_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_packed_e_.Add(value);
- // @@protoc_insertion_point(field_add:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_e)
- }
- inline const ::google::protobuf::RepeatedField<int>&
- MyMessagePlusExtra::repeated_packed_e() const {
- // @@protoc_insertion_point(field_list:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_e)
- return repeated_packed_e_;
- }
- inline ::google::protobuf::RepeatedField<int>*
- MyMessagePlusExtra::mutable_repeated_packed_e() {
- // @@protoc_insertion_point(field_mutable_list:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_e)
- return &repeated_packed_e_;
- }
- // repeated .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra repeated_packed_unexpected_e = 4 [packed = true];
- inline int MyMessagePlusExtra::repeated_packed_unexpected_e_size() const {
- return repeated_packed_unexpected_e_.size();
- }
- inline void MyMessagePlusExtra::clear_repeated_packed_unexpected_e() {
- repeated_packed_unexpected_e_.Clear();
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra MyMessagePlusExtra::repeated_packed_unexpected_e(int index) const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_unexpected_e)
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(repeated_packed_unexpected_e_.Get(index));
- }
- inline void MyMessagePlusExtra::set_repeated_packed_unexpected_e(int index, ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_packed_unexpected_e_.Set(index, value);
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_unexpected_e)
- }
- inline void MyMessagePlusExtra::add_repeated_packed_unexpected_e(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- repeated_packed_unexpected_e_.Add(value);
- // @@protoc_insertion_point(field_add:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_unexpected_e)
- }
- inline const ::google::protobuf::RepeatedField<int>&
- MyMessagePlusExtra::repeated_packed_unexpected_e() const {
- // @@protoc_insertion_point(field_list:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_unexpected_e)
- return repeated_packed_unexpected_e_;
- }
- inline ::google::protobuf::RepeatedField<int>*
- MyMessagePlusExtra::mutable_repeated_packed_unexpected_e() {
- // @@protoc_insertion_point(field_mutable_list:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.repeated_packed_unexpected_e)
- return &repeated_packed_unexpected_e_;
- }
- // .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra oneof_e_1 = 5;
- inline bool MyMessagePlusExtra::has_oneof_e_1() const {
- return o_case() == kOneofE1;
- }
- inline void MyMessagePlusExtra::set_has_oneof_e_1() {
- _oneof_case_[0] = kOneofE1;
- }
- inline void MyMessagePlusExtra::clear_oneof_e_1() {
- if (has_oneof_e_1()) {
- o_.oneof_e_1_ = 0;
- clear_has_o();
- }
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra MyMessagePlusExtra::oneof_e_1() const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.oneof_e_1)
- if (has_oneof_e_1()) {
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(o_.oneof_e_1_);
- }
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(0);
- }
- inline void MyMessagePlusExtra::set_oneof_e_1(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- if (!has_oneof_e_1()) {
- clear_o();
- set_has_oneof_e_1();
- }
- o_.oneof_e_1_ = value;
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.oneof_e_1)
- }
- // .proto3_preserve_unknown_enum_unittest.MyEnumPlusExtra oneof_e_2 = 6;
- inline bool MyMessagePlusExtra::has_oneof_e_2() const {
- return o_case() == kOneofE2;
- }
- inline void MyMessagePlusExtra::set_has_oneof_e_2() {
- _oneof_case_[0] = kOneofE2;
- }
- inline void MyMessagePlusExtra::clear_oneof_e_2() {
- if (has_oneof_e_2()) {
- o_.oneof_e_2_ = 0;
- clear_has_o();
- }
- }
- inline ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra MyMessagePlusExtra::oneof_e_2() const {
- // @@protoc_insertion_point(field_get:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.oneof_e_2)
- if (has_oneof_e_2()) {
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(o_.oneof_e_2_);
- }
- return static_cast< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra >(0);
- }
- inline void MyMessagePlusExtra::set_oneof_e_2(::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra value) {
- if (!has_oneof_e_2()) {
- clear_o();
- set_has_oneof_e_2();
- }
- o_.oneof_e_2_ = value;
- // @@protoc_insertion_point(field_set:proto3_preserve_unknown_enum_unittest.MyMessagePlusExtra.oneof_e_2)
- }
- inline bool MyMessagePlusExtra::has_o() const {
- return o_case() != O_NOT_SET;
- }
- inline void MyMessagePlusExtra::clear_has_o() {
- _oneof_case_[0] = O_NOT_SET;
- }
- inline MyMessagePlusExtra::OCase MyMessagePlusExtra::o_case() const {
- return MyMessagePlusExtra::OCase(_oneof_case_[0]);
- }
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif // __GNUC__
- // -------------------------------------------------------------------
- // @@protoc_insertion_point(namespace_scope)
- } // namespace proto3_preserve_unknown_enum_unittest
- namespace google {
- namespace protobuf {
- template <> struct is_proto_enum< ::proto3_preserve_unknown_enum_unittest::MyEnum> : ::std::true_type {};
- template <>
- inline const EnumDescriptor* GetEnumDescriptor< ::proto3_preserve_unknown_enum_unittest::MyEnum>() {
- return ::proto3_preserve_unknown_enum_unittest::MyEnum_descriptor();
- }
- template <> struct is_proto_enum< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra> : ::std::true_type {};
- template <>
- inline const EnumDescriptor* GetEnumDescriptor< ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra>() {
- return ::proto3_preserve_unknown_enum_unittest::MyEnumPlusExtra_descriptor();
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
- #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fpreserve_5funknown_5fenum_2eproto
|