diff options
Diffstat (limited to 'src/google/protobuf/descriptor.pb.h')
-rw-r--r-- | src/google/protobuf/descriptor.pb.h | 2974 |
1 files changed, 1977 insertions, 997 deletions
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index dd721be9..295b53f3 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -5,6 +5,7 @@ #define PROTOBUF_google_2fprotobuf_2fdescriptor_2eproto__INCLUDED #include <string> +#include <stdint.h> #include <google/protobuf/stubs/common.h> @@ -19,7 +20,10 @@ #error regenerate this file with a newer version of protoc. #endif +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> #include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> #include <google/protobuf/message.h> #include <google/protobuf/repeated_field.h> #include <google/protobuf/extension_set.h> @@ -167,21 +171,28 @@ class LIBPROTOBUF_EXPORT FileDescriptorSet : public ::google::protobuf::Message } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const FileDescriptorSet& default_instance(); + void UnsafeArenaSwap(FileDescriptorSet* other); void Swap(FileDescriptorSet* other); // implements Message ---------------------------------------------- - FileDescriptorSet* New() const; + inline FileDescriptorSet* New() const { return New(NULL); } + + FileDescriptorSet* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const FileDescriptorSet& from); @@ -200,7 +211,21 @@ class LIBPROTOBUF_EXPORT FileDescriptorSet : public ::google::protobuf::Message void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(FileDescriptorSet* other); + protected: + explicit FileDescriptorSet(::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; // nested types ---------------------------------------------------- @@ -222,8 +247,10 @@ class LIBPROTOBUF_EXPORT FileDescriptorSet : public ::google::protobuf::Message // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorSet) private: - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > file_; @@ -249,21 +276,28 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const FileDescriptorProto& default_instance(); + void UnsafeArenaSwap(FileDescriptorProto* other); void Swap(FileDescriptorProto* other); // implements Message ---------------------------------------------- - FileDescriptorProto* New() const; + inline FileDescriptorProto* New() const { return New(NULL); } + + FileDescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const FileDescriptorProto& from); @@ -282,7 +316,21 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(FileDescriptorProto* other); + protected: + explicit FileDescriptorProto(::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; // nested types ---------------------------------------------------- @@ -300,6 +348,9 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // optional string package = 2; inline bool has_package() const; @@ -312,6 +363,9 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag inline ::std::string* mutable_package(); inline ::std::string* release_package(); inline void set_allocated_package(::std::string* package); + inline ::std::string* unsafe_arena_release_package(); + inline void unsafe_arena_set_allocated_package( + ::std::string* package); // repeated string dependency = 3; inline int dependency_size() const; @@ -409,6 +463,9 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag inline ::google::protobuf::FileOptions* mutable_options(); inline ::google::protobuf::FileOptions* release_options(); inline void set_allocated_options(::google::protobuf::FileOptions* options); + inline ::google::protobuf::FileOptions* unsafe_arena_release_options(); + inline void unsafe_arena_set_allocated_options( + ::google::protobuf::FileOptions* options); // optional .google.protobuf.SourceCodeInfo source_code_info = 9; inline bool has_source_code_info() const; @@ -418,6 +475,24 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag inline ::google::protobuf::SourceCodeInfo* mutable_source_code_info(); inline ::google::protobuf::SourceCodeInfo* release_source_code_info(); inline void set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info); + inline ::google::protobuf::SourceCodeInfo* unsafe_arena_release_source_code_info(); + inline void unsafe_arena_set_allocated_source_code_info( + ::google::protobuf::SourceCodeInfo* source_code_info); + + // optional string syntax = 12; + inline bool has_syntax() const; + inline void clear_syntax(); + static const int kSyntaxFieldNumber = 12; + inline const ::std::string& syntax() const; + inline void set_syntax(const ::std::string& value); + inline void set_syntax(const char* value); + inline void set_syntax(const char* value, size_t size); + inline ::std::string* mutable_syntax(); + inline ::std::string* release_syntax(); + inline void set_allocated_syntax(::std::string* syntax); + inline ::std::string* unsafe_arena_release_syntax(); + inline void unsafe_arena_set_allocated_syntax( + ::std::string* syntax); // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorProto) private: @@ -429,13 +504,17 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag inline void clear_has_options(); inline void set_has_source_code_info(); inline void clear_has_source_code_info(); + inline void set_has_syntax(); + inline void clear_has_syntax(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; - ::std::string* package_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr package_; ::google::protobuf::RepeatedPtrField< ::std::string> dependency_; ::google::protobuf::RepeatedField< ::google::protobuf::int32 > public_dependency_; ::google::protobuf::RepeatedField< ::google::protobuf::int32 > weak_dependency_; @@ -445,6 +524,7 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_; ::google::protobuf::FileOptions* options_; ::google::protobuf::SourceCodeInfo* source_code_info_; + ::google::protobuf::internal::ArenaStringPtr syntax_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); @@ -467,21 +547,28 @@ class LIBPROTOBUF_EXPORT DescriptorProto_ExtensionRange : public ::google::proto } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const DescriptorProto_ExtensionRange& default_instance(); + void UnsafeArenaSwap(DescriptorProto_ExtensionRange* other); void Swap(DescriptorProto_ExtensionRange* other); // implements Message ---------------------------------------------- - DescriptorProto_ExtensionRange* New() const; + inline DescriptorProto_ExtensionRange* New() const { return New(NULL); } + + DescriptorProto_ExtensionRange* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const DescriptorProto_ExtensionRange& from); @@ -500,7 +587,21 @@ class LIBPROTOBUF_EXPORT DescriptorProto_ExtensionRange : public ::google::proto void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(DescriptorProto_ExtensionRange* other); + protected: + explicit DescriptorProto_ExtensionRange(::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; // nested types ---------------------------------------------------- @@ -528,8 +629,10 @@ class LIBPROTOBUF_EXPORT DescriptorProto_ExtensionRange : public ::google::proto inline void set_has_end(); inline void clear_has_end(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::int32 start_; @@ -556,21 +659,28 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const DescriptorProto& default_instance(); + void UnsafeArenaSwap(DescriptorProto* other); void Swap(DescriptorProto* other); // implements Message ---------------------------------------------- - DescriptorProto* New() const; + inline DescriptorProto* New() const { return New(NULL); } + + DescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const DescriptorProto& from); @@ -589,7 +699,21 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(DescriptorProto* other); + protected: + explicit DescriptorProto(::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; // nested types ---------------------------------------------------- @@ -609,6 +733,9 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message { inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // repeated .google.protobuf.FieldDescriptorProto field = 2; inline int field_size() const; @@ -690,6 +817,9 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message { inline ::google::protobuf::MessageOptions* mutable_options(); inline ::google::protobuf::MessageOptions* release_options(); inline void set_allocated_options(::google::protobuf::MessageOptions* options); + inline ::google::protobuf::MessageOptions* unsafe_arena_release_options(); + inline void unsafe_arena_set_allocated_options( + ::google::protobuf::MessageOptions* options); // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto) private: @@ -698,11 +828,13 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message { inline void set_has_options(); inline void clear_has_options(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > field_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto > nested_type_; @@ -732,21 +864,28 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const FieldDescriptorProto& default_instance(); + void UnsafeArenaSwap(FieldDescriptorProto* other); void Swap(FieldDescriptorProto* other); // implements Message ---------------------------------------------- - FieldDescriptorProto* New() const; + inline FieldDescriptorProto* New() const { return New(NULL); } + + FieldDescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const FieldDescriptorProto& from); @@ -765,7 +904,21 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(FieldDescriptorProto* other); + protected: + explicit FieldDescriptorProto(::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; // nested types ---------------------------------------------------- @@ -848,6 +1001,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // optional int32 number = 3; inline bool has_number() const; @@ -881,6 +1037,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa inline ::std::string* mutable_type_name(); inline ::std::string* release_type_name(); inline void set_allocated_type_name(::std::string* type_name); + inline ::std::string* unsafe_arena_release_type_name(); + inline void unsafe_arena_set_allocated_type_name( + ::std::string* type_name); // optional string extendee = 2; inline bool has_extendee() const; @@ -893,6 +1052,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa inline ::std::string* mutable_extendee(); inline ::std::string* release_extendee(); inline void set_allocated_extendee(::std::string* extendee); + inline ::std::string* unsafe_arena_release_extendee(); + inline void unsafe_arena_set_allocated_extendee( + ::std::string* extendee); // optional string default_value = 7; inline bool has_default_value() const; @@ -905,6 +1067,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa inline ::std::string* mutable_default_value(); inline ::std::string* release_default_value(); inline void set_allocated_default_value(::std::string* default_value); + inline ::std::string* unsafe_arena_release_default_value(); + inline void unsafe_arena_set_allocated_default_value( + ::std::string* default_value); // optional int32 oneof_index = 9; inline bool has_oneof_index() const; @@ -921,6 +1086,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa inline ::google::protobuf::FieldOptions* mutable_options(); inline ::google::protobuf::FieldOptions* release_options(); inline void set_allocated_options(::google::protobuf::FieldOptions* options); + inline ::google::protobuf::FieldOptions* unsafe_arena_release_options(); + inline void unsafe_arena_set_allocated_options( + ::google::protobuf::FieldOptions* options); // @@protoc_insertion_point(class_scope:google.protobuf.FieldDescriptorProto) private: @@ -943,18 +1111,20 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa inline void set_has_options(); inline void clear_has_options(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::int32 number_; int label_; - ::std::string* type_name_; - ::std::string* extendee_; + ::google::protobuf::internal::ArenaStringPtr type_name_; + ::google::protobuf::internal::ArenaStringPtr extendee_; int type_; ::google::protobuf::int32 oneof_index_; - ::std::string* default_value_; + ::google::protobuf::internal::ArenaStringPtr default_value_; ::google::protobuf::FieldOptions* options_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); @@ -978,21 +1148,28 @@ class LIBPROTOBUF_EXPORT OneofDescriptorProto : public ::google::protobuf::Messa } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const OneofDescriptorProto& default_instance(); + void UnsafeArenaSwap(OneofDescriptorProto* other); void Swap(OneofDescriptorProto* other); // implements Message ---------------------------------------------- - OneofDescriptorProto* New() const; + inline OneofDescriptorProto* New() const { return New(NULL); } + + OneofDescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const OneofDescriptorProto& from); @@ -1011,7 +1188,21 @@ class LIBPROTOBUF_EXPORT OneofDescriptorProto : public ::google::protobuf::Messa void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(OneofDescriptorProto* other); + protected: + explicit OneofDescriptorProto(::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; // nested types ---------------------------------------------------- @@ -1029,17 +1220,22 @@ class LIBPROTOBUF_EXPORT OneofDescriptorProto : public ::google::protobuf::Messa inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // @@protoc_insertion_point(class_scope:google.protobuf.OneofDescriptorProto) private: inline void set_has_name(); inline void clear_has_name(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; + ::google::protobuf::internal::ArenaStringPtr name_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); @@ -1062,21 +1258,28 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const EnumDescriptorProto& default_instance(); + void UnsafeArenaSwap(EnumDescriptorProto* other); void Swap(EnumDescriptorProto* other); // implements Message ---------------------------------------------- - EnumDescriptorProto* New() const; + inline EnumDescriptorProto* New() const { return New(NULL); } + + EnumDescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const EnumDescriptorProto& from); @@ -1095,7 +1298,21 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(EnumDescriptorProto* other); + protected: + explicit EnumDescriptorProto(::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; // nested types ---------------------------------------------------- @@ -1113,6 +1330,9 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // repeated .google.protobuf.EnumValueDescriptorProto value = 2; inline int value_size() const; @@ -1134,6 +1354,9 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag inline ::google::protobuf::EnumOptions* mutable_options(); inline ::google::protobuf::EnumOptions* release_options(); inline void set_allocated_options(::google::protobuf::EnumOptions* options); + inline ::google::protobuf::EnumOptions* unsafe_arena_release_options(); + inline void unsafe_arena_set_allocated_options( + ::google::protobuf::EnumOptions* options); // @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto) private: @@ -1142,11 +1365,13 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag inline void set_has_options(); inline void clear_has_options(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto > value_; ::google::protobuf::EnumOptions* options_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); @@ -1171,21 +1396,28 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const EnumValueDescriptorProto& default_instance(); + void UnsafeArenaSwap(EnumValueDescriptorProto* other); void Swap(EnumValueDescriptorProto* other); // implements Message ---------------------------------------------- - EnumValueDescriptorProto* New() const; + inline EnumValueDescriptorProto* New() const { return New(NULL); } + + EnumValueDescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const EnumValueDescriptorProto& from); @@ -1204,7 +1436,21 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(EnumValueDescriptorProto* other); + protected: + explicit EnumValueDescriptorProto(::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; // nested types ---------------------------------------------------- @@ -1222,6 +1468,9 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // optional int32 number = 2; inline bool has_number() const; @@ -1238,6 +1487,9 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M inline ::google::protobuf::EnumValueOptions* mutable_options(); inline ::google::protobuf::EnumValueOptions* release_options(); inline void set_allocated_options(::google::protobuf::EnumValueOptions* options); + inline ::google::protobuf::EnumValueOptions* unsafe_arena_release_options(); + inline void unsafe_arena_set_allocated_options( + ::google::protobuf::EnumValueOptions* options); // @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto) private: @@ -1248,11 +1500,13 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M inline void set_has_options(); inline void clear_has_options(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::EnumValueOptions* options_; ::google::protobuf::int32 number_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); @@ -1277,21 +1531,28 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const ServiceDescriptorProto& default_instance(); + void UnsafeArenaSwap(ServiceDescriptorProto* other); void Swap(ServiceDescriptorProto* other); // implements Message ---------------------------------------------- - ServiceDescriptorProto* New() const; + inline ServiceDescriptorProto* New() const { return New(NULL); } + + ServiceDescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const ServiceDescriptorProto& from); @@ -1310,7 +1571,21 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(ServiceDescriptorProto* other); + protected: + explicit ServiceDescriptorProto(::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; // nested types ---------------------------------------------------- @@ -1328,6 +1603,9 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // repeated .google.protobuf.MethodDescriptorProto method = 2; inline int method_size() const; @@ -1349,6 +1627,9 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes inline ::google::protobuf::ServiceOptions* mutable_options(); inline ::google::protobuf::ServiceOptions* release_options(); inline void set_allocated_options(::google::protobuf::ServiceOptions* options); + inline ::google::protobuf::ServiceOptions* unsafe_arena_release_options(); + inline void unsafe_arena_set_allocated_options( + ::google::protobuf::ServiceOptions* options); // @@protoc_insertion_point(class_scope:google.protobuf.ServiceDescriptorProto) private: @@ -1357,11 +1638,13 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes inline void set_has_options(); inline void clear_has_options(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto > method_; ::google::protobuf::ServiceOptions* options_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); @@ -1386,21 +1669,28 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const MethodDescriptorProto& default_instance(); + void UnsafeArenaSwap(MethodDescriptorProto* other); void Swap(MethodDescriptorProto* other); // implements Message ---------------------------------------------- - MethodDescriptorProto* New() const; + inline MethodDescriptorProto* New() const { return New(NULL); } + + MethodDescriptorProto* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const MethodDescriptorProto& from); @@ -1419,7 +1709,21 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(MethodDescriptorProto* other); + protected: + explicit MethodDescriptorProto(::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; // nested types ---------------------------------------------------- @@ -1437,6 +1741,9 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess inline ::std::string* mutable_name(); inline ::std::string* release_name(); inline void set_allocated_name(::std::string* name); + inline ::std::string* unsafe_arena_release_name(); + inline void unsafe_arena_set_allocated_name( + ::std::string* name); // optional string input_type = 2; inline bool has_input_type() const; @@ -1449,6 +1756,9 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess inline ::std::string* mutable_input_type(); inline ::std::string* release_input_type(); inline void set_allocated_input_type(::std::string* input_type); + inline ::std::string* unsafe_arena_release_input_type(); + inline void unsafe_arena_set_allocated_input_type( + ::std::string* input_type); // optional string output_type = 3; inline bool has_output_type() const; @@ -1461,6 +1771,9 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess inline ::std::string* mutable_output_type(); inline ::std::string* release_output_type(); inline void set_allocated_output_type(::std::string* output_type); + inline ::std::string* unsafe_arena_release_output_type(); + inline void unsafe_arena_set_allocated_output_type( + ::std::string* output_type); // optional .google.protobuf.MethodOptions options = 4; inline bool has_options() const; @@ -1470,6 +1783,9 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess inline ::google::protobuf::MethodOptions* mutable_options(); inline ::google::protobuf::MethodOptions* release_options(); inline void set_allocated_options(::google::protobuf::MethodOptions* options); + inline ::google::protobuf::MethodOptions* unsafe_arena_release_options(); + inline void unsafe_arena_set_allocated_options( + ::google::protobuf::MethodOptions* options); // @@protoc_insertion_point(class_scope:google.protobuf.MethodDescriptorProto) private: @@ -1482,13 +1798,15 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess inline void set_has_options(); inline void clear_has_options(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_; - ::std::string* input_type_; - ::std::string* output_type_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr input_type_; + ::google::protobuf::internal::ArenaStringPtr output_type_; ::google::protobuf::MethodOptions* options_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); @@ -1512,21 +1830,28 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const FileOptions& default_instance(); + void UnsafeArenaSwap(FileOptions* other); void Swap(FileOptions* other); // implements Message ---------------------------------------------- - FileOptions* New() const; + inline FileOptions* New() const { return New(NULL); } + + FileOptions* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const FileOptions& from); @@ -1545,7 +1870,21 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(FileOptions* other); + protected: + explicit FileOptions(::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; // nested types ---------------------------------------------------- @@ -1588,6 +1927,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { inline ::std::string* mutable_java_package(); inline ::std::string* release_java_package(); inline void set_allocated_java_package(::std::string* java_package); + inline ::std::string* unsafe_arena_release_java_package(); + inline void unsafe_arena_set_allocated_java_package( + ::std::string* java_package); // optional string java_outer_classname = 8; inline bool has_java_outer_classname() const; @@ -1600,6 +1942,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { inline ::std::string* mutable_java_outer_classname(); inline ::std::string* release_java_outer_classname(); inline void set_allocated_java_outer_classname(::std::string* java_outer_classname); + inline ::std::string* unsafe_arena_release_java_outer_classname(); + inline void unsafe_arena_set_allocated_java_outer_classname( + ::std::string* java_outer_classname); // optional bool java_multiple_files = 10 [default = false]; inline bool has_java_multiple_files() const; @@ -1640,6 +1985,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { inline ::std::string* mutable_go_package(); inline ::std::string* release_go_package(); inline void set_allocated_go_package(::std::string* go_package); + inline ::std::string* unsafe_arena_release_go_package(); + inline void unsafe_arena_set_allocated_go_package( + ::std::string* go_package); // optional bool cc_generic_services = 16 [default = false]; inline bool has_cc_generic_services() const; @@ -1709,18 +2057,20 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { ::google::protobuf::internal::ExtensionSet _extensions_; - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* java_package_; - ::std::string* java_outer_classname_; + ::google::protobuf::internal::ArenaStringPtr java_package_; + ::google::protobuf::internal::ArenaStringPtr java_outer_classname_; bool java_multiple_files_; bool java_generate_equals_and_hash_; bool java_string_check_utf8_; bool cc_generic_services_; int optimize_for_; - ::std::string* go_package_; + ::google::protobuf::internal::ArenaStringPtr go_package_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; bool java_generic_services_; bool py_generic_services_; @@ -1747,21 +2097,28 @@ class LIBPROTOBUF_EXPORT MessageOptions : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const MessageOptions& default_instance(); + void UnsafeArenaSwap(MessageOptions* other); void Swap(MessageOptions* other); // implements Message ---------------------------------------------- - MessageOptions* New() const; + inline MessageOptions* New() const { return New(NULL); } + + MessageOptions* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const MessageOptions& from); @@ -1780,7 +2137,21 @@ class LIBPROTOBUF_EXPORT MessageOptions : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(MessageOptions* other); + protected: + explicit MessageOptions(::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; // nested types ---------------------------------------------------- @@ -1808,6 +2179,13 @@ class LIBPROTOBUF_EXPORT MessageOptions : public ::google::protobuf::Message { inline bool deprecated() const; inline void set_deprecated(bool value); + // optional bool map_entry = 7; + inline bool has_map_entry() const; + inline void clear_map_entry(); + static const int kMapEntryFieldNumber = 7; + inline bool map_entry() const; + inline void set_map_entry(bool value); + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; inline int uninterpreted_option_size() const; inline void clear_uninterpreted_option(); @@ -1829,17 +2207,22 @@ class LIBPROTOBUF_EXPORT MessageOptions : public ::google::protobuf::Message { inline void clear_has_no_standard_descriptor_accessor(); inline void set_has_deprecated(); inline void clear_has_deprecated(); + inline void set_has_map_entry(); + inline void clear_has_map_entry(); ::google::protobuf::internal::ExtensionSet _extensions_; - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; bool message_set_wire_format_; bool no_standard_descriptor_accessor_; bool deprecated_; + bool map_entry_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); @@ -1862,21 +2245,28 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const FieldOptions& default_instance(); + void UnsafeArenaSwap(FieldOptions* other); void Swap(FieldOptions* other); // implements Message ---------------------------------------------- - FieldOptions* New() const; + inline FieldOptions* New() const { return New(NULL); } + + FieldOptions* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const FieldOptions& from); @@ -1895,7 +2285,21 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(FieldOptions* other); + protected: + explicit FieldOptions(::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; // nested types ---------------------------------------------------- @@ -1955,18 +2359,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message { inline bool deprecated() const; inline void set_deprecated(bool value); - // optional string experimental_map_key = 9; - inline bool has_experimental_map_key() const; - inline void clear_experimental_map_key(); - static const int kExperimentalMapKeyFieldNumber = 9; - inline const ::std::string& experimental_map_key() const; - inline void set_experimental_map_key(const ::std::string& value); - inline void set_experimental_map_key(const char* value); - inline void set_experimental_map_key(const char* value, size_t size); - inline ::std::string* mutable_experimental_map_key(); - inline ::std::string* release_experimental_map_key(); - inline void set_allocated_experimental_map_key(::std::string* experimental_map_key); - // optional bool weak = 10 [default = false]; inline bool has_weak() const; inline void clear_weak(); @@ -1997,15 +2389,15 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message { inline void clear_has_lazy(); inline void set_has_deprecated(); inline void clear_has_deprecated(); - inline void set_has_experimental_map_key(); - inline void clear_has_experimental_map_key(); inline void set_has_weak(); inline void clear_has_weak(); ::google::protobuf::internal::ExtensionSet _extensions_; - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; int ctype_; @@ -2013,7 +2405,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message { bool lazy_; bool deprecated_; bool weak_; - ::std::string* experimental_map_key_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); @@ -2037,21 +2428,28 @@ class LIBPROTOBUF_EXPORT EnumOptions : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const EnumOptions& default_instance(); + void UnsafeArenaSwap(EnumOptions* other); void Swap(EnumOptions* other); // implements Message ---------------------------------------------- - EnumOptions* New() const; + inline EnumOptions* New() const { return New(NULL); } + + EnumOptions* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const EnumOptions& from); @@ -2070,7 +2468,21 @@ class LIBPROTOBUF_EXPORT EnumOptions : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(EnumOptions* other); + protected: + explicit EnumOptions(::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; // nested types ---------------------------------------------------- @@ -2113,8 +2525,10 @@ class LIBPROTOBUF_EXPORT EnumOptions : public ::google::protobuf::Message { ::google::protobuf::internal::ExtensionSet _extensions_; - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; @@ -2142,21 +2556,28 @@ class LIBPROTOBUF_EXPORT EnumValueOptions : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const EnumValueOptions& default_instance(); + void UnsafeArenaSwap(EnumValueOptions* other); void Swap(EnumValueOptions* other); // implements Message ---------------------------------------------- - EnumValueOptions* New() const; + inline EnumValueOptions* New() const { return New(NULL); } + + EnumValueOptions* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const EnumValueOptions& from); @@ -2175,7 +2596,21 @@ class LIBPROTOBUF_EXPORT EnumValueOptions : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(EnumValueOptions* other); + protected: + explicit EnumValueOptions(::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; // nested types ---------------------------------------------------- @@ -2209,8 +2644,10 @@ class LIBPROTOBUF_EXPORT EnumValueOptions : public ::google::protobuf::Message { ::google::protobuf::internal::ExtensionSet _extensions_; - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; @@ -2237,21 +2674,28 @@ class LIBPROTOBUF_EXPORT ServiceOptions : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const ServiceOptions& default_instance(); + void UnsafeArenaSwap(ServiceOptions* other); void Swap(ServiceOptions* other); // implements Message ---------------------------------------------- - ServiceOptions* New() const; + inline ServiceOptions* New() const { return New(NULL); } + + ServiceOptions* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const ServiceOptions& from); @@ -2270,7 +2714,21 @@ class LIBPROTOBUF_EXPORT ServiceOptions : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(ServiceOptions* other); + protected: + explicit ServiceOptions(::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; // nested types ---------------------------------------------------- @@ -2304,8 +2762,10 @@ class LIBPROTOBUF_EXPORT ServiceOptions : public ::google::protobuf::Message { ::google::protobuf::internal::ExtensionSet _extensions_; - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; @@ -2332,21 +2792,28 @@ class LIBPROTOBUF_EXPORT MethodOptions : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const MethodOptions& default_instance(); + void UnsafeArenaSwap(MethodOptions* other); void Swap(MethodOptions* other); // implements Message ---------------------------------------------- - MethodOptions* New() const; + inline MethodOptions* New() const { return New(NULL); } + + MethodOptions* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const MethodOptions& from); @@ -2365,7 +2832,21 @@ class LIBPROTOBUF_EXPORT MethodOptions : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(MethodOptions* other); + protected: + explicit MethodOptions(::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; // nested types ---------------------------------------------------- @@ -2399,8 +2880,10 @@ class LIBPROTOBUF_EXPORT MethodOptions : public ::google::protobuf::Message { ::google::protobuf::internal::ExtensionSet _extensions_; - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; @@ -2427,21 +2910,28 @@ class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobu } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const UninterpretedOption_NamePart& default_instance(); + void UnsafeArenaSwap(UninterpretedOption_NamePart* other); void Swap(UninterpretedOption_NamePart* other); // implements Message ---------------------------------------------- - UninterpretedOption_NamePart* New() const; + inline UninterpretedOption_NamePart* New() const { return New(NULL); } + + UninterpretedOption_NamePart* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const UninterpretedOption_NamePart& from); @@ -2460,7 +2950,21 @@ class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobu void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(UninterpretedOption_NamePart* other); + protected: + explicit UninterpretedOption_NamePart(::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; // nested types ---------------------------------------------------- @@ -2478,6 +2982,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobu inline ::std::string* mutable_name_part(); inline ::std::string* release_name_part(); inline void set_allocated_name_part(::std::string* name_part); + inline ::std::string* unsafe_arena_release_name_part(); + inline void unsafe_arena_set_allocated_name_part( + ::std::string* name_part); // required bool is_extension = 2; inline bool has_is_extension() const; @@ -2493,11 +3000,16 @@ class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobu inline void set_has_is_extension(); inline void clear_has_is_extension(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; + // helper for ByteSize() + int RequiredFieldsByteSizeFallback() const; + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; - ::std::string* name_part_; + ::google::protobuf::internal::ArenaStringPtr name_part_; bool is_extension_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); @@ -2521,21 +3033,28 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const UninterpretedOption& default_instance(); + void UnsafeArenaSwap(UninterpretedOption* other); void Swap(UninterpretedOption* other); // implements Message ---------------------------------------------- - UninterpretedOption* New() const; + inline UninterpretedOption* New() const { return New(NULL); } + + UninterpretedOption* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const UninterpretedOption& from); @@ -2554,7 +3073,21 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(UninterpretedOption* other); + protected: + explicit UninterpretedOption(::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; // nested types ---------------------------------------------------- @@ -2586,6 +3119,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag inline ::std::string* mutable_identifier_value(); inline ::std::string* release_identifier_value(); inline void set_allocated_identifier_value(::std::string* identifier_value); + inline ::std::string* unsafe_arena_release_identifier_value(); + inline void unsafe_arena_set_allocated_identifier_value( + ::std::string* identifier_value); // optional uint64 positive_int_value = 4; inline bool has_positive_int_value() const; @@ -2619,6 +3155,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag inline ::std::string* mutable_string_value(); inline ::std::string* release_string_value(); inline void set_allocated_string_value(::std::string* string_value); + inline ::std::string* unsafe_arena_release_string_value(); + inline void unsafe_arena_set_allocated_string_value( + ::std::string* string_value); // optional string aggregate_value = 8; inline bool has_aggregate_value() const; @@ -2631,6 +3170,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag inline ::std::string* mutable_aggregate_value(); inline ::std::string* release_aggregate_value(); inline void set_allocated_aggregate_value(::std::string* aggregate_value); + inline ::std::string* unsafe_arena_release_aggregate_value(); + inline void unsafe_arena_set_allocated_aggregate_value( + ::std::string* aggregate_value); // @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption) private: @@ -2647,17 +3189,19 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag inline void set_has_aggregate_value(); inline void clear_has_aggregate_value(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart > name_; - ::std::string* identifier_value_; + ::google::protobuf::internal::ArenaStringPtr identifier_value_; ::google::protobuf::uint64 positive_int_value_; ::google::protobuf::int64 negative_int_value_; double double_value_; - ::std::string* string_value_; - ::std::string* aggregate_value_; + ::google::protobuf::internal::ArenaStringPtr string_value_; + ::google::protobuf::internal::ArenaStringPtr aggregate_value_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); @@ -2680,21 +3224,28 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const SourceCodeInfo_Location& default_instance(); + void UnsafeArenaSwap(SourceCodeInfo_Location* other); void Swap(SourceCodeInfo_Location* other); // implements Message ---------------------------------------------- - SourceCodeInfo_Location* New() const; + inline SourceCodeInfo_Location* New() const { return New(NULL); } + + SourceCodeInfo_Location* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const SourceCodeInfo_Location& from); @@ -2713,7 +3264,21 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(SourceCodeInfo_Location* other); + protected: + explicit SourceCodeInfo_Location(::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; // nested types ---------------------------------------------------- @@ -2755,6 +3320,9 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me inline ::std::string* mutable_leading_comments(); inline ::std::string* release_leading_comments(); inline void set_allocated_leading_comments(::std::string* leading_comments); + inline ::std::string* unsafe_arena_release_leading_comments(); + inline void unsafe_arena_set_allocated_leading_comments( + ::std::string* leading_comments); // optional string trailing_comments = 4; inline bool has_trailing_comments() const; @@ -2767,6 +3335,9 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me inline ::std::string* mutable_trailing_comments(); inline ::std::string* release_trailing_comments(); inline void set_allocated_trailing_comments(::std::string* trailing_comments); + inline ::std::string* unsafe_arena_release_trailing_comments(); + inline void unsafe_arena_set_allocated_trailing_comments( + ::std::string* trailing_comments); // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo.Location) private: @@ -2775,16 +3346,18 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me inline void set_has_trailing_comments(); inline void clear_has_trailing_comments(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedField< ::google::protobuf::int32 > path_; mutable int _path_cached_byte_size_; ::google::protobuf::RepeatedField< ::google::protobuf::int32 > span_; mutable int _span_cached_byte_size_; - ::std::string* leading_comments_; - ::std::string* trailing_comments_; + ::google::protobuf::internal::ArenaStringPtr leading_comments_; + ::google::protobuf::internal::ArenaStringPtr trailing_comments_; friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); @@ -2807,21 +3380,28 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const SourceCodeInfo& default_instance(); + void UnsafeArenaSwap(SourceCodeInfo* other); void Swap(SourceCodeInfo* other); // implements Message ---------------------------------------------- - SourceCodeInfo* New() const; + inline SourceCodeInfo* New() const { return New(NULL); } + + SourceCodeInfo* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const SourceCodeInfo& from); @@ -2840,7 +3420,21 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo : public ::google::protobuf::Message { void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; + void InternalSwap(SourceCodeInfo* other); + protected: + explicit SourceCodeInfo(::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; // nested types ---------------------------------------------------- @@ -2864,8 +3458,10 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo) private: - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::uint32 _has_bits_[1]; mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location > location_; @@ -2928,68 +3524,67 @@ inline void FileDescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void FileDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& FileDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FileDescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name) } inline void FileDescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name) } -inline void FileDescriptorProto::set_name(const char* value, size_t size) { +inline void FileDescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name) } inline ::std::string* FileDescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FileDescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FileDescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FileDescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name) +} +inline void FileDescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name) } @@ -3004,68 +3599,67 @@ inline void FileDescriptorProto::clear_has_package() { _has_bits_[0] &= ~0x00000002u; } inline void FileDescriptorProto::clear_package() { - if (package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - package_->clear(); - } + package_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_package(); } inline const ::std::string& FileDescriptorProto::package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package) - return *package_; + return package_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FileDescriptorProto::set_package(const ::std::string& value) { set_has_package(); - if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - package_ = new ::std::string; - } - package_->assign(value); + package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package) } inline void FileDescriptorProto::set_package(const char* value) { set_has_package(); - if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - package_ = new ::std::string; - } - package_->assign(value); + package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package) } -inline void FileDescriptorProto::set_package(const char* value, size_t size) { +inline void FileDescriptorProto::set_package(const char* value, + size_t size) { set_has_package(); - if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - package_ = new ::std::string; - } - package_->assign(reinterpret_cast<const char*>(value), size); + package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package) } inline ::std::string* FileDescriptorProto::mutable_package() { set_has_package(); - if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - package_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package) - return package_; + return package_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FileDescriptorProto::release_package() { clear_has_package(); - if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = package_; - package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return package_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FileDescriptorProto::unsafe_arena_release_package() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_package(); + return package_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FileDescriptorProto::set_allocated_package(::std::string* package) { - if (package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete package_; + if (package != NULL) { + set_has_package(); + } else { + clear_has_package(); } - if (package) { + package_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package) +} +inline void FileDescriptorProto::unsafe_arena_set_allocated_package( + ::std::string* package) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (package != NULL) { set_has_package(); - package_ = package; } else { clear_has_package(); - package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_package(); + package_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package) } @@ -3323,18 +3917,53 @@ inline const ::google::protobuf::FileOptions& FileDescriptorProto::options() con } inline ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() { set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::FileOptions; + if (options_ == NULL) { + options_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::FileOptions >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options) return options_; } inline ::google::protobuf::FileOptions* FileDescriptorProto::release_options() { clear_has_options(); + if (GetArenaNoVirtual() != NULL) { + if (options_ == NULL) { + return NULL; + } else { + ::google::protobuf::FileOptions* temp = new ::google::protobuf::FileOptions; + temp->MergeFrom(*options_); + options_ = NULL; + return temp; + } + } else { + ::google::protobuf::FileOptions* temp = options_; + options_ = NULL; + return temp; + } +} +inline ::google::protobuf::FileOptions* FileDescriptorProto::unsafe_arena_release_options() { + clear_has_options(); ::google::protobuf::FileOptions* temp = options_; options_ = NULL; return temp; } inline void FileDescriptorProto::set_allocated_options(::google::protobuf::FileOptions* options) { - delete options_; + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + if (options != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(options) == NULL) { + GetArenaNoVirtual()->Own(options); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(options)) { + ::google::protobuf::FileOptions* new_options = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::FileOptions >( + GetArenaNoVirtual()); + new_options->CopyFrom(*options); + options = new_options; + } + } options_ = options; if (options) { set_has_options(); @@ -3343,6 +3972,19 @@ inline void FileDescriptorProto::set_allocated_options(::google::protobuf::FileO } // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options) } +inline void FileDescriptorProto::unsafe_arena_set_allocated_options( + ::google::protobuf::FileOptions* options) { + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + options_ = options; + if (options) { + set_has_options(); + } else { + clear_has_options(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.options) +} // optional .google.protobuf.SourceCodeInfo source_code_info = 9; inline bool FileDescriptorProto::has_source_code_info() const { @@ -3364,18 +4006,53 @@ inline const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_cod } inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { set_has_source_code_info(); - if (source_code_info_ == NULL) source_code_info_ = new ::google::protobuf::SourceCodeInfo; + if (source_code_info_ == NULL) { + source_code_info_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::SourceCodeInfo >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info) return source_code_info_; } inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() { clear_has_source_code_info(); + if (GetArenaNoVirtual() != NULL) { + if (source_code_info_ == NULL) { + return NULL; + } else { + ::google::protobuf::SourceCodeInfo* temp = new ::google::protobuf::SourceCodeInfo; + temp->MergeFrom(*source_code_info_); + source_code_info_ = NULL; + return temp; + } + } else { + ::google::protobuf::SourceCodeInfo* temp = source_code_info_; + source_code_info_ = NULL; + return temp; + } +} +inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::unsafe_arena_release_source_code_info() { + clear_has_source_code_info(); ::google::protobuf::SourceCodeInfo* temp = source_code_info_; source_code_info_ = NULL; return temp; } inline void FileDescriptorProto::set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info) { - delete source_code_info_; + if (GetArenaNoVirtual() == NULL) { + delete source_code_info_; + } + if (source_code_info != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(source_code_info) == NULL) { + GetArenaNoVirtual()->Own(source_code_info); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(source_code_info)) { + ::google::protobuf::SourceCodeInfo* new_source_code_info = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::SourceCodeInfo >( + GetArenaNoVirtual()); + new_source_code_info->CopyFrom(*source_code_info); + source_code_info = new_source_code_info; + } + } source_code_info_ = source_code_info; if (source_code_info) { set_has_source_code_info(); @@ -3384,6 +4061,94 @@ inline void FileDescriptorProto::set_allocated_source_code_info(::google::protob } // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info) } +inline void FileDescriptorProto::unsafe_arena_set_allocated_source_code_info( + ::google::protobuf::SourceCodeInfo* source_code_info) { + if (GetArenaNoVirtual() == NULL) { + delete source_code_info_; + } + source_code_info_ = source_code_info; + if (source_code_info) { + set_has_source_code_info(); + } else { + clear_has_source_code_info(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.source_code_info) +} + +// optional string syntax = 12; +inline bool FileDescriptorProto::has_syntax() const { + return (_has_bits_[0] & 0x00000800u) != 0; +} +inline void FileDescriptorProto::set_has_syntax() { + _has_bits_[0] |= 0x00000800u; +} +inline void FileDescriptorProto::clear_has_syntax() { + _has_bits_[0] &= ~0x00000800u; +} +inline void FileDescriptorProto::clear_syntax() { + syntax_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + clear_has_syntax(); +} +inline const ::std::string& FileDescriptorProto::syntax() const { + // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax) + return syntax_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FileDescriptorProto::set_syntax(const ::std::string& value) { + set_has_syntax(); + syntax_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax) +} +inline void FileDescriptorProto::set_syntax(const char* value) { + set_has_syntax(); + syntax_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax) +} +inline void FileDescriptorProto::set_syntax(const char* value, + size_t size) { + set_has_syntax(); + syntax_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax) +} +inline ::std::string* FileDescriptorProto::mutable_syntax() { + set_has_syntax(); + // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax) + return syntax_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FileDescriptorProto::release_syntax() { + clear_has_syntax(); + return syntax_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FileDescriptorProto::unsafe_arena_release_syntax() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_syntax(); + return syntax_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) { + if (syntax != NULL) { + set_has_syntax(); + } else { + clear_has_syntax(); + } + syntax_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax) +} +inline void FileDescriptorProto::unsafe_arena_set_allocated_syntax( + ::std::string* syntax) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (syntax != NULL) { + set_has_syntax(); + } else { + clear_has_syntax(); + } + set_has_syntax(); + syntax_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + syntax, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax) +} // ------------------------------------------------------------------- @@ -3452,68 +4217,67 @@ inline void DescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void DescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& DescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void DescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name) } inline void DescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name) } -inline void DescriptorProto::set_name(const char* value, size_t size) { +inline void DescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name) } inline ::std::string* DescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* DescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* DescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void DescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name) +} +inline void DescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name) } @@ -3717,18 +4481,53 @@ inline const ::google::protobuf::MessageOptions& DescriptorProto::options() cons } inline ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() { set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::MessageOptions; + if (options_ == NULL) { + options_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::MessageOptions >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options) return options_; } inline ::google::protobuf::MessageOptions* DescriptorProto::release_options() { clear_has_options(); + if (GetArenaNoVirtual() != NULL) { + if (options_ == NULL) { + return NULL; + } else { + ::google::protobuf::MessageOptions* temp = new ::google::protobuf::MessageOptions; + temp->MergeFrom(*options_); + options_ = NULL; + return temp; + } + } else { + ::google::protobuf::MessageOptions* temp = options_; + options_ = NULL; + return temp; + } +} +inline ::google::protobuf::MessageOptions* DescriptorProto::unsafe_arena_release_options() { + clear_has_options(); ::google::protobuf::MessageOptions* temp = options_; options_ = NULL; return temp; } inline void DescriptorProto::set_allocated_options(::google::protobuf::MessageOptions* options) { - delete options_; + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + if (options != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(options) == NULL) { + GetArenaNoVirtual()->Own(options); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(options)) { + ::google::protobuf::MessageOptions* new_options = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::MessageOptions >( + GetArenaNoVirtual()); + new_options->CopyFrom(*options); + options = new_options; + } + } options_ = options; if (options) { set_has_options(); @@ -3737,6 +4536,19 @@ inline void DescriptorProto::set_allocated_options(::google::protobuf::MessageOp } // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options) } +inline void DescriptorProto::unsafe_arena_set_allocated_options( + ::google::protobuf::MessageOptions* options) { + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + options_ = options; + if (options) { + set_has_options(); + } else { + clear_has_options(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.options) +} // ------------------------------------------------------------------- @@ -3753,68 +4565,67 @@ inline void FieldDescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void FieldDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& FieldDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FieldDescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name) } inline void FieldDescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name) } -inline void FieldDescriptorProto::set_name(const char* value, size_t size) { +inline void FieldDescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name) } inline ::std::string* FieldDescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FieldDescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FieldDescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FieldDescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name) +} +inline void FieldDescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name) } @@ -3903,68 +4714,67 @@ inline void FieldDescriptorProto::clear_has_type_name() { _has_bits_[0] &= ~0x00000010u; } inline void FieldDescriptorProto::clear_type_name() { - if (type_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - type_name_->clear(); - } + type_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_type_name(); } inline const ::std::string& FieldDescriptorProto::type_name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name) - return *type_name_; + return type_name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FieldDescriptorProto::set_type_name(const ::std::string& value) { set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - type_name_ = new ::std::string; - } - type_name_->assign(value); + type_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name) } inline void FieldDescriptorProto::set_type_name(const char* value) { set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - type_name_ = new ::std::string; - } - type_name_->assign(value); + type_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name) } -inline void FieldDescriptorProto::set_type_name(const char* value, size_t size) { +inline void FieldDescriptorProto::set_type_name(const char* value, + size_t size) { set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - type_name_ = new ::std::string; - } - type_name_->assign(reinterpret_cast<const char*>(value), size); + type_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name) } inline ::std::string* FieldDescriptorProto::mutable_type_name() { set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - type_name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name) - return type_name_; + return type_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FieldDescriptorProto::release_type_name() { clear_has_type_name(); - if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = type_name_; - type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return type_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FieldDescriptorProto::unsafe_arena_release_type_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_type_name(); + return type_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) { - if (type_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete type_name_; + if (type_name != NULL) { + set_has_type_name(); + } else { + clear_has_type_name(); } - if (type_name) { + type_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name) +} +inline void FieldDescriptorProto::unsafe_arena_set_allocated_type_name( + ::std::string* type_name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (type_name != NULL) { set_has_type_name(); - type_name_ = type_name; } else { clear_has_type_name(); - type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_type_name(); + type_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name) } @@ -3979,68 +4789,67 @@ inline void FieldDescriptorProto::clear_has_extendee() { _has_bits_[0] &= ~0x00000020u; } inline void FieldDescriptorProto::clear_extendee() { - if (extendee_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - extendee_->clear(); - } + extendee_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_extendee(); } inline const ::std::string& FieldDescriptorProto::extendee() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee) - return *extendee_; + return extendee_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FieldDescriptorProto::set_extendee(const ::std::string& value) { set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - extendee_ = new ::std::string; - } - extendee_->assign(value); + extendee_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee) } inline void FieldDescriptorProto::set_extendee(const char* value) { set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - extendee_ = new ::std::string; - } - extendee_->assign(value); + extendee_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee) } -inline void FieldDescriptorProto::set_extendee(const char* value, size_t size) { +inline void FieldDescriptorProto::set_extendee(const char* value, + size_t size) { set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - extendee_ = new ::std::string; - } - extendee_->assign(reinterpret_cast<const char*>(value), size); + extendee_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee) } inline ::std::string* FieldDescriptorProto::mutable_extendee() { set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - extendee_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee) - return extendee_; + return extendee_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FieldDescriptorProto::release_extendee() { clear_has_extendee(); - if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = extendee_; - extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return extendee_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FieldDescriptorProto::unsafe_arena_release_extendee() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_extendee(); + return extendee_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) { - if (extendee_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete extendee_; + if (extendee != NULL) { + set_has_extendee(); + } else { + clear_has_extendee(); } - if (extendee) { + extendee_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee) +} +inline void FieldDescriptorProto::unsafe_arena_set_allocated_extendee( + ::std::string* extendee) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (extendee != NULL) { set_has_extendee(); - extendee_ = extendee; } else { clear_has_extendee(); - extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_extendee(); + extendee_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + extendee, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee) } @@ -4055,68 +4864,67 @@ inline void FieldDescriptorProto::clear_has_default_value() { _has_bits_[0] &= ~0x00000040u; } inline void FieldDescriptorProto::clear_default_value() { - if (default_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - default_value_->clear(); - } + default_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_default_value(); } inline const ::std::string& FieldDescriptorProto::default_value() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value) - return *default_value_; + return default_value_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FieldDescriptorProto::set_default_value(const ::std::string& value) { set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - default_value_ = new ::std::string; - } - default_value_->assign(value); + default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value) } inline void FieldDescriptorProto::set_default_value(const char* value) { set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - default_value_ = new ::std::string; - } - default_value_->assign(value); + default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value) } -inline void FieldDescriptorProto::set_default_value(const char* value, size_t size) { +inline void FieldDescriptorProto::set_default_value(const char* value, + size_t size) { set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - default_value_ = new ::std::string; - } - default_value_->assign(reinterpret_cast<const char*>(value), size); + default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value) } inline ::std::string* FieldDescriptorProto::mutable_default_value() { set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - default_value_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value) - return default_value_; + return default_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FieldDescriptorProto::release_default_value() { clear_has_default_value(); - if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = default_value_; - default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return default_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FieldDescriptorProto::unsafe_arena_release_default_value() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_default_value(); + return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) { - if (default_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete default_value_; + if (default_value != NULL) { + set_has_default_value(); + } else { + clear_has_default_value(); } - if (default_value) { + default_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value) +} +inline void FieldDescriptorProto::unsafe_arena_set_allocated_default_value( + ::std::string* default_value) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (default_value != NULL) { set_has_default_value(); - default_value_ = default_value; } else { clear_has_default_value(); - default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_default_value(); + default_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + default_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value) } @@ -4164,18 +4972,53 @@ inline const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() c } inline ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() { set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::FieldOptions; + if (options_ == NULL) { + options_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::FieldOptions >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options) return options_; } inline ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() { clear_has_options(); + if (GetArenaNoVirtual() != NULL) { + if (options_ == NULL) { + return NULL; + } else { + ::google::protobuf::FieldOptions* temp = new ::google::protobuf::FieldOptions; + temp->MergeFrom(*options_); + options_ = NULL; + return temp; + } + } else { + ::google::protobuf::FieldOptions* temp = options_; + options_ = NULL; + return temp; + } +} +inline ::google::protobuf::FieldOptions* FieldDescriptorProto::unsafe_arena_release_options() { + clear_has_options(); ::google::protobuf::FieldOptions* temp = options_; options_ = NULL; return temp; } inline void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOptions* options) { - delete options_; + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + if (options != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(options) == NULL) { + GetArenaNoVirtual()->Own(options); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(options)) { + ::google::protobuf::FieldOptions* new_options = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::FieldOptions >( + GetArenaNoVirtual()); + new_options->CopyFrom(*options); + options = new_options; + } + } options_ = options; if (options) { set_has_options(); @@ -4184,6 +5027,19 @@ inline void FieldDescriptorProto::set_allocated_options(::google::protobuf::Fiel } // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options) } +inline void FieldDescriptorProto::unsafe_arena_set_allocated_options( + ::google::protobuf::FieldOptions* options) { + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + options_ = options; + if (options) { + set_has_options(); + } else { + clear_has_options(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.options) +} // ------------------------------------------------------------------- @@ -4200,68 +5056,67 @@ inline void OneofDescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void OneofDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& OneofDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void OneofDescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name) } inline void OneofDescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name) } -inline void OneofDescriptorProto::set_name(const char* value, size_t size) { +inline void OneofDescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name) } inline ::std::string* OneofDescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OneofDescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OneofDescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void OneofDescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name) +} +inline void OneofDescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name) } @@ -4280,68 +5135,67 @@ inline void EnumDescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void EnumDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& EnumDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void EnumDescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name) } inline void EnumDescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name) } -inline void EnumDescriptorProto::set_name(const char* value, size_t size) { +inline void EnumDescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name) } inline ::std::string* EnumDescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* EnumDescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* EnumDescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void EnumDescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name) +} +inline void EnumDescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name) } @@ -4395,18 +5249,53 @@ inline const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() con } inline ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() { set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::EnumOptions; + if (options_ == NULL) { + options_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::EnumOptions >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options) return options_; } inline ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() { clear_has_options(); + if (GetArenaNoVirtual() != NULL) { + if (options_ == NULL) { + return NULL; + } else { + ::google::protobuf::EnumOptions* temp = new ::google::protobuf::EnumOptions; + temp->MergeFrom(*options_); + options_ = NULL; + return temp; + } + } else { + ::google::protobuf::EnumOptions* temp = options_; + options_ = NULL; + return temp; + } +} +inline ::google::protobuf::EnumOptions* EnumDescriptorProto::unsafe_arena_release_options() { + clear_has_options(); ::google::protobuf::EnumOptions* temp = options_; options_ = NULL; return temp; } inline void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions* options) { - delete options_; + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + if (options != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(options) == NULL) { + GetArenaNoVirtual()->Own(options); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(options)) { + ::google::protobuf::EnumOptions* new_options = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::EnumOptions >( + GetArenaNoVirtual()); + new_options->CopyFrom(*options); + options = new_options; + } + } options_ = options; if (options) { set_has_options(); @@ -4415,6 +5304,19 @@ inline void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumO } // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options) } +inline void EnumDescriptorProto::unsafe_arena_set_allocated_options( + ::google::protobuf::EnumOptions* options) { + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + options_ = options; + if (options) { + set_has_options(); + } else { + clear_has_options(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumDescriptorProto.options) +} // ------------------------------------------------------------------- @@ -4431,68 +5333,67 @@ inline void EnumValueDescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void EnumValueDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& EnumValueDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void EnumValueDescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name) } inline void EnumValueDescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name) } -inline void EnumValueDescriptorProto::set_name(const char* value, size_t size) { +inline void EnumValueDescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name) } inline ::std::string* EnumValueDescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* EnumValueDescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* EnumValueDescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void EnumValueDescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name) +} +inline void EnumValueDescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name) } @@ -4540,18 +5441,53 @@ inline const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::opt } inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::EnumValueOptions; + if (options_ == NULL) { + options_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::EnumValueOptions >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options) return options_; } inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() { clear_has_options(); + if (GetArenaNoVirtual() != NULL) { + if (options_ == NULL) { + return NULL; + } else { + ::google::protobuf::EnumValueOptions* temp = new ::google::protobuf::EnumValueOptions; + temp->MergeFrom(*options_); + options_ = NULL; + return temp; + } + } else { + ::google::protobuf::EnumValueOptions* temp = options_; + options_ = NULL; + return temp; + } +} +inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::unsafe_arena_release_options() { + clear_has_options(); ::google::protobuf::EnumValueOptions* temp = options_; options_ = NULL; return temp; } inline void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumValueOptions* options) { - delete options_; + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + if (options != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(options) == NULL) { + GetArenaNoVirtual()->Own(options); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(options)) { + ::google::protobuf::EnumValueOptions* new_options = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::EnumValueOptions >( + GetArenaNoVirtual()); + new_options->CopyFrom(*options); + options = new_options; + } + } options_ = options; if (options) { set_has_options(); @@ -4560,6 +5496,19 @@ inline void EnumValueDescriptorProto::set_allocated_options(::google::protobuf:: } // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options) } +inline void EnumValueDescriptorProto::unsafe_arena_set_allocated_options( + ::google::protobuf::EnumValueOptions* options) { + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + options_ = options; + if (options) { + set_has_options(); + } else { + clear_has_options(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValueDescriptorProto.options) +} // ------------------------------------------------------------------- @@ -4576,68 +5525,67 @@ inline void ServiceDescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void ServiceDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& ServiceDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void ServiceDescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name) } inline void ServiceDescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name) } -inline void ServiceDescriptorProto::set_name(const char* value, size_t size) { +inline void ServiceDescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name) } inline ::std::string* ServiceDescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* ServiceDescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* ServiceDescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void ServiceDescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name) +} +inline void ServiceDescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name) } @@ -4691,18 +5639,53 @@ inline const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options } inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() { set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::ServiceOptions; + if (options_ == NULL) { + options_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::ServiceOptions >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options) return options_; } inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() { clear_has_options(); + if (GetArenaNoVirtual() != NULL) { + if (options_ == NULL) { + return NULL; + } else { + ::google::protobuf::ServiceOptions* temp = new ::google::protobuf::ServiceOptions; + temp->MergeFrom(*options_); + options_ = NULL; + return temp; + } + } else { + ::google::protobuf::ServiceOptions* temp = options_; + options_ = NULL; + return temp; + } +} +inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::unsafe_arena_release_options() { + clear_has_options(); ::google::protobuf::ServiceOptions* temp = options_; options_ = NULL; return temp; } inline void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOptions* options) { - delete options_; + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + if (options != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(options) == NULL) { + GetArenaNoVirtual()->Own(options); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(options)) { + ::google::protobuf::ServiceOptions* new_options = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::ServiceOptions >( + GetArenaNoVirtual()); + new_options->CopyFrom(*options); + options = new_options; + } + } options_ = options; if (options) { set_has_options(); @@ -4711,6 +5694,19 @@ inline void ServiceDescriptorProto::set_allocated_options(::google::protobuf::Se } // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options) } +inline void ServiceDescriptorProto::unsafe_arena_set_allocated_options( + ::google::protobuf::ServiceOptions* options) { + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + options_ = options; + if (options) { + set_has_options(); + } else { + clear_has_options(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.ServiceDescriptorProto.options) +} // ------------------------------------------------------------------- @@ -4727,68 +5723,67 @@ inline void MethodDescriptorProto::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void MethodDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_->clear(); - } + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name(); } inline const ::std::string& MethodDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name) - return *name_; + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void MethodDescriptorProto::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name) } inline void MethodDescriptorProto::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(value); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name) } -inline void MethodDescriptorProto::set_name(const char* value, size_t size) { +inline void MethodDescriptorProto::set_name(const char* value, + size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast<const char*>(value), size); + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name) } inline ::std::string* MethodDescriptorProto::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name) - return name_; + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* MethodDescriptorProto::release_name() { clear_has_name(); - if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* MethodDescriptorProto::unsafe_arena_release_name() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name(); + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void MethodDescriptorProto::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_; + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); } - if (name) { + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name) +} +inline void MethodDescriptorProto::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name(); + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name) } @@ -4803,68 +5798,67 @@ inline void MethodDescriptorProto::clear_has_input_type() { _has_bits_[0] &= ~0x00000002u; } inline void MethodDescriptorProto::clear_input_type() { - if (input_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - input_type_->clear(); - } + input_type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_input_type(); } inline const ::std::string& MethodDescriptorProto::input_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type) - return *input_type_; + return input_type_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void MethodDescriptorProto::set_input_type(const ::std::string& value) { set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - input_type_ = new ::std::string; - } - input_type_->assign(value); + input_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type) } inline void MethodDescriptorProto::set_input_type(const char* value) { set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - input_type_ = new ::std::string; - } - input_type_->assign(value); + input_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type) } -inline void MethodDescriptorProto::set_input_type(const char* value, size_t size) { +inline void MethodDescriptorProto::set_input_type(const char* value, + size_t size) { set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - input_type_ = new ::std::string; - } - input_type_->assign(reinterpret_cast<const char*>(value), size); + input_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type) } inline ::std::string* MethodDescriptorProto::mutable_input_type() { set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - input_type_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type) - return input_type_; + return input_type_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* MethodDescriptorProto::release_input_type() { clear_has_input_type(); - if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = input_type_; - input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return input_type_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* MethodDescriptorProto::unsafe_arena_release_input_type() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_input_type(); + return input_type_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) { - if (input_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete input_type_; + if (input_type != NULL) { + set_has_input_type(); + } else { + clear_has_input_type(); } - if (input_type) { + input_type_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type) +} +inline void MethodDescriptorProto::unsafe_arena_set_allocated_input_type( + ::std::string* input_type) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (input_type != NULL) { set_has_input_type(); - input_type_ = input_type; } else { clear_has_input_type(); - input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_input_type(); + input_type_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + input_type, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type) } @@ -4879,68 +5873,67 @@ inline void MethodDescriptorProto::clear_has_output_type() { _has_bits_[0] &= ~0x00000004u; } inline void MethodDescriptorProto::clear_output_type() { - if (output_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - output_type_->clear(); - } + output_type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_output_type(); } inline const ::std::string& MethodDescriptorProto::output_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type) - return *output_type_; + return output_type_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void MethodDescriptorProto::set_output_type(const ::std::string& value) { set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - output_type_ = new ::std::string; - } - output_type_->assign(value); + output_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type) } inline void MethodDescriptorProto::set_output_type(const char* value) { set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - output_type_ = new ::std::string; - } - output_type_->assign(value); + output_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type) } -inline void MethodDescriptorProto::set_output_type(const char* value, size_t size) { +inline void MethodDescriptorProto::set_output_type(const char* value, + size_t size) { set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - output_type_ = new ::std::string; - } - output_type_->assign(reinterpret_cast<const char*>(value), size); + output_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type) } inline ::std::string* MethodDescriptorProto::mutable_output_type() { set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - output_type_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type) - return output_type_; + return output_type_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* MethodDescriptorProto::release_output_type() { clear_has_output_type(); - if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = output_type_; - output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return output_type_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* MethodDescriptorProto::unsafe_arena_release_output_type() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_output_type(); + return output_type_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) { - if (output_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete output_type_; + if (output_type != NULL) { + set_has_output_type(); + } else { + clear_has_output_type(); } - if (output_type) { + output_type_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type) +} +inline void MethodDescriptorProto::unsafe_arena_set_allocated_output_type( + ::std::string* output_type) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (output_type != NULL) { set_has_output_type(); - output_type_ = output_type; } else { clear_has_output_type(); - output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_output_type(); + output_type_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + output_type, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type) } @@ -4964,18 +5957,53 @@ inline const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() } inline ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() { set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::MethodOptions; + if (options_ == NULL) { + options_ = ::google::protobuf::Arena::CreateMessage< ::google::protobuf::MethodOptions >( + GetArenaNoVirtual()); + } // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options) return options_; } inline ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() { clear_has_options(); + if (GetArenaNoVirtual() != NULL) { + if (options_ == NULL) { + return NULL; + } else { + ::google::protobuf::MethodOptions* temp = new ::google::protobuf::MethodOptions; + temp->MergeFrom(*options_); + options_ = NULL; + return temp; + } + } else { + ::google::protobuf::MethodOptions* temp = options_; + options_ = NULL; + return temp; + } +} +inline ::google::protobuf::MethodOptions* MethodDescriptorProto::unsafe_arena_release_options() { + clear_has_options(); ::google::protobuf::MethodOptions* temp = options_; options_ = NULL; return temp; } inline void MethodDescriptorProto::set_allocated_options(::google::protobuf::MethodOptions* options) { - delete options_; + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + if (options != NULL) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(options) == NULL) { + GetArenaNoVirtual()->Own(options); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(options)) { + ::google::protobuf::MethodOptions* new_options = + ::google::protobuf::Arena::CreateMessage< ::google::protobuf::MethodOptions >( + GetArenaNoVirtual()); + new_options->CopyFrom(*options); + options = new_options; + } + } options_ = options; if (options) { set_has_options(); @@ -4984,6 +6012,19 @@ inline void MethodDescriptorProto::set_allocated_options(::google::protobuf::Met } // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options) } +inline void MethodDescriptorProto::unsafe_arena_set_allocated_options( + ::google::protobuf::MethodOptions* options) { + if (GetArenaNoVirtual() == NULL) { + delete options_; + } + options_ = options; + if (options) { + set_has_options(); + } else { + clear_has_options(); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.options) +} // ------------------------------------------------------------------- @@ -5000,68 +6041,67 @@ inline void FileOptions::clear_has_java_package() { _has_bits_[0] &= ~0x00000001u; } inline void FileOptions::clear_java_package() { - if (java_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_package_->clear(); - } + java_package_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_java_package(); } inline const ::std::string& FileOptions::java_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package) - return *java_package_; + return java_package_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FileOptions::set_java_package(const ::std::string& value) { set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_package_ = new ::std::string; - } - java_package_->assign(value); + java_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package) } inline void FileOptions::set_java_package(const char* value) { set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_package_ = new ::std::string; - } - java_package_->assign(value); + java_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package) } -inline void FileOptions::set_java_package(const char* value, size_t size) { +inline void FileOptions::set_java_package(const char* value, + size_t size) { set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_package_ = new ::std::string; - } - java_package_->assign(reinterpret_cast<const char*>(value), size); + java_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package) } inline ::std::string* FileOptions::mutable_java_package() { set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_package_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package) - return java_package_; + return java_package_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FileOptions::release_java_package() { clear_has_java_package(); - if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = java_package_; - java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return java_package_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FileOptions::unsafe_arena_release_java_package() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_java_package(); + return java_package_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FileOptions::set_allocated_java_package(::std::string* java_package) { - if (java_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete java_package_; + if (java_package != NULL) { + set_has_java_package(); + } else { + clear_has_java_package(); } - if (java_package) { + java_package_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package) +} +inline void FileOptions::unsafe_arena_set_allocated_java_package( + ::std::string* java_package) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (java_package != NULL) { set_has_java_package(); - java_package_ = java_package; } else { clear_has_java_package(); - java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_java_package(); + java_package_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + java_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package) } @@ -5076,68 +6116,67 @@ inline void FileOptions::clear_has_java_outer_classname() { _has_bits_[0] &= ~0x00000002u; } inline void FileOptions::clear_java_outer_classname() { - if (java_outer_classname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_outer_classname_->clear(); - } + java_outer_classname_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_java_outer_classname(); } inline const ::std::string& FileOptions::java_outer_classname() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname) - return *java_outer_classname_; + return java_outer_classname_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FileOptions::set_java_outer_classname(const ::std::string& value) { set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_outer_classname_ = new ::std::string; - } - java_outer_classname_->assign(value); + java_outer_classname_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname) } inline void FileOptions::set_java_outer_classname(const char* value) { set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_outer_classname_ = new ::std::string; - } - java_outer_classname_->assign(value); + java_outer_classname_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname) } -inline void FileOptions::set_java_outer_classname(const char* value, size_t size) { +inline void FileOptions::set_java_outer_classname(const char* value, + size_t size) { set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_outer_classname_ = new ::std::string; - } - java_outer_classname_->assign(reinterpret_cast<const char*>(value), size); + java_outer_classname_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname) } inline ::std::string* FileOptions::mutable_java_outer_classname() { set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - java_outer_classname_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname) - return java_outer_classname_; + return java_outer_classname_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FileOptions::release_java_outer_classname() { clear_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = java_outer_classname_; - java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return java_outer_classname_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FileOptions::unsafe_arena_release_java_outer_classname() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_java_outer_classname(); + return java_outer_classname_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) { - if (java_outer_classname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete java_outer_classname_; + if (java_outer_classname != NULL) { + set_has_java_outer_classname(); + } else { + clear_has_java_outer_classname(); } - if (java_outer_classname) { + java_outer_classname_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname) +} +inline void FileOptions::unsafe_arena_set_allocated_java_outer_classname( + ::std::string* java_outer_classname) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (java_outer_classname != NULL) { set_has_java_outer_classname(); - java_outer_classname_ = java_outer_classname; } else { clear_has_java_outer_classname(); - java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_java_outer_classname(); + java_outer_classname_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + java_outer_classname, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname) } @@ -5249,68 +6288,67 @@ inline void FileOptions::clear_has_go_package() { _has_bits_[0] &= ~0x00000040u; } inline void FileOptions::clear_go_package() { - if (go_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - go_package_->clear(); - } + go_package_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_go_package(); } inline const ::std::string& FileOptions::go_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package) - return *go_package_; + return go_package_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void FileOptions::set_go_package(const ::std::string& value) { set_has_go_package(); - if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - go_package_ = new ::std::string; - } - go_package_->assign(value); + go_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package) } inline void FileOptions::set_go_package(const char* value) { set_has_go_package(); - if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - go_package_ = new ::std::string; - } - go_package_->assign(value); + go_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package) } -inline void FileOptions::set_go_package(const char* value, size_t size) { +inline void FileOptions::set_go_package(const char* value, + size_t size) { set_has_go_package(); - if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - go_package_ = new ::std::string; - } - go_package_->assign(reinterpret_cast<const char*>(value), size); + go_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package) } inline ::std::string* FileOptions::mutable_go_package() { set_has_go_package(); - if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - go_package_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package) - return go_package_; + return go_package_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FileOptions::release_go_package() { clear_has_go_package(); - if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = go_package_; - go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return go_package_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FileOptions::unsafe_arena_release_go_package() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_go_package(); + return go_package_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void FileOptions::set_allocated_go_package(::std::string* go_package) { - if (go_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete go_package_; + if (go_package != NULL) { + set_has_go_package(); + } else { + clear_has_go_package(); } - if (go_package) { + go_package_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package) +} +inline void FileOptions::unsafe_arena_set_allocated_go_package( + ::std::string* go_package) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (go_package != NULL) { set_has_go_package(); - go_package_ = go_package; } else { clear_has_go_package(); - go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_go_package(); + go_package_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + go_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package) } @@ -5516,6 +6554,30 @@ inline void MessageOptions::set_deprecated(bool value) { // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated) } +// optional bool map_entry = 7; +inline bool MessageOptions::has_map_entry() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void MessageOptions::set_has_map_entry() { + _has_bits_[0] |= 0x00000008u; +} +inline void MessageOptions::clear_has_map_entry() { + _has_bits_[0] &= ~0x00000008u; +} +inline void MessageOptions::clear_map_entry() { + map_entry_ = false; + clear_has_map_entry(); +} +inline bool MessageOptions::map_entry() const { + // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry) + return map_entry_; +} +inline void MessageOptions::set_map_entry(bool value) { + set_has_map_entry(); + map_entry_ = value; + // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry) +} + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; inline int MessageOptions::uninterpreted_option_size() const { return uninterpreted_option_.size(); @@ -5647,91 +6709,15 @@ inline void FieldOptions::set_deprecated(bool value) { // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated) } -// optional string experimental_map_key = 9; -inline bool FieldOptions::has_experimental_map_key() const { - return (_has_bits_[0] & 0x00000010u) != 0; -} -inline void FieldOptions::set_has_experimental_map_key() { - _has_bits_[0] |= 0x00000010u; -} -inline void FieldOptions::clear_has_experimental_map_key() { - _has_bits_[0] &= ~0x00000010u; -} -inline void FieldOptions::clear_experimental_map_key() { - if (experimental_map_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - experimental_map_key_->clear(); - } - clear_has_experimental_map_key(); -} -inline const ::std::string& FieldOptions::experimental_map_key() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.experimental_map_key) - return *experimental_map_key_; -} -inline void FieldOptions::set_experimental_map_key(const ::std::string& value) { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - experimental_map_key_ = new ::std::string; - } - experimental_map_key_->assign(value); - // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.experimental_map_key) -} -inline void FieldOptions::set_experimental_map_key(const char* value) { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - experimental_map_key_ = new ::std::string; - } - experimental_map_key_->assign(value); - // @@protoc_insertion_point(field_set_char:google.protobuf.FieldOptions.experimental_map_key) -} -inline void FieldOptions::set_experimental_map_key(const char* value, size_t size) { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - experimental_map_key_ = new ::std::string; - } - experimental_map_key_->assign(reinterpret_cast<const char*>(value), size); - // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldOptions.experimental_map_key) -} -inline ::std::string* FieldOptions::mutable_experimental_map_key() { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - experimental_map_key_ = new ::std::string; - } - // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.experimental_map_key) - return experimental_map_key_; -} -inline ::std::string* FieldOptions::release_experimental_map_key() { - clear_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = experimental_map_key_; - experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } -} -inline void FieldOptions::set_allocated_experimental_map_key(::std::string* experimental_map_key) { - if (experimental_map_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete experimental_map_key_; - } - if (experimental_map_key) { - set_has_experimental_map_key(); - experimental_map_key_ = experimental_map_key; - } else { - clear_has_experimental_map_key(); - experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldOptions.experimental_map_key) -} - // optional bool weak = 10 [default = false]; inline bool FieldOptions::has_weak() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return (_has_bits_[0] & 0x00000010u) != 0; } inline void FieldOptions::set_has_weak() { - _has_bits_[0] |= 0x00000020u; + _has_bits_[0] |= 0x00000010u; } inline void FieldOptions::clear_has_weak() { - _has_bits_[0] &= ~0x00000020u; + _has_bits_[0] &= ~0x00000010u; } inline void FieldOptions::clear_weak() { weak_ = false; @@ -6048,68 +7034,67 @@ inline void UninterpretedOption_NamePart::clear_has_name_part() { _has_bits_[0] &= ~0x00000001u; } inline void UninterpretedOption_NamePart::clear_name_part() { - if (name_part_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_part_->clear(); - } + name_part_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_name_part(); } inline const ::std::string& UninterpretedOption_NamePart::name_part() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part) - return *name_part_; + return name_part_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) { set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_part_ = new ::std::string; - } - name_part_->assign(value); + name_part_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part) } inline void UninterpretedOption_NamePart::set_name_part(const char* value) { set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_part_ = new ::std::string; - } - name_part_->assign(value); + name_part_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part) } -inline void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) { +inline void UninterpretedOption_NamePart::set_name_part(const char* value, + size_t size) { set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_part_ = new ::std::string; - } - name_part_->assign(reinterpret_cast<const char*>(value), size); + name_part_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part) } inline ::std::string* UninterpretedOption_NamePart::mutable_name_part() { set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - name_part_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part) - return name_part_; + return name_part_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* UninterpretedOption_NamePart::release_name_part() { clear_has_name_part(); - if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = name_part_; - name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return name_part_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* UninterpretedOption_NamePart::unsafe_arena_release_name_part() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_name_part(); + return name_part_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) { - if (name_part_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete name_part_; + if (name_part != NULL) { + set_has_name_part(); + } else { + clear_has_name_part(); } - if (name_part) { + name_part_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) +} +inline void UninterpretedOption_NamePart::unsafe_arena_set_allocated_name_part( + ::std::string* name_part) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name_part != NULL) { set_has_name_part(); - name_part_ = name_part; } else { clear_has_name_part(); - name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_name_part(); + name_part_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_part, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) } @@ -6182,68 +7167,67 @@ inline void UninterpretedOption::clear_has_identifier_value() { _has_bits_[0] &= ~0x00000002u; } inline void UninterpretedOption::clear_identifier_value() { - if (identifier_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - identifier_value_->clear(); - } + identifier_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_identifier_value(); } inline const ::std::string& UninterpretedOption::identifier_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value) - return *identifier_value_; + return identifier_value_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void UninterpretedOption::set_identifier_value(const ::std::string& value) { set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - identifier_value_ = new ::std::string; - } - identifier_value_->assign(value); + identifier_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value) } inline void UninterpretedOption::set_identifier_value(const char* value) { set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - identifier_value_ = new ::std::string; - } - identifier_value_->assign(value); + identifier_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value) } -inline void UninterpretedOption::set_identifier_value(const char* value, size_t size) { +inline void UninterpretedOption::set_identifier_value(const char* value, + size_t size) { set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - identifier_value_ = new ::std::string; - } - identifier_value_->assign(reinterpret_cast<const char*>(value), size); + identifier_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value) } inline ::std::string* UninterpretedOption::mutable_identifier_value() { set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - identifier_value_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value) - return identifier_value_; + return identifier_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* UninterpretedOption::release_identifier_value() { clear_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = identifier_value_; - identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return identifier_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* UninterpretedOption::unsafe_arena_release_identifier_value() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_identifier_value(); + return identifier_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) { - if (identifier_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete identifier_value_; + if (identifier_value != NULL) { + set_has_identifier_value(); + } else { + clear_has_identifier_value(); } - if (identifier_value) { + identifier_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value) +} +inline void UninterpretedOption::unsafe_arena_set_allocated_identifier_value( + ::std::string* identifier_value) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (identifier_value != NULL) { set_has_identifier_value(); - identifier_value_ = identifier_value; } else { clear_has_identifier_value(); - identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_identifier_value(); + identifier_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + identifier_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value) } @@ -6330,68 +7314,67 @@ inline void UninterpretedOption::clear_has_string_value() { _has_bits_[0] &= ~0x00000020u; } inline void UninterpretedOption::clear_string_value() { - if (string_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - string_value_->clear(); - } + string_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_string_value(); } inline const ::std::string& UninterpretedOption::string_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value) - return *string_value_; + return string_value_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void UninterpretedOption::set_string_value(const ::std::string& value) { set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - string_value_ = new ::std::string; - } - string_value_->assign(value); + string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value) } inline void UninterpretedOption::set_string_value(const char* value) { set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - string_value_ = new ::std::string; - } - string_value_->assign(value); + string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value) } -inline void UninterpretedOption::set_string_value(const void* value, size_t size) { +inline void UninterpretedOption::set_string_value(const void* value, + size_t size) { set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - string_value_ = new ::std::string; - } - string_value_->assign(reinterpret_cast<const char*>(value), size); + string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value) } inline ::std::string* UninterpretedOption::mutable_string_value() { set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - string_value_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value) - return string_value_; + return string_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* UninterpretedOption::release_string_value() { clear_has_string_value(); - if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = string_value_; - string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return string_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* UninterpretedOption::unsafe_arena_release_string_value() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_string_value(); + return string_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void UninterpretedOption::set_allocated_string_value(::std::string* string_value) { - if (string_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete string_value_; + if (string_value != NULL) { + set_has_string_value(); + } else { + clear_has_string_value(); } - if (string_value) { + string_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value) +} +inline void UninterpretedOption::unsafe_arena_set_allocated_string_value( + ::std::string* string_value) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (string_value != NULL) { set_has_string_value(); - string_value_ = string_value; } else { clear_has_string_value(); - string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_string_value(); + string_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + string_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value) } @@ -6406,68 +7389,67 @@ inline void UninterpretedOption::clear_has_aggregate_value() { _has_bits_[0] &= ~0x00000040u; } inline void UninterpretedOption::clear_aggregate_value() { - if (aggregate_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - aggregate_value_->clear(); - } + aggregate_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_aggregate_value(); } inline const ::std::string& UninterpretedOption::aggregate_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value) - return *aggregate_value_; + return aggregate_value_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void UninterpretedOption::set_aggregate_value(const ::std::string& value) { set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - aggregate_value_ = new ::std::string; - } - aggregate_value_->assign(value); + aggregate_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value) } inline void UninterpretedOption::set_aggregate_value(const char* value) { set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - aggregate_value_ = new ::std::string; - } - aggregate_value_->assign(value); + aggregate_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value) } -inline void UninterpretedOption::set_aggregate_value(const char* value, size_t size) { +inline void UninterpretedOption::set_aggregate_value(const char* value, + size_t size) { set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - aggregate_value_ = new ::std::string; - } - aggregate_value_->assign(reinterpret_cast<const char*>(value), size); + aggregate_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value) } inline ::std::string* UninterpretedOption::mutable_aggregate_value() { set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - aggregate_value_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value) - return aggregate_value_; + return aggregate_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* UninterpretedOption::release_aggregate_value() { clear_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = aggregate_value_; - aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return aggregate_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* UninterpretedOption::unsafe_arena_release_aggregate_value() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_aggregate_value(); + return aggregate_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) { - if (aggregate_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete aggregate_value_; + if (aggregate_value != NULL) { + set_has_aggregate_value(); + } else { + clear_has_aggregate_value(); } - if (aggregate_value) { + aggregate_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) +} +inline void UninterpretedOption::unsafe_arena_set_allocated_aggregate_value( + ::std::string* aggregate_value) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (aggregate_value != NULL) { set_has_aggregate_value(); - aggregate_value_ = aggregate_value; } else { clear_has_aggregate_value(); - aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_aggregate_value(); + aggregate_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + aggregate_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) } @@ -6546,68 +7528,67 @@ inline void SourceCodeInfo_Location::clear_has_leading_comments() { _has_bits_[0] &= ~0x00000004u; } inline void SourceCodeInfo_Location::clear_leading_comments() { - if (leading_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - leading_comments_->clear(); - } + leading_comments_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_leading_comments(); } inline const ::std::string& SourceCodeInfo_Location::leading_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments) - return *leading_comments_; + return leading_comments_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) { set_has_leading_comments(); - if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - leading_comments_ = new ::std::string; - } - leading_comments_->assign(value); + leading_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments) } inline void SourceCodeInfo_Location::set_leading_comments(const char* value) { set_has_leading_comments(); - if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - leading_comments_ = new ::std::string; - } - leading_comments_->assign(value); + leading_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments) } -inline void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) { +inline void SourceCodeInfo_Location::set_leading_comments(const char* value, + size_t size) { set_has_leading_comments(); - if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - leading_comments_ = new ::std::string; - } - leading_comments_->assign(reinterpret_cast<const char*>(value), size); + leading_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments) } inline ::std::string* SourceCodeInfo_Location::mutable_leading_comments() { set_has_leading_comments(); - if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - leading_comments_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments) - return leading_comments_; + return leading_comments_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* SourceCodeInfo_Location::release_leading_comments() { clear_has_leading_comments(); - if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = leading_comments_; - leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return leading_comments_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* SourceCodeInfo_Location::unsafe_arena_release_leading_comments() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_leading_comments(); + return leading_comments_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) { - if (leading_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete leading_comments_; + if (leading_comments != NULL) { + set_has_leading_comments(); + } else { + clear_has_leading_comments(); } - if (leading_comments) { + leading_comments_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) +} +inline void SourceCodeInfo_Location::unsafe_arena_set_allocated_leading_comments( + ::std::string* leading_comments) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (leading_comments != NULL) { set_has_leading_comments(); - leading_comments_ = leading_comments; } else { clear_has_leading_comments(); - leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_leading_comments(); + leading_comments_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + leading_comments, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) } @@ -6622,68 +7603,67 @@ inline void SourceCodeInfo_Location::clear_has_trailing_comments() { _has_bits_[0] &= ~0x00000008u; } inline void SourceCodeInfo_Location::clear_trailing_comments() { - if (trailing_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - trailing_comments_->clear(); - } + trailing_comments_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_trailing_comments(); } inline const ::std::string& SourceCodeInfo_Location::trailing_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments) - return *trailing_comments_; + return trailing_comments_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) { set_has_trailing_comments(); - if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - trailing_comments_ = new ::std::string; - } - trailing_comments_->assign(value); + trailing_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments) } inline void SourceCodeInfo_Location::set_trailing_comments(const char* value) { set_has_trailing_comments(); - if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - trailing_comments_ = new ::std::string; - } - trailing_comments_->assign(value); + trailing_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments) } -inline void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) { +inline void SourceCodeInfo_Location::set_trailing_comments(const char* value, + size_t size) { set_has_trailing_comments(); - if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - trailing_comments_ = new ::std::string; - } - trailing_comments_->assign(reinterpret_cast<const char*>(value), size); + trailing_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments) } inline ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() { set_has_trailing_comments(); - if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - trailing_comments_ = new ::std::string; - } // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments) - return trailing_comments_; + return trailing_comments_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* SourceCodeInfo_Location::release_trailing_comments() { clear_has_trailing_comments(); - if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - return NULL; - } else { - ::std::string* temp = trailing_comments_; - trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - return temp; - } + return trailing_comments_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* SourceCodeInfo_Location::unsafe_arena_release_trailing_comments() { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + clear_has_trailing_comments(); + return trailing_comments_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); } inline void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) { - if (trailing_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { - delete trailing_comments_; + if (trailing_comments != NULL) { + set_has_trailing_comments(); + } else { + clear_has_trailing_comments(); } - if (trailing_comments) { + trailing_comments_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) +} +inline void SourceCodeInfo_Location::unsafe_arena_set_allocated_trailing_comments( + ::std::string* trailing_comments) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (trailing_comments != NULL) { set_has_trailing_comments(); - trailing_comments_ = trailing_comments; } else { clear_has_trailing_comments(); - trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + set_has_trailing_comments(); + trailing_comments_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + trailing_comments, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) } @@ -6752,8 +7732,8 @@ inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldOptions return ::google::protobuf::FieldOptions_CType_descriptor(); } -} // namespace google } // namespace protobuf +} // namespace google #endif // SWIG // @@protoc_insertion_point(global_scope) |