From 92a7e778e7394386f413cec28d67a07630f784b1 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Fri, 1 Dec 2017 10:05:10 -0800 Subject: Integrated internal changes from Google --- src/google/protobuf/type.pb.h | 187 ++++++++++++++++++++++++------------------ 1 file changed, 105 insertions(+), 82 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 85bd660f..9d19d39f 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -84,6 +84,15 @@ LIBPROTOBUF_EXPORT extern TypeDefaultTypeInternal _Type_default_instance_; } // namespace google namespace google { namespace protobuf { +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Enum* Arena::CreateMessage< ::google::protobuf::Enum>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::EnumValue* Arena::CreateMessage< ::google::protobuf::EnumValue>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Field* Arena::CreateMessage< ::google::protobuf::Field>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Option* Arena::CreateMessage< ::google::protobuf::Option>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Type* Arena::CreateMessage< ::google::protobuf::Type>(Arena*); +} // namespace protobuf +} // namespace google +namespace google { +namespace protobuf { enum Field_Kind { Field_Kind_TYPE_UNKNOWN = 0, @@ -220,9 +229,13 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i // implements Message ---------------------------------------------- - inline Type* New() const PROTOBUF_FINAL { return New(NULL); } + inline Type* New() const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(NULL); + } - Type* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + Type* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(arena); + } void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Type& from); @@ -267,11 +280,11 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i int fields_size() const; void clear_fields(); static const int kFieldsFieldNumber = 2; - const ::google::protobuf::Field& fields(int index) const; ::google::protobuf::Field* mutable_fields(int index); - ::google::protobuf::Field* add_fields(); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* mutable_fields(); + const ::google::protobuf::Field& fields(int index) const; + ::google::protobuf::Field* add_fields(); const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& fields() const; @@ -301,11 +314,11 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i int options_size() const; void clear_options(); static const int kOptionsFieldNumber = 4; - const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); - ::google::protobuf::Option* add_options(); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::Option& options(int index) const; + ::google::protobuf::Option* add_options(); const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& options() const; @@ -336,9 +349,6 @@ 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(); - public: const ::google::protobuf::SourceContext& source_context() const; ::google::protobuf::SourceContext* release_source_context(); ::google::protobuf::SourceContext* mutable_source_context(); @@ -423,9 +433,13 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ // implements Message ---------------------------------------------- - inline Field* New() const PROTOBUF_FINAL { return New(NULL); } + inline Field* New() const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(NULL); + } - Field* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + Field* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(arena); + } void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Field& from); @@ -560,11 +574,11 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ int options_size() const; void clear_options(); static const int kOptionsFieldNumber = 9; - const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); - ::google::protobuf::Option* add_options(); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::Option& options(int index) const; + ::google::protobuf::Option* add_options(); const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& options() const; @@ -764,9 +778,13 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i // implements Message ---------------------------------------------- - inline Enum* New() const PROTOBUF_FINAL { return New(NULL); } + inline Enum* New() const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(NULL); + } - Enum* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + Enum* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(arena); + } void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Enum& from); @@ -811,11 +829,11 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i int enumvalue_size() const; void clear_enumvalue(); static const int kEnumvalueFieldNumber = 2; - const ::google::protobuf::EnumValue& enumvalue(int index) const; ::google::protobuf::EnumValue* mutable_enumvalue(int index); - ::google::protobuf::EnumValue* add_enumvalue(); ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* mutable_enumvalue(); + const ::google::protobuf::EnumValue& enumvalue(int index) const; + ::google::protobuf::EnumValue* add_enumvalue(); const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& enumvalue() const; @@ -823,11 +841,11 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i int options_size() const; void clear_options(); static const int kOptionsFieldNumber = 3; - const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); - ::google::protobuf::Option* add_options(); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::Option& options(int index) const; + ::google::protobuf::Option* add_options(); const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& options() const; @@ -858,9 +876,6 @@ 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(); - public: const ::google::protobuf::SourceContext& source_context() const; ::google::protobuf::SourceContext* release_source_context(); ::google::protobuf::SourceContext* mutable_source_context(); @@ -944,9 +959,13 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro // implements Message ---------------------------------------------- - inline EnumValue* New() const PROTOBUF_FINAL { return New(NULL); } + inline EnumValue* New() const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(NULL); + } - EnumValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + EnumValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage(arena); + } void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const EnumValue& from); @@ -991,11 +1010,11 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro int options_size() const; void clear_options(); static const int kOptionsFieldNumber = 3; - const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); - ::google::protobuf::Option* add_options(); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::Option& options(int index) const; + ::google::protobuf::Option* add_options(); const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& options() const; @@ -1095,9 +1114,13 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc // implements Message ---------------------------------------------- - inline Option* New() const PROTOBUF_FINAL { return New(NULL); } + inline Option* New() const PROTOBUF_FINAL { + return ::google::protobuf::Arena::CreateMessage