From 5a76e633ea9b5adb215e93fdc11e1c0c08b3fc74 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 17 Nov 2016 16:48:38 -0800 Subject: Integrated internal changes from Google --- src/google/protobuf/any.pb.h | 75 ++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 37 deletions(-) (limited to 'src/google/protobuf/any.pb.h') diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 0641e244..482db72f 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -24,11 +24,18 @@ #include #include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include // @@protoc_insertion_point(includes) +namespace google { +namespace protobuf { +class Any; +class AnyDefaultTypeInternal; +extern AnyDefaultTypeInternal _Any_default_instance_; +} // namespace protobuf +} // namespace google namespace google { namespace protobuf { @@ -36,10 +43,6 @@ namespace protobuf { // Internal implementation detail -- do not call these. void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto(); void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fany_2eproto(); -void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto(); -void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); - -class Any; // =================================================================== @@ -58,7 +61,10 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in static const ::google::protobuf::Descriptor* descriptor(); static const Any& default_instance(); - static const Any* internal_default_instance(); + static inline const Any* internal_default_instance() { + return reinterpret_cast( + &_Any_default_instance_); + } // implements Any ----------------------------------------------- @@ -74,49 +80,49 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in // implements Message ---------------------------------------------- - inline Any* New() const { return New(NULL); } + inline Any* New() const PROTOBUF_FINAL { return New(NULL); } - Any* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + Any* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Any& from); void MergeFrom(const Any& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - size_t ByteSizeLong() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { return InternalSerializeWithCachedSizesToArray(false, output); } - int GetCachedSize() const { return _cached_size_; } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; void InternalSwap(Any* other); - void UnsafeMergeFrom(const Any& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); + return NULL; } inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); + return NULL; } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // optional string type_url = 1; + // string type_url = 1; void clear_type_url(); static const int kTypeUrlFieldNumber = 1; const ::std::string& type_url() const; @@ -127,7 +133,7 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in ::std::string* release_type_url(); void set_allocated_type_url(::std::string* type_url); - // optional bytes value = 2; + // bytes value = 2; void clear_value(); static const int kValueFieldNumber = 2; const ::std::string& value() const; @@ -148,13 +154,10 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in ::google::protobuf::internal::AnyMetadata _any_metadata_; friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fany_2eproto_impl(); friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto_impl(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto(); + friend const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fany_2eproto(); friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); - void InitAsDefaultInstance(); }; -extern ::google::protobuf::internal::ExplicitlyConstructed Any_default_instance_; - // =================================================================== @@ -163,13 +166,13 @@ extern ::google::protobuf::internal::ExplicitlyConstructed Any_default_inst #if !PROTOBUF_INLINE_NOT_IN_HEADERS // Any -// optional string type_url = 1; +// string type_url = 1; inline void Any::clear_type_url() { type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& Any::type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) - return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return type_url_.GetNoArena(); } inline void Any::set_type_url(const ::std::string& value) { @@ -207,13 +210,13 @@ inline void Any::set_allocated_type_url(::std::string* type_url) { // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url) } -// optional bytes value = 2; +// bytes value = 2; inline void Any::clear_value() { value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& Any::value() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.value) - return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return value_.GetNoArena(); } inline void Any::set_value(const ::std::string& value) { @@ -251,13 +254,11 @@ inline void Any::set_allocated_value(::std::string* value) { // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value) } -inline const Any* Any::internal_default_instance() { - return &Any_default_instance_.get(); -} #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) + } // namespace protobuf } // namespace google -- cgit v1.2.3