From cc8ca5b6a5478b40546d4206392eb1471454460d Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Mon, 19 Sep 2016 13:45:07 -0700 Subject: Integrate internal changes --- src/google/protobuf/type.pb.h | 615 +++++++++++++++++++++++++++++++++--------- 1 file changed, 483 insertions(+), 132 deletions(-) (limited to 'src/google/protobuf/type.pb.h') diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index bb485e92..7a4d5aae 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -37,6 +37,7 @@ namespace protobuf { // Internal implementation detail -- do not call these. void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); +void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); @@ -142,9 +143,18 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i return *this; } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const Type& default_instance(); + static inline const Type* internal_default_instance() { + return &default_instance_.get(); + } + + void UnsafeArenaSwap(Type* other); void Swap(Type* other); // implements Message ---------------------------------------------- @@ -159,7 +169,7 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -175,6 +185,12 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(Type* other); + void UnsafeMergeFrom(const Type& from); + protected: + explicit Type(::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(); @@ -200,6 +216,9 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); // repeated .google.protobuf.Field fields = 2; int fields_size() const; @@ -245,10 +264,17 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i bool has_source_context() const; void clear_source_context(); static const int kSourceContextFieldNumber = 5; + private: + void _slow_mutable_source_context(); + ::google::protobuf::SourceContext* _slow_release_source_context(); + public: const ::google::protobuf::SourceContext& source_context() const; ::google::protobuf::SourceContext* mutable_source_context(); ::google::protobuf::SourceContext* release_source_context(); void set_allocated_source_context(::google::protobuf::SourceContext* source_context); + ::google::protobuf::SourceContext* unsafe_arena_release_source_context(); + void unsafe_arena_set_allocated_source_context( + ::google::protobuf::SourceContext* source_context); // optional .google.protobuf.Syntax syntax = 6; void clear_syntax(); @@ -260,20 +286,23 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr name_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field > fields_; ::google::protobuf::RepeatedPtrField< ::std::string> oneofs_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::SourceContext* source_context_; int syntax_; mutable int _cached_size_; - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); + friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl(); + friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl(); friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static Type* default_instance_; + static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; // ------------------------------------------------------------------- @@ -289,9 +318,18 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ return *this; } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const Field& default_instance(); + static inline const Field* internal_default_instance() { + return &default_instance_.get(); + } + + void UnsafeArenaSwap(Field* other); void Swap(Field* other); // implements Message ---------------------------------------------- @@ -306,7 +344,7 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -322,6 +360,12 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(Field* other); + void UnsafeMergeFrom(const Field& from); + protected: + explicit Field(::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(); @@ -455,6 +499,9 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); // optional string type_url = 6; void clear_type_url(); @@ -466,6 +513,9 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ ::std::string* mutable_type_url(); ::std::string* release_type_url(); void set_allocated_type_url(::std::string* type_url); + ::std::string* unsafe_arena_release_type_url(); + void unsafe_arena_set_allocated_type_url( + ::std::string* type_url); // optional int32 oneof_index = 7; void clear_oneof_index(); @@ -501,6 +551,9 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ ::std::string* mutable_json_name(); ::std::string* release_json_name(); void set_allocated_json_name(::std::string* json_name); + ::std::string* unsafe_arena_release_json_name(); + void unsafe_arena_set_allocated_json_name( + ::std::string* json_name); // optional string default_value = 11; void clear_default_value(); @@ -512,29 +565,35 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ ::std::string* mutable_default_value(); ::std::string* release_default_value(); void set_allocated_default_value(::std::string* default_value); + ::std::string* unsafe_arena_release_default_value(); + void unsafe_arena_set_allocated_default_value( + ::std::string* default_value); // @@protoc_insertion_point(class_scope:google.protobuf.Field) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - int kind_; - int cardinality_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::int32 number_; - ::google::protobuf::int32 oneof_index_; ::google::protobuf::internal::ArenaStringPtr type_url_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; ::google::protobuf::internal::ArenaStringPtr json_name_; ::google::protobuf::internal::ArenaStringPtr default_value_; + int kind_; + int cardinality_; + ::google::protobuf::int32 number_; + ::google::protobuf::int32 oneof_index_; bool packed_; mutable int _cached_size_; - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); + friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl(); + friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl(); friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static Field* default_instance_; + static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; // ------------------------------------------------------------------- @@ -550,9 +609,18 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i return *this; } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const Enum& default_instance(); + static inline const Enum* internal_default_instance() { + return &default_instance_.get(); + } + + void UnsafeArenaSwap(Enum* other); void Swap(Enum* other); // implements Message ---------------------------------------------- @@ -567,7 +635,7 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -583,6 +651,12 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(Enum* other); + void UnsafeMergeFrom(const Enum& from); + protected: + explicit Enum(::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(); @@ -608,6 +682,9 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); // repeated .google.protobuf.EnumValue enumvalue = 2; int enumvalue_size() const; @@ -637,10 +714,17 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i bool has_source_context() const; void clear_source_context(); static const int kSourceContextFieldNumber = 4; + private: + void _slow_mutable_source_context(); + ::google::protobuf::SourceContext* _slow_release_source_context(); + public: const ::google::protobuf::SourceContext& source_context() const; ::google::protobuf::SourceContext* mutable_source_context(); ::google::protobuf::SourceContext* release_source_context(); void set_allocated_source_context(::google::protobuf::SourceContext* source_context); + ::google::protobuf::SourceContext* unsafe_arena_release_source_context(); + void unsafe_arena_set_allocated_source_context( + ::google::protobuf::SourceContext* source_context); // optional .google.protobuf.Syntax syntax = 5; void clear_syntax(); @@ -652,19 +736,22 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr name_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue > enumvalue_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::SourceContext* source_context_; int syntax_; mutable int _cached_size_; - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); + friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl(); + friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl(); friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static Enum* default_instance_; + static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; // ------------------------------------------------------------------- @@ -680,9 +767,18 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro return *this; } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const EnumValue& default_instance(); + static inline const EnumValue* internal_default_instance() { + return &default_instance_.get(); + } + + void UnsafeArenaSwap(EnumValue* other); void Swap(EnumValue* other); // implements Message ---------------------------------------------- @@ -697,7 +793,7 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -713,6 +809,12 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(EnumValue* other); + void UnsafeMergeFrom(const EnumValue& from); + protected: + explicit EnumValue(::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(); @@ -738,6 +840,9 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); // optional int32 number = 2; void clear_number(); @@ -761,17 +866,20 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr name_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; + ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::int32 number_; mutable int _cached_size_; - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); + friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl(); + friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl(); friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static EnumValue* default_instance_; + static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; // ------------------------------------------------------------------- @@ -787,9 +895,18 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc return *this; } + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } static const ::google::protobuf::Descriptor* descriptor(); static const Option& default_instance(); + static inline const Option* internal_default_instance() { + return &default_instance_.get(); + } + + void UnsafeArenaSwap(Option* other); void Swap(Option* other); // implements Message ---------------------------------------------- @@ -804,7 +921,7 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -820,6 +937,12 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(Option* other); + void UnsafeMergeFrom(const Option& from); + protected: + explicit Option(::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(); @@ -845,30 +968,43 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); // optional .google.protobuf.Any value = 2; bool has_value() const; void clear_value(); static const int kValueFieldNumber = 2; + private: + void _slow_mutable_value(); + ::google::protobuf::Any* _slow_release_value(); + public: const ::google::protobuf::Any& value() const; ::google::protobuf::Any* mutable_value(); ::google::protobuf::Any* release_value(); void set_allocated_value(::google::protobuf::Any* value); + ::google::protobuf::Any* unsafe_arena_release_value(); + void unsafe_arena_set_allocated_value( + ::google::protobuf::Any* value); // @@protoc_insertion_point(class_scope:google.protobuf.Option) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::Any* value_; mutable int _cached_size_; - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); + friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl(); + friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl(); friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static Option* default_instance_; + static ::google::protobuf::internal::ExplicitlyConstructed