// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/unittest_mset.proto #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fmset_2eproto #define PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fmset_2eproto #include #include #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 #include #include #include #include #include #include #include #include // IWYU pragma: export #include // IWYU pragma: export #include #include // @@protoc_insertion_point(includes) #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fmset_2eproto namespace protobuf_google_2fprotobuf_2funittest_5fmset_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[5]; 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_5fmset_2eproto namespace protobuf_unittest { class RawMessageSet; class RawMessageSetDefaultTypeInternal; extern RawMessageSetDefaultTypeInternal _RawMessageSet_default_instance_; class RawMessageSet_Item; class RawMessageSet_ItemDefaultTypeInternal; extern RawMessageSet_ItemDefaultTypeInternal _RawMessageSet_Item_default_instance_; class TestMessageSetContainer; class TestMessageSetContainerDefaultTypeInternal; extern TestMessageSetContainerDefaultTypeInternal _TestMessageSetContainer_default_instance_; class TestMessageSetExtension1; class TestMessageSetExtension1DefaultTypeInternal; extern TestMessageSetExtension1DefaultTypeInternal _TestMessageSetExtension1_default_instance_; class TestMessageSetExtension2; class TestMessageSetExtension2DefaultTypeInternal; extern TestMessageSetExtension2DefaultTypeInternal _TestMessageSetExtension2_default_instance_; } // namespace protobuf_unittest namespace google { namespace protobuf { template<> ::protobuf_unittest::RawMessageSet* Arena::CreateMaybeMessage<::protobuf_unittest::RawMessageSet>(Arena*); template<> ::protobuf_unittest::RawMessageSet_Item* Arena::CreateMaybeMessage<::protobuf_unittest::RawMessageSet_Item>(Arena*); template<> ::protobuf_unittest::TestMessageSetContainer* Arena::CreateMaybeMessage<::protobuf_unittest::TestMessageSetContainer>(Arena*); template<> ::protobuf_unittest::TestMessageSetExtension1* Arena::CreateMaybeMessage<::protobuf_unittest::TestMessageSetExtension1>(Arena*); template<> ::protobuf_unittest::TestMessageSetExtension2* Arena::CreateMaybeMessage<::protobuf_unittest::TestMessageSetExtension2>(Arena*); } // namespace protobuf } // namespace google namespace protobuf_unittest { // =================================================================== class TestMessageSetContainer : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestMessageSetContainer) */ { public: TestMessageSetContainer(); virtual ~TestMessageSetContainer(); TestMessageSetContainer(const TestMessageSetContainer& from); inline TestMessageSetContainer& operator=(const TestMessageSetContainer& from) { CopyFrom(from); return *this; } #if LANG_CXX11 TestMessageSetContainer(TestMessageSetContainer&& from) noexcept : TestMessageSetContainer() { *this = ::std::move(from); } inline TestMessageSetContainer& operator=(TestMessageSetContainer&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); static const TestMessageSetContainer& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const TestMessageSetContainer* internal_default_instance() { return reinterpret_cast( &_TestMessageSetContainer_default_instance_); } static constexpr int kIndexInFileMessages = 0; void UnsafeArenaSwap(TestMessageSetContainer* other); void Swap(TestMessageSetContainer* other); friend void swap(TestMessageSetContainer& a, TestMessageSetContainer& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline TestMessageSetContainer* New() const final { return CreateMaybeMessage(NULL); } TestMessageSetContainer* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const TestMessageSetContainer& from); void MergeFrom(const TestMessageSetContainer& 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(TestMessageSetContainer* other); protected: explicit TestMessageSetContainer(::google::protobuf::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::google::protobuf::Arena* arena); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional .proto2_wireformat_unittest.TestMessageSet message_set = 1; bool has_message_set() const; void clear_message_set(); static const int kMessageSetFieldNumber = 1; private: const ::proto2_wireformat_unittest::TestMessageSet& _internal_message_set() const; public: const ::proto2_wireformat_unittest::TestMessageSet& message_set() const; ::proto2_wireformat_unittest::TestMessageSet* release_message_set(); ::proto2_wireformat_unittest::TestMessageSet* mutable_message_set(); void set_allocated_message_set(::proto2_wireformat_unittest::TestMessageSet* message_set); void unsafe_arena_set_allocated_message_set( ::proto2_wireformat_unittest::TestMessageSet* message_set); ::proto2_wireformat_unittest::TestMessageSet* unsafe_arena_release_message_set(); // @@protoc_insertion_point(class_scope:protobuf_unittest.TestMessageSetContainer) private: void set_has_message_set(); void clear_has_message_set(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::proto2_wireformat_unittest::TestMessageSet* message_set_; friend struct ::protobuf_google_2fprotobuf_2funittest_5fmset_2eproto::TableStruct; }; // ------------------------------------------------------------------- class TestMessageSetExtension1 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestMessageSetExtension1) */ { public: TestMessageSetExtension1(); virtual ~TestMessageSetExtension1(); TestMessageSetExtension1(const TestMessageSetExtension1& from); inline TestMessageSetExtension1& operator=(const TestMessageSetExtension1& from) { CopyFrom(from); return *this; } #if LANG_CXX11 TestMessageSetExtension1(TestMessageSetExtension1&& from) noexcept : TestMessageSetExtension1() { *this = ::std::move(from); } inline TestMessageSetExtension1& operator=(TestMessageSetExtension1&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); static const TestMessageSetExtension1& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const TestMessageSetExtension1* internal_default_instance() { return reinterpret_cast( &_TestMessageSetExtension1_default_instance_); } static constexpr int kIndexInFileMessages = 1; void UnsafeArenaSwap(TestMessageSetExtension1* other); void Swap(TestMessageSetExtension1* other); friend void swap(TestMessageSetExtension1& a, TestMessageSetExtension1& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline TestMessageSetExtension1* New() const final { return CreateMaybeMessage(NULL); } TestMessageSetExtension1* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const TestMessageSetExtension1& from); void MergeFrom(const TestMessageSetExtension1& 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(TestMessageSetExtension1* other); protected: explicit TestMessageSetExtension1(::google::protobuf::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::google::protobuf::Arena* arena); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional int32 i = 15; bool has_i() const; void clear_i(); static const int kIFieldNumber = 15; ::google::protobuf::int32 i() const; void set_i(::google::protobuf::int32 value); static const int kMessageSetExtensionFieldNumber = 1545008; static ::google::protobuf::internal::ExtensionIdentifier< ::proto2_wireformat_unittest::TestMessageSet, ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestMessageSetExtension1 >, 11, false > message_set_extension; // @@protoc_insertion_point(class_scope:protobuf_unittest.TestMessageSetExtension1) private: void set_has_i(); void clear_has_i(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::int32 i_; friend struct ::protobuf_google_2fprotobuf_2funittest_5fmset_2eproto::TableStruct; }; // ------------------------------------------------------------------- class TestMessageSetExtension2 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestMessageSetExtension2) */ { public: TestMessageSetExtension2(); virtual ~TestMessageSetExtension2(); TestMessageSetExtension2(const TestMessageSetExtension2& from); inline TestMessageSetExtension2& operator=(const TestMessageSetExtension2& from) { CopyFrom(from); return *this; } #if LANG_CXX11 TestMessageSetExtension2(TestMessageSetExtension2&& from) noexcept : TestMessageSetExtension2() { *this = ::std::move(from); } inline TestMessageSetExtension2& operator=(TestMessageSetExtension2&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); static const TestMessageSetExtension2& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const TestMessageSetExtension2* internal_default_instance() { return reinterpret_cast( &_TestMessageSetExtension2_default_instance_); } static constexpr int kIndexInFileMessages = 2; void UnsafeArenaSwap(TestMessageSetExtension2* other); void Swap(TestMessageSetExtension2* other); friend void swap(TestMessageSetExtension2& a, TestMessageSetExtension2& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline TestMessageSetExtension2* New() const final { return CreateMaybeMessage(NULL); } TestMessageSetExtension2* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const TestMessageSetExtension2& from); void MergeFrom(const TestMessageSetExtension2& 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(TestMessageSetExtension2* other); protected: explicit TestMessageSetExtension2(::google::protobuf::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::google::protobuf::Arena* arena); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional string str = 25; bool has_str() const; void clear_str(); static const int kStrFieldNumber = 25; const ::std::string& str() const; void set_str(const ::std::string& value); #if LANG_CXX11 void set_str(::std::string&& value); #endif void set_str(const char* value); void set_str(const char* value, size_t size); ::std::string* mutable_str(); ::std::string* release_str(); void set_allocated_str(::std::string* str); PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") ::std::string* unsafe_arena_release_str(); PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_str( ::std::string* str); static const int kMessageSetExtensionFieldNumber = 1547769; static ::google::protobuf::internal::ExtensionIdentifier< ::proto2_wireformat_unittest::TestMessageSet, ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestMessageSetExtension2 >, 11, false > message_set_extension; // @@protoc_insertion_point(class_scope:protobuf_unittest.TestMessageSetExtension2) private: void set_has_str(); void clear_has_str(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr str_; friend struct ::protobuf_google_2fprotobuf_2funittest_5fmset_2eproto::TableStruct; }; // ------------------------------------------------------------------- class RawMessageSet_Item : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.RawMessageSet.Item) */ { public: RawMessageSet_Item(); virtual ~RawMessageSet_Item(); RawMessageSet_Item(const RawMessageSet_Item& from); inline RawMessageSet_Item& operator=(const RawMessageSet_Item& from) { CopyFrom(from); return *this; } #if LANG_CXX11 RawMessageSet_Item(RawMessageSet_Item&& from) noexcept : RawMessageSet_Item() { *this = ::std::move(from); } inline RawMessageSet_Item& operator=(RawMessageSet_Item&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); static const RawMessageSet_Item& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const RawMessageSet_Item* internal_default_instance() { return reinterpret_cast( &_RawMessageSet_Item_default_instance_); } static constexpr int kIndexInFileMessages = 3; void UnsafeArenaSwap(RawMessageSet_Item* other); void Swap(RawMessageSet_Item* other); friend void swap(RawMessageSet_Item& a, RawMessageSet_Item& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline RawMessageSet_Item* New() const final { return CreateMaybeMessage(NULL); } RawMessageSet_Item* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const RawMessageSet_Item& from); void MergeFrom(const RawMessageSet_Item& 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(RawMessageSet_Item* other); protected: explicit RawMessageSet_Item(::google::protobuf::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::google::protobuf::Arena* arena); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required bytes message = 3; bool has_message() const; void clear_message(); static const int kMessageFieldNumber = 3; const ::std::string& message() const; void set_message(const ::std::string& value); #if LANG_CXX11 void set_message(::std::string&& value); #endif void set_message(const char* value); void set_message(const void* value, size_t size); ::std::string* mutable_message(); ::std::string* release_message(); void set_allocated_message(::std::string* message); PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") ::std::string* unsafe_arena_release_message(); PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_message( ::std::string* message); // required int32 type_id = 2; bool has_type_id() const; void clear_type_id(); static const int kTypeIdFieldNumber = 2; ::google::protobuf::int32 type_id() const; void set_type_id(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:protobuf_unittest.RawMessageSet.Item) private: void set_has_type_id(); void clear_has_type_id(); void set_has_message(); void clear_has_message(); // helper for ByteSizeLong() size_t RequiredFieldsByteSizeFallback() const; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr message_; ::google::protobuf::int32 type_id_; friend struct ::protobuf_google_2fprotobuf_2funittest_5fmset_2eproto::TableStruct; }; // ------------------------------------------------------------------- class RawMessageSet : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.RawMessageSet) */ { public: RawMessageSet(); virtual ~RawMessageSet(); RawMessageSet(const RawMessageSet& from); inline RawMessageSet& operator=(const RawMessageSet& from) { CopyFrom(from); return *this; } #if LANG_CXX11 RawMessageSet(RawMessageSet&& from) noexcept : RawMessageSet() { *this = ::std::move(from); } inline RawMessageSet& operator=(RawMessageSet&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); static const RawMessageSet& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const RawMessageSet* internal_default_instance() { return reinterpret_cast( &_RawMessageSet_default_instance_); } static constexpr int kIndexInFileMessages = 4; void UnsafeArenaSwap(RawMessageSet* other); void Swap(RawMessageSet* other); friend void swap(RawMessageSet& a, RawMessageSet& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline RawMessageSet* New() const final { return CreateMaybeMessage(NULL); } RawMessageSet* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const RawMessageSet& from); void MergeFrom(const RawMessageSet& 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(RawMessageSet* other); protected: explicit RawMessageSet(::google::protobuf::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::google::protobuf::Arena* arena); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- typedef RawMessageSet_Item Item; // accessors ------------------------------------------------------- // repeated group Item = 1 { ... }; int item_size() const; void clear_item(); static const int kItemFieldNumber = 1; ::protobuf_unittest::RawMessageSet_Item* mutable_item(int index); ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::RawMessageSet_Item >* mutable_item(); const ::protobuf_unittest::RawMessageSet_Item& item(int index) const; ::protobuf_unittest::RawMessageSet_Item* add_item(); const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::RawMessageSet_Item >& item() const; // @@protoc_insertion_point(class_scope:protobuf_unittest.RawMessageSet) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::RawMessageSet_Item > item_; friend struct ::protobuf_google_2fprotobuf_2funittest_5fmset_2eproto::TableStruct; }; // =================================================================== // =================================================================== #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ // TestMessageSetContainer // optional .proto2_wireformat_unittest.TestMessageSet message_set = 1; inline bool TestMessageSetContainer::has_message_set() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void TestMessageSetContainer::set_has_message_set() { _has_bits_[0] |= 0x00000001u; } inline void TestMessageSetContainer::clear_has_message_set() { _has_bits_[0] &= ~0x00000001u; } inline const ::proto2_wireformat_unittest::TestMessageSet& TestMessageSetContainer::_internal_message_set() const { return *message_set_; } inline const ::proto2_wireformat_unittest::TestMessageSet& TestMessageSetContainer::message_set() const { const ::proto2_wireformat_unittest::TestMessageSet* p = message_set_; // @@protoc_insertion_point(field_get:protobuf_unittest.TestMessageSetContainer.message_set) return p != NULL ? *p : *reinterpret_cast( &::proto2_wireformat_unittest::_TestMessageSet_default_instance_); } inline ::proto2_wireformat_unittest::TestMessageSet* TestMessageSetContainer::release_message_set() { // @@protoc_insertion_point(field_release:protobuf_unittest.TestMessageSetContainer.message_set) clear_has_message_set(); ::proto2_wireformat_unittest::TestMessageSet* temp = message_set_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); } message_set_ = NULL; return temp; } inline ::proto2_wireformat_unittest::TestMessageSet* TestMessageSetContainer::unsafe_arena_release_message_set() { // @@protoc_insertion_point(field_unsafe_arena_release:protobuf_unittest.TestMessageSetContainer.message_set) clear_has_message_set(); ::proto2_wireformat_unittest::TestMessageSet* temp = message_set_; message_set_ = NULL; return temp; } inline ::proto2_wireformat_unittest::TestMessageSet* TestMessageSetContainer::mutable_message_set() { set_has_message_set(); if (message_set_ == NULL) { auto* p = CreateMaybeMessage<::proto2_wireformat_unittest::TestMessageSet>(GetArenaNoVirtual()); message_set_ = p; } // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestMessageSetContainer.message_set) return message_set_; } inline void TestMessageSetContainer::set_allocated_message_set(::proto2_wireformat_unittest::TestMessageSet* message_set) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(message_set_); } if (message_set) { ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(message_set)->GetArena(); if (message_arena != submessage_arena) { message_set = ::google::protobuf::internal::GetOwnedMessage( message_arena, message_set, submessage_arena); } set_has_message_set(); } else { clear_has_message_set(); } message_set_ = message_set; // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestMessageSetContainer.message_set) } // ------------------------------------------------------------------- // TestMessageSetExtension1 // optional int32 i = 15; inline bool TestMessageSetExtension1::has_i() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void TestMessageSetExtension1::set_has_i() { _has_bits_[0] |= 0x00000001u; } inline void TestMessageSetExtension1::clear_has_i() { _has_bits_[0] &= ~0x00000001u; } inline void TestMessageSetExtension1::clear_i() { i_ = 0; clear_has_i(); } inline ::google::protobuf::int32 TestMessageSetExtension1::i() const { // @@protoc_insertion_point(field_get:protobuf_unittest.TestMessageSetExtension1.i) return i_; } inline void TestMessageSetExtension1::set_i(::google::protobuf::int32 value) { set_has_i(); i_ = value; // @@protoc_insertion_point(field_set:protobuf_unittest.TestMessageSetExtension1.i) } // ------------------------------------------------------------------- // TestMessageSetExtension2 // optional string str = 25; inline bool TestMessageSetExtension2::has_str() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void TestMessageSetExtension2::set_has_str() { _has_bits_[0] |= 0x00000001u; } inline void TestMessageSetExtension2::clear_has_str() { _has_bits_[0] &= ~0x00000001u; } inline void TestMessageSetExtension2::clear_str() { str_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_str(); } inline const ::std::string& TestMessageSetExtension2::str() const { // @@protoc_insertion_point(field_get:protobuf_unittest.TestMessageSetExtension2.str) return str_.Get(); } inline void TestMessageSetExtension2::set_str(const ::std::string& value) { set_has_str(); str_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:protobuf_unittest.TestMessageSetExtension2.str) } #if LANG_CXX11 inline void TestMessageSetExtension2::set_str(::std::string&& value) { set_has_str(); str_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.TestMessageSetExtension2.str) } #endif inline void TestMessageSetExtension2::set_str(const char* value) { GOOGLE_DCHECK(value != NULL); set_has_str(); str_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:protobuf_unittest.TestMessageSetExtension2.str) } inline void TestMessageSetExtension2::set_str(const char* value, size_t size) { set_has_str(); str_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.TestMessageSetExtension2.str) } inline ::std::string* TestMessageSetExtension2::mutable_str() { set_has_str(); // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestMessageSetExtension2.str) return str_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* TestMessageSetExtension2::release_str() { // @@protoc_insertion_point(field_release:protobuf_unittest.TestMessageSetExtension2.str) if (!has_str()) { return NULL; } clear_has_str(); return str_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void TestMessageSetExtension2::set_allocated_str(::std::string* str) { if (str != NULL) { set_has_str(); } else { clear_has_str(); } str_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), str, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestMessageSetExtension2.str) } inline ::std::string* TestMessageSetExtension2::unsafe_arena_release_str() { // @@protoc_insertion_point(field_unsafe_arena_release:protobuf_unittest.TestMessageSetExtension2.str) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); clear_has_str(); return str_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void TestMessageSetExtension2::unsafe_arena_set_allocated_str( ::std::string* str) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); if (str != NULL) { set_has_str(); } else { clear_has_str(); } str_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), str, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMessageSetExtension2.str) } // ------------------------------------------------------------------- // RawMessageSet_Item // required int32 type_id = 2; inline bool RawMessageSet_Item::has_type_id() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RawMessageSet_Item::set_has_type_id() { _has_bits_[0] |= 0x00000002u; } inline void RawMessageSet_Item::clear_has_type_id() { _has_bits_[0] &= ~0x00000002u; } inline void RawMessageSet_Item::clear_type_id() { type_id_ = 0; clear_has_type_id(); } inline ::google::protobuf::int32 RawMessageSet_Item::type_id() const { // @@protoc_insertion_point(field_get:protobuf_unittest.RawMessageSet.Item.type_id) return type_id_; } inline void RawMessageSet_Item::set_type_id(::google::protobuf::int32 value) { set_has_type_id(); type_id_ = value; // @@protoc_insertion_point(field_set:protobuf_unittest.RawMessageSet.Item.type_id) } // required bytes message = 3; inline bool RawMessageSet_Item::has_message() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RawMessageSet_Item::set_has_message() { _has_bits_[0] |= 0x00000001u; } inline void RawMessageSet_Item::clear_has_message() { _has_bits_[0] &= ~0x00000001u; } inline void RawMessageSet_Item::clear_message() { message_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_message(); } inline const ::std::string& RawMessageSet_Item::message() const { // @@protoc_insertion_point(field_get:protobuf_unittest.RawMessageSet.Item.message) return message_.Get(); } inline void RawMessageSet_Item::set_message(const ::std::string& value) { set_has_message(); message_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:protobuf_unittest.RawMessageSet.Item.message) } #if LANG_CXX11 inline void RawMessageSet_Item::set_message(::std::string&& value) { set_has_message(); message_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.RawMessageSet.Item.message) } #endif inline void RawMessageSet_Item::set_message(const char* value) { GOOGLE_DCHECK(value != NULL); set_has_message(); message_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:protobuf_unittest.RawMessageSet.Item.message) } inline void RawMessageSet_Item::set_message(const void* value, size_t size) { set_has_message(); message_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.RawMessageSet.Item.message) } inline ::std::string* RawMessageSet_Item::mutable_message() { set_has_message(); // @@protoc_insertion_point(field_mutable:protobuf_unittest.RawMessageSet.Item.message) return message_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* RawMessageSet_Item::release_message() { // @@protoc_insertion_point(field_release:protobuf_unittest.RawMessageSet.Item.message) if (!has_message()) { return NULL; } clear_has_message(); return message_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void RawMessageSet_Item::set_allocated_message(::std::string* message) { if (message != NULL) { set_has_message(); } else { clear_has_message(); } message_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.RawMessageSet.Item.message) } inline ::std::string* RawMessageSet_Item::unsafe_arena_release_message() { // @@protoc_insertion_point(field_unsafe_arena_release:protobuf_unittest.RawMessageSet.Item.message) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); clear_has_message(); return message_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void RawMessageSet_Item::unsafe_arena_set_allocated_message( ::std::string* message) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); if (message != NULL) { set_has_message(); } else { clear_has_message(); } message_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.RawMessageSet.Item.message) } // ------------------------------------------------------------------- // RawMessageSet // repeated group Item = 1 { ... }; inline int RawMessageSet::item_size() const { return item_.size(); } inline void RawMessageSet::clear_item() { item_.Clear(); } inline ::protobuf_unittest::RawMessageSet_Item* RawMessageSet::mutable_item(int index) { // @@protoc_insertion_point(field_mutable:protobuf_unittest.RawMessageSet.item) return item_.Mutable(index); } inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::RawMessageSet_Item >* RawMessageSet::mutable_item() { // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.RawMessageSet.item) return &item_; } inline const ::protobuf_unittest::RawMessageSet_Item& RawMessageSet::item(int index) const { // @@protoc_insertion_point(field_get:protobuf_unittest.RawMessageSet.item) return item_.Get(index); } inline ::protobuf_unittest::RawMessageSet_Item* RawMessageSet::add_item() { // @@protoc_insertion_point(field_add:protobuf_unittest.RawMessageSet.item) return item_.Add(); } inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::RawMessageSet_Item >& RawMessageSet::item() const { // @@protoc_insertion_point(field_list:protobuf_unittest.RawMessageSet.item) return item_; } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // @@protoc_insertion_point(namespace_scope) } // namespace protobuf_unittest // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fmset_2eproto