From 0400cca3236de1ca303af38bf81eab332d042b7c Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Tue, 13 Mar 2018 16:37:29 -0700 Subject: Integrated internal changes from Google --- src/google/protobuf/type.pb.h | 277 +++++++++++++++++++++--------------------- 1 file changed, 140 insertions(+), 137 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 49bed8ee..69af6c2e 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/type.proto -#ifndef PROTOBUF_google_2fprotobuf_2ftype_2eproto_INCLUDED -#define PROTOBUF_google_2fprotobuf_2ftype_2eproto_INCLUDED +#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2ftype_2eproto +#define PROTOBUF_INCLUDED_google_2fprotobuf_2ftype_2eproto #include @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include // IWYU pragma: export @@ -33,6 +34,7 @@ #include #include // @@protoc_insertion_point(includes) +#define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftype_2eproto LIBPROTOBUF_EXPORT namespace protobuf_google_2fprotobuf_2ftype_2eproto { // Internal implementation detail -- do not use these members. @@ -45,23 +47,6 @@ struct LIBPROTOBUF_EXPORT TableStruct { static const ::google::protobuf::uint32 offsets[]; }; void LIBPROTOBUF_EXPORT AddDescriptors(); -void LIBPROTOBUF_EXPORT InitDefaultsTypeImpl(); -void LIBPROTOBUF_EXPORT InitDefaultsType(); -void LIBPROTOBUF_EXPORT InitDefaultsFieldImpl(); -void LIBPROTOBUF_EXPORT InitDefaultsField(); -void LIBPROTOBUF_EXPORT InitDefaultsEnumImpl(); -void LIBPROTOBUF_EXPORT InitDefaultsEnum(); -void LIBPROTOBUF_EXPORT InitDefaultsEnumValueImpl(); -void LIBPROTOBUF_EXPORT InitDefaultsEnumValue(); -void LIBPROTOBUF_EXPORT InitDefaultsOptionImpl(); -void LIBPROTOBUF_EXPORT InitDefaultsOption(); -inline void LIBPROTOBUF_EXPORT InitDefaults() { - InitDefaultsType(); - InitDefaultsField(); - InitDefaultsEnum(); - InitDefaultsEnumValue(); - InitDefaultsOption(); -} } // namespace protobuf_google_2fprotobuf_2ftype_2eproto namespace google { namespace protobuf { @@ -84,11 +69,11 @@ 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*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Enum* Arena::CreateMaybeMessage<::google::protobuf::Enum>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::EnumValue* Arena::CreateMaybeMessage<::google::protobuf::EnumValue>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Field* Arena::CreateMaybeMessage<::google::protobuf::Field>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Option* Arena::CreateMaybeMessage<::google::protobuf::Option>(Arena*); +template<> LIBPROTOBUF_EXPORT ::google::protobuf::Type* Arena::CreateMaybeMessage<::google::protobuf::Type>(Arena*); } // namespace protobuf } // namespace google namespace google { @@ -204,10 +189,10 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i return *this; } #endif - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } - inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL { + inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); @@ -218,7 +203,7 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i return reinterpret_cast( &_Type_default_instance_); } - static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + static constexpr int kIndexInFileMessages = 0; void UnsafeArenaSwap(Type* other); @@ -229,32 +214,33 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i // implements Message ---------------------------------------------- - inline Type* New() const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(NULL); + inline Type* New() const final { + return CreateMaybeMessage(NULL); } - Type* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(arena); + Type* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const Type& from); void MergeFrom(const Type& from); - void Clear() PROTOBUF_FINAL; - bool IsInitialized() const PROTOBUF_FINAL; + void Clear() final; + bool IsInitialized() const final; - size_t ByteSizeLong() const PROTOBUF_FINAL; + size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; - int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const PROTOBUF_FINAL; + void SetCachedSize(int size) const final; void InternalSwap(Type* other); protected: explicit Type(::google::protobuf::Arena* arena); @@ -270,7 +256,7 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i } public: - ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -349,6 +335,9 @@ 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: + const ::google::protobuf::SourceContext& _internal_source_context() const; + public: const ::google::protobuf::SourceContext& source_context() const; ::google::protobuf::SourceContext* release_source_context(); ::google::protobuf::SourceContext* mutable_source_context(); @@ -376,9 +365,8 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::SourceContext* source_context_; int syntax_; - mutable int _cached_size_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; - friend void ::protobuf_google_2fprotobuf_2ftype_2eproto::InitDefaultsTypeImpl(); }; // ------------------------------------------------------------------- @@ -408,10 +396,10 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ return *this; } #endif - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } - inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL { + inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); @@ -422,7 +410,7 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ return reinterpret_cast( &_Field_default_instance_); } - static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + static constexpr int kIndexInFileMessages = 1; void UnsafeArenaSwap(Field* other); @@ -433,32 +421,33 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ // implements Message ---------------------------------------------- - inline Field* New() const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(NULL); + inline Field* New() const final { + return CreateMaybeMessage(NULL); } - Field* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(arena); + Field* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const Field& from); void MergeFrom(const Field& from); - void Clear() PROTOBUF_FINAL; - bool IsInitialized() const PROTOBUF_FINAL; + void Clear() final; + bool IsInitialized() const final; - size_t ByteSizeLong() const PROTOBUF_FINAL; + size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; - int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const PROTOBUF_FINAL; + void SetCachedSize(int size) const final; void InternalSwap(Field* other); protected: explicit Field(::google::protobuf::Arena* arena); @@ -474,7 +463,7 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ } public: - ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -721,9 +710,8 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ ::google::protobuf::int32 number_; ::google::protobuf::int32 oneof_index_; bool packed_; - mutable int _cached_size_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; - friend void ::protobuf_google_2fprotobuf_2ftype_2eproto::InitDefaultsFieldImpl(); }; // ------------------------------------------------------------------- @@ -753,10 +741,10 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i return *this; } #endif - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } - inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL { + inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); @@ -767,7 +755,7 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i return reinterpret_cast( &_Enum_default_instance_); } - static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + static constexpr int kIndexInFileMessages = 2; void UnsafeArenaSwap(Enum* other); @@ -778,32 +766,33 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i // implements Message ---------------------------------------------- - inline Enum* New() const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(NULL); + inline Enum* New() const final { + return CreateMaybeMessage(NULL); } - Enum* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(arena); + Enum* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const Enum& from); void MergeFrom(const Enum& from); - void Clear() PROTOBUF_FINAL; - bool IsInitialized() const PROTOBUF_FINAL; + void Clear() final; + bool IsInitialized() const final; - size_t ByteSizeLong() const PROTOBUF_FINAL; + size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; - int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const PROTOBUF_FINAL; + void SetCachedSize(int size) const final; void InternalSwap(Enum* other); protected: explicit Enum(::google::protobuf::Arena* arena); @@ -819,7 +808,7 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i } public: - ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -876,6 +865,9 @@ 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: + const ::google::protobuf::SourceContext& _internal_source_context() const; + public: const ::google::protobuf::SourceContext& source_context() const; ::google::protobuf::SourceContext* release_source_context(); ::google::protobuf::SourceContext* mutable_source_context(); @@ -902,9 +894,8 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::SourceContext* source_context_; int syntax_; - mutable int _cached_size_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; - friend void ::protobuf_google_2fprotobuf_2ftype_2eproto::InitDefaultsEnumImpl(); }; // ------------------------------------------------------------------- @@ -934,10 +925,10 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro return *this; } #endif - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } - inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL { + inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); @@ -948,7 +939,7 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro return reinterpret_cast( &_EnumValue_default_instance_); } - static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + static constexpr int kIndexInFileMessages = 3; void UnsafeArenaSwap(EnumValue* other); @@ -959,32 +950,33 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro // implements Message ---------------------------------------------- - inline EnumValue* New() const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(NULL); + inline EnumValue* New() const final { + return CreateMaybeMessage(NULL); } - EnumValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage(arena); + EnumValue* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const EnumValue& from); void MergeFrom(const EnumValue& from); - void Clear() PROTOBUF_FINAL; - bool IsInitialized() const PROTOBUF_FINAL; + void Clear() final; + bool IsInitialized() const final; - size_t ByteSizeLong() const PROTOBUF_FINAL; + size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; - int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const PROTOBUF_FINAL; + void SetCachedSize(int size) const final; void InternalSwap(EnumValue* other); protected: explicit EnumValue(::google::protobuf::Arena* arena); @@ -1000,7 +992,7 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro } public: - ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1057,9 +1049,8 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::int32 number_; - mutable int _cached_size_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; - friend void ::protobuf_google_2fprotobuf_2ftype_2eproto::InitDefaultsEnumValueImpl(); }; // ------------------------------------------------------------------- @@ -1089,10 +1080,10 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc return *this; } #endif - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline ::google::protobuf::Arena* GetArena() const final { return GetArenaNoVirtual(); } - inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL { + inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } static const ::google::protobuf::Descriptor* descriptor(); @@ -1103,7 +1094,7 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc return reinterpret_cast( &_Option_default_instance_); } - static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + static constexpr int kIndexInFileMessages = 4; void UnsafeArenaSwap(Option* other); @@ -1114,32 +1105,33 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc // implements Message ---------------------------------------------- - inline Option* New() const PROTOBUF_FINAL { - return ::google::protobuf::Arena::CreateMessage