diff options
Diffstat (limited to 'src/google/protobuf/type.pb.h')
-rw-r--r-- | src/google/protobuf/type.pb.h | 973 |
1 files changed, 623 insertions, 350 deletions
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index ae816008..69af6c2e 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -1,19 +1,19 @@ // 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 <string> #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3002000 +#if GOOGLE_PROTOBUF_VERSION < 3005000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3002000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -22,7 +22,9 @@ #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/arena.h> #include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> #include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> #include <google/protobuf/metadata.h> #include <google/protobuf/message.h> #include <google/protobuf/repeated_field.h> // IWYU pragma: export @@ -32,11 +34,22 @@ #include <google/protobuf/any.pb.h> #include <google/protobuf/source_context.pb.h> // @@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. +struct LIBPROTOBUF_EXPORT TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[5]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static const ::google::protobuf::uint32 offsets[]; +}; +void LIBPROTOBUF_EXPORT AddDescriptors(); +} // namespace protobuf_google_2fprotobuf_2ftype_2eproto namespace google { namespace protobuf { -class Any; -class AnyDefaultTypeInternal; -LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_; class Enum; class EnumDefaultTypeInternal; LIBPROTOBUF_EXPORT extern EnumDefaultTypeInternal _Enum_default_instance_; @@ -49,28 +62,22 @@ LIBPROTOBUF_EXPORT extern FieldDefaultTypeInternal _Field_default_instance_; class Option; class OptionDefaultTypeInternal; LIBPROTOBUF_EXPORT extern OptionDefaultTypeInternal _Option_default_instance_; -class SourceContext; -class SourceContextDefaultTypeInternal; -LIBPROTOBUF_EXPORT extern SourceContextDefaultTypeInternal _SourceContext_default_instance_; class Type; class TypeDefaultTypeInternal; LIBPROTOBUF_EXPORT extern TypeDefaultTypeInternal _Type_default_instance_; } // namespace protobuf } // namespace google - namespace google { namespace protobuf { - -namespace protobuf_google_2fprotobuf_2ftype_2eproto { -// Internal implementation detail -- do not call these. -struct LIBPROTOBUF_EXPORT TableStruct { - static const ::google::protobuf::uint32 offsets[]; - static void InitDefaultsImpl(); - static void Shutdown(); -}; -void LIBPROTOBUF_EXPORT AddDescriptors(); -void LIBPROTOBUF_EXPORT InitDefaults(); -} // namespace protobuf_google_2fprotobuf_2ftype_2eproto +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 { +namespace protobuf { enum Field_Kind { Field_Kind_TYPE_UNKNOWN = 0, @@ -167,53 +174,73 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i CopyFrom(from); return *this; } + #if LANG_CXX11 + Type(Type&& from) noexcept + : Type() { + *this = ::std::move(from); + } - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline Type& operator=(Type&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + 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(); static const Type& default_instance(); + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const Type* internal_default_instance() { return reinterpret_cast<const Type*>( &_Type_default_instance_); } + static constexpr int kIndexInFileMessages = + 0; void UnsafeArenaSwap(Type* other); void Swap(Type* other); + friend void swap(Type& a, Type& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- - inline Type* New() const PROTOBUF_FINAL { return New(NULL); } + inline Type* New() const final { + return CreateMaybeMessage<Type>(NULL); + } - Type* 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; + Type* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage<Type>(arena); + } + 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; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) - const PROTOBUF_FINAL { - return InternalSerializeWithCachedSizesToArray( - ::google::protobuf::io::CodedOutputStream::IsDefaultSerializationDeterministic(), output); - } - 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); @@ -229,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 ---------------------------------------------------- @@ -239,11 +266,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; @@ -273,11 +300,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; @@ -286,12 +313,21 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_name(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_name( ::std::string* name); @@ -300,16 +336,15 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i void clear_source_context(); static const int kSourceContextFieldNumber = 5; private: - void _slow_mutable_source_context(); - ::google::protobuf::SourceContext* _slow_release_source_context(); + const ::google::protobuf::SourceContext& _internal_source_context() const; public: const ::google::protobuf::SourceContext& source_context() const; - ::google::protobuf::SourceContext* mutable_source_context(); ::google::protobuf::SourceContext* release_source_context(); + ::google::protobuf::SourceContext* mutable_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); + ::google::protobuf::SourceContext* unsafe_arena_release_source_context(); // .google.protobuf.Syntax syntax = 6; void clear_syntax(); @@ -321,7 +356,7 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template <typename T> friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field > fields_; @@ -330,8 +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_; - friend struct LIBPROTOBUF_EXPORT protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -346,53 +381,73 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ CopyFrom(from); return *this; } + #if LANG_CXX11 + Field(Field&& from) noexcept + : Field() { + *this = ::std::move(from); + } - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline Field& operator=(Field&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + 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(); static const Field& default_instance(); + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const Field* internal_default_instance() { return reinterpret_cast<const Field*>( &_Field_default_instance_); } + static constexpr int kIndexInFileMessages = + 1; void UnsafeArenaSwap(Field* other); void Swap(Field* other); + friend void swap(Field& a, Field& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- - inline Field* New() const PROTOBUF_FINAL { return New(NULL); } + inline Field* New() const final { + return CreateMaybeMessage<Field>(NULL); + } - Field* 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; + Field* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage<Field>(arena); + } + 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; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) - const PROTOBUF_FINAL { - return InternalSerializeWithCachedSizesToArray( - ::google::protobuf::io::CodedOutputStream::IsDefaultSerializationDeterministic(), output); - } - 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); @@ -408,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 ---------------------------------------------------- @@ -508,11 +563,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; @@ -521,12 +576,21 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ static const int kNameFieldNumber = 4; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_name(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_name( ::std::string* name); @@ -535,12 +599,21 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ static const int kTypeUrlFieldNumber = 6; const ::std::string& type_url() const; void set_type_url(const ::std::string& value); + #if LANG_CXX11 + void set_type_url(::std::string&& value); + #endif void set_type_url(const char* value); void set_type_url(const char* value, size_t size); ::std::string* mutable_type_url(); ::std::string* release_type_url(); void set_allocated_type_url(::std::string* type_url); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_type_url(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_type_url( ::std::string* type_url); @@ -549,12 +622,21 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ static const int kJsonNameFieldNumber = 10; const ::std::string& json_name() const; void set_json_name(const ::std::string& value); + #if LANG_CXX11 + void set_json_name(::std::string&& value); + #endif void set_json_name(const char* value); void set_json_name(const char* value, size_t size); ::std::string* mutable_json_name(); ::std::string* release_json_name(); void set_allocated_json_name(::std::string* json_name); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_json_name(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_json_name( ::std::string* json_name); @@ -563,12 +645,21 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ static const int kDefaultValueFieldNumber = 11; const ::std::string& default_value() const; void set_default_value(const ::std::string& value); + #if LANG_CXX11 + void set_default_value(::std::string&& value); + #endif void set_default_value(const char* value); void set_default_value(const char* value, size_t size); ::std::string* mutable_default_value(); ::std::string* release_default_value(); void set_allocated_default_value(::std::string* default_value); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_default_value(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_default_value( ::std::string* default_value); @@ -606,7 +697,7 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template <typename T> friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; @@ -619,8 +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_; - friend struct LIBPROTOBUF_EXPORT protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -635,53 +726,73 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i CopyFrom(from); return *this; } + #if LANG_CXX11 + Enum(Enum&& from) noexcept + : Enum() { + *this = ::std::move(from); + } - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline Enum& operator=(Enum&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + 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(); static const Enum& default_instance(); + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const Enum* internal_default_instance() { return reinterpret_cast<const Enum*>( &_Enum_default_instance_); } + static constexpr int kIndexInFileMessages = + 2; void UnsafeArenaSwap(Enum* other); void Swap(Enum* other); + friend void swap(Enum& a, Enum& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- - inline Enum* New() const PROTOBUF_FINAL { return New(NULL); } + inline Enum* New() const final { + return CreateMaybeMessage<Enum>(NULL); + } - Enum* 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; + Enum* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage<Enum>(arena); + } + 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; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) - const PROTOBUF_FINAL { - return InternalSerializeWithCachedSizesToArray( - ::google::protobuf::io::CodedOutputStream::IsDefaultSerializationDeterministic(), output); - } - 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); @@ -697,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 ---------------------------------------------------- @@ -707,11 +818,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; @@ -719,11 +830,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; @@ -732,12 +843,21 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_name(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_name( ::std::string* name); @@ -746,16 +866,15 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i void clear_source_context(); static const int kSourceContextFieldNumber = 4; private: - void _slow_mutable_source_context(); - ::google::protobuf::SourceContext* _slow_release_source_context(); + const ::google::protobuf::SourceContext& _internal_source_context() const; public: const ::google::protobuf::SourceContext& source_context() const; - ::google::protobuf::SourceContext* mutable_source_context(); ::google::protobuf::SourceContext* release_source_context(); + ::google::protobuf::SourceContext* mutable_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); + ::google::protobuf::SourceContext* unsafe_arena_release_source_context(); // .google.protobuf.Syntax syntax = 5; void clear_syntax(); @@ -767,7 +886,7 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template <typename T> friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue > enumvalue_; @@ -775,8 +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_; - friend struct LIBPROTOBUF_EXPORT protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -791,53 +910,73 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro CopyFrom(from); return *this; } + #if LANG_CXX11 + EnumValue(EnumValue&& from) noexcept + : EnumValue() { + *this = ::std::move(from); + } - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline EnumValue& operator=(EnumValue&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + 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(); static const EnumValue& default_instance(); + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const EnumValue* internal_default_instance() { return reinterpret_cast<const EnumValue*>( &_EnumValue_default_instance_); } + static constexpr int kIndexInFileMessages = + 3; void UnsafeArenaSwap(EnumValue* other); void Swap(EnumValue* other); + friend void swap(EnumValue& a, EnumValue& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- - inline EnumValue* New() const PROTOBUF_FINAL { return New(NULL); } + inline EnumValue* New() const final { + return CreateMaybeMessage<EnumValue>(NULL); + } - EnumValue* 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; + EnumValue* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage<EnumValue>(arena); + } + 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; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) - const PROTOBUF_FINAL { - return InternalSerializeWithCachedSizesToArray( - ::google::protobuf::io::CodedOutputStream::IsDefaultSerializationDeterministic(), output); - } - 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); @@ -853,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 ---------------------------------------------------- @@ -863,11 +1002,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; @@ -876,12 +1015,21 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_name(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_name( ::std::string* name); @@ -895,14 +1043,14 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template <typename T> friend class ::google::protobuf::Arena::InternalHelper; 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 struct LIBPROTOBUF_EXPORT protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -917,53 +1065,73 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc CopyFrom(from); return *this; } + #if LANG_CXX11 + Option(Option&& from) noexcept + : Option() { + *this = ::std::move(from); + } - inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { + inline Option& operator=(Option&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + 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(); static const Option& default_instance(); + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const Option* internal_default_instance() { return reinterpret_cast<const Option*>( &_Option_default_instance_); } + static constexpr int kIndexInFileMessages = + 4; void UnsafeArenaSwap(Option* other); void Swap(Option* other); + friend void swap(Option& a, Option& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- - inline Option* New() const PROTOBUF_FINAL { return New(NULL); } + inline Option* New() const final { + return CreateMaybeMessage<Option>(NULL); + } - Option* 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; + Option* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage<Option>(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const Option& from); void MergeFrom(const Option& 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; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) - const PROTOBUF_FINAL { - return InternalSerializeWithCachedSizesToArray( - ::google::protobuf::io::CodedOutputStream::IsDefaultSerializationDeterministic(), output); - } - 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(Option* other); protected: explicit Option(::google::protobuf::Arena* arena); @@ -979,7 +1147,7 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc } public: - ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -990,12 +1158,21 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); ::std::string* release_name(); void set_allocated_name(::std::string* name); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") ::std::string* unsafe_arena_release_name(); + PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") void unsafe_arena_set_allocated_name( ::std::string* name); @@ -1004,35 +1181,37 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc void clear_value(); static const int kValueFieldNumber = 2; private: - void _slow_mutable_value(); - ::google::protobuf::Any* _slow_release_value(); + const ::google::protobuf::Any& _internal_value() const; public: const ::google::protobuf::Any& value() const; - ::google::protobuf::Any* mutable_value(); ::google::protobuf::Any* release_value(); + ::google::protobuf::Any* mutable_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); + ::google::protobuf::Any* unsafe_arena_release_value(); // @@protoc_insertion_point(class_scope:google.protobuf.Option) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template <typename T> friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::Any* value_; - mutable int _cached_size_; - friend struct LIBPROTOBUF_EXPORT protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_google_2fprotobuf_2ftype_2eproto::TableStruct; }; // =================================================================== // =================================================================== -#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Type // string name = 1; @@ -1048,7 +1227,16 @@ inline void Type::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Type.name) } +#if LANG_CXX11 +inline void Type::set_name(::std::string&& value) { + + name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Type.name) +} +#endif inline void Type::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -1071,13 +1259,6 @@ inline ::std::string* Type::release_name() { return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* Type::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void Type::set_allocated_name(::std::string* name) { if (name != NULL) { @@ -1088,6 +1269,13 @@ inline void Type::set_allocated_name(::std::string* name) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name) } +inline ::std::string* Type::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void Type::unsafe_arena_set_allocated_name( ::std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -1108,23 +1296,23 @@ inline int Type::fields_size() const { inline void Type::clear_fields() { fields_.Clear(); } -inline const ::google::protobuf::Field& Type::fields(int index) const { - // @@protoc_insertion_point(field_get:google.protobuf.Type.fields) - return fields_.Get(index); -} inline ::google::protobuf::Field* Type::mutable_fields(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields) return fields_.Mutable(index); } -inline ::google::protobuf::Field* Type::add_fields() { - // @@protoc_insertion_point(field_add:google.protobuf.Type.fields) - return fields_.Add(); -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* Type::mutable_fields() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields) return &fields_; } +inline const ::google::protobuf::Field& Type::fields(int index) const { + // @@protoc_insertion_point(field_get:google.protobuf.Type.fields) + return fields_.Get(index); +} +inline ::google::protobuf::Field* Type::add_fields() { + // @@protoc_insertion_point(field_add:google.protobuf.Type.fields) + return fields_.Add(); +} inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& Type::fields() const { // @@protoc_insertion_point(field_list:google.protobuf.Type.fields) @@ -1157,6 +1345,7 @@ inline void Type::set_oneofs(int index, ::std::string&& value) { } #endif inline void Type::set_oneofs(int index, const char* value) { + GOOGLE_DCHECK(value != NULL); oneofs_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs) } @@ -1175,11 +1364,12 @@ inline void Type::add_oneofs(const ::std::string& value) { } #if LANG_CXX11 inline void Type::add_oneofs(::std::string&& value) { - oneofs_.Add()->assign(std::move(value)); + oneofs_.Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) } #endif inline void Type::add_oneofs(const char* value) { + GOOGLE_DCHECK(value != NULL); oneofs_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs) } @@ -1205,23 +1395,23 @@ inline int Type::options_size() const { inline void Type::clear_options() { options_.Clear(); } -inline const ::google::protobuf::Option& Type::options(int index) const { - // @@protoc_insertion_point(field_get:google.protobuf.Type.options) - return options_.Get(index); -} inline ::google::protobuf::Option* Type::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.options) return options_.Mutable(index); } -inline ::google::protobuf::Option* Type::add_options() { - // @@protoc_insertion_point(field_add:google.protobuf.Type.options) - return options_.Add(); -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Type::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) return &options_; } +inline const ::google::protobuf::Option& Type::options(int index) const { + // @@protoc_insertion_point(field_get:google.protobuf.Type.options) + return options_.Get(index); +} +inline ::google::protobuf::Option* Type::add_options() { + // @@protoc_insertion_point(field_add:google.protobuf.Type.options) + return options_.Add(); +} inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& Type::options() const { // @@protoc_insertion_point(field_list:google.protobuf.Type.options) @@ -1232,50 +1422,57 @@ Type::options() const { inline bool Type::has_source_context() const { return this != internal_default_instance() && source_context_ != NULL; } -inline void Type::clear_source_context() { - if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; - source_context_ = NULL; +inline const ::google::protobuf::SourceContext& Type::_internal_source_context() const { + return *source_context_; } inline const ::google::protobuf::SourceContext& Type::source_context() const { + const ::google::protobuf::SourceContext* p = source_context_; // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context) - return source_context_ != NULL ? *source_context_ - : *::google::protobuf::SourceContext::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>( + &::google::protobuf::_SourceContext_default_instance_); +} +inline ::google::protobuf::SourceContext* Type::release_source_context() { + // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context) + + ::google::protobuf::SourceContext* temp = source_context_; + if (GetArenaNoVirtual() != NULL) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + source_context_ = NULL; + return temp; +} +inline ::google::protobuf::SourceContext* Type::unsafe_arena_release_source_context() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.source_context) + + ::google::protobuf::SourceContext* temp = source_context_; + source_context_ = NULL; + return temp; } inline ::google::protobuf::SourceContext* Type::mutable_source_context() { if (source_context_ == NULL) { - _slow_mutable_source_context(); + auto* p = CreateMaybeMessage<::google::protobuf::SourceContext>(GetArenaNoVirtual()); + source_context_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context) return source_context_; } -inline ::google::protobuf::SourceContext* Type::release_source_context() { - // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context) - - if (GetArenaNoVirtual() != NULL) { - return _slow_release_source_context(); - } else { - ::google::protobuf::SourceContext* temp = source_context_; - source_context_ = NULL; - return temp; - } -} -inline void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { +inline void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { - delete source_context_; + delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_); } - if (source_context != NULL) { - if (message_arena != NULL) { - message_arena->Own(source_context); - } - } - source_context_ = source_context; if (source_context) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + source_context = ::google::protobuf::internal::GetOwnedMessage( + message_arena, source_context, submessage_arena); + } } else { } + source_context_ = source_context; // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_context) } @@ -1352,7 +1549,16 @@ inline void Field::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Field.name) } +#if LANG_CXX11 +inline void Field::set_name(::std::string&& value) { + + name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.name) +} +#endif inline void Field::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -1375,13 +1581,6 @@ inline ::std::string* Field::release_name() { return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* Field::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void Field::set_allocated_name(::std::string* name) { if (name != NULL) { @@ -1392,6 +1591,13 @@ inline void Field::set_allocated_name(::std::string* name) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name) } +inline ::std::string* Field::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void Field::unsafe_arena_set_allocated_name( ::std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -1418,7 +1624,16 @@ inline void Field::set_type_url(const ::std::string& value) { type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Field.type_url) } +#if LANG_CXX11 +inline void Field::set_type_url(::std::string&& value) { + + type_url_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.type_url) +} +#endif inline void Field::set_type_url(const char* value) { + GOOGLE_DCHECK(value != NULL); type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -1441,13 +1656,6 @@ inline ::std::string* Field::release_type_url() { return type_url_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* Field::unsafe_arena_release_type_url() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.type_url) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return type_url_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void Field::set_allocated_type_url(::std::string* type_url) { if (type_url != NULL) { @@ -1458,6 +1666,13 @@ inline void Field::set_allocated_type_url(::std::string* type_url) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url) } +inline ::std::string* Field::unsafe_arena_release_type_url() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.type_url) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return type_url_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void Field::unsafe_arena_set_allocated_type_url( ::std::string* type_url) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -1506,23 +1721,23 @@ inline int Field::options_size() const { inline void Field::clear_options() { options_.Clear(); } -inline const ::google::protobuf::Option& Field::options(int index) const { - // @@protoc_insertion_point(field_get:google.protobuf.Field.options) - return options_.Get(index); -} inline ::google::protobuf::Option* Field::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Field.options) return options_.Mutable(index); } -inline ::google::protobuf::Option* Field::add_options() { - // @@protoc_insertion_point(field_add:google.protobuf.Field.options) - return options_.Add(); -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Field::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) return &options_; } +inline const ::google::protobuf::Option& Field::options(int index) const { + // @@protoc_insertion_point(field_get:google.protobuf.Field.options) + return options_.Get(index); +} +inline ::google::protobuf::Option* Field::add_options() { + // @@protoc_insertion_point(field_add:google.protobuf.Field.options) + return options_.Add(); +} inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& Field::options() const { // @@protoc_insertion_point(field_list:google.protobuf.Field.options) @@ -1542,7 +1757,16 @@ inline void Field::set_json_name(const ::std::string& value) { json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Field.json_name) } +#if LANG_CXX11 +inline void Field::set_json_name(::std::string&& value) { + + json_name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.json_name) +} +#endif inline void Field::set_json_name(const char* value) { + GOOGLE_DCHECK(value != NULL); json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -1565,13 +1789,6 @@ inline ::std::string* Field::release_json_name() { return json_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* Field::unsafe_arena_release_json_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.json_name) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void Field::set_allocated_json_name(::std::string* json_name) { if (json_name != NULL) { @@ -1582,6 +1799,13 @@ inline void Field::set_allocated_json_name(::std::string* json_name) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name) } +inline ::std::string* Field::unsafe_arena_release_json_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.json_name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void Field::unsafe_arena_set_allocated_json_name( ::std::string* json_name) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -1608,7 +1832,16 @@ inline void Field::set_default_value(const ::std::string& value) { default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Field.default_value) } +#if LANG_CXX11 +inline void Field::set_default_value(::std::string&& value) { + + default_value_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.default_value) +} +#endif inline void Field::set_default_value(const char* value) { + GOOGLE_DCHECK(value != NULL); default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -1631,13 +1864,6 @@ inline ::std::string* Field::release_default_value() { return default_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* Field::unsafe_arena_release_default_value() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.default_value) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void Field::set_allocated_default_value(::std::string* default_value) { if (default_value != NULL) { @@ -1648,6 +1874,13 @@ inline void Field::set_allocated_default_value(::std::string* default_value) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value) } +inline ::std::string* Field::unsafe_arena_release_default_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.default_value) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void Field::unsafe_arena_set_allocated_default_value( ::std::string* default_value) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -1678,7 +1911,16 @@ inline void Enum::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Enum.name) } +#if LANG_CXX11 +inline void Enum::set_name(::std::string&& value) { + + name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Enum.name) +} +#endif inline void Enum::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -1701,13 +1943,6 @@ inline ::std::string* Enum::release_name() { return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* Enum::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void Enum::set_allocated_name(::std::string* name) { if (name != NULL) { @@ -1718,6 +1953,13 @@ inline void Enum::set_allocated_name(::std::string* name) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name) } +inline ::std::string* Enum::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void Enum::unsafe_arena_set_allocated_name( ::std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -1738,23 +1980,23 @@ inline int Enum::enumvalue_size() const { inline void Enum::clear_enumvalue() { enumvalue_.Clear(); } -inline const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const { - // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue) - return enumvalue_.Get(index); -} inline ::google::protobuf::EnumValue* Enum::mutable_enumvalue(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue) return enumvalue_.Mutable(index); } -inline ::google::protobuf::EnumValue* Enum::add_enumvalue() { - // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue) - return enumvalue_.Add(); -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* Enum::mutable_enumvalue() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue) return &enumvalue_; } +inline const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const { + // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue) + return enumvalue_.Get(index); +} +inline ::google::protobuf::EnumValue* Enum::add_enumvalue() { + // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue) + return enumvalue_.Add(); +} inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& Enum::enumvalue() const { // @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue) @@ -1768,23 +2010,23 @@ inline int Enum::options_size() const { inline void Enum::clear_options() { options_.Clear(); } -inline const ::google::protobuf::Option& Enum::options(int index) const { - // @@protoc_insertion_point(field_get:google.protobuf.Enum.options) - return options_.Get(index); -} inline ::google::protobuf::Option* Enum::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options) return options_.Mutable(index); } -inline ::google::protobuf::Option* Enum::add_options() { - // @@protoc_insertion_point(field_add:google.protobuf.Enum.options) - return options_.Add(); -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Enum::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) return &options_; } +inline const ::google::protobuf::Option& Enum::options(int index) const { + // @@protoc_insertion_point(field_get:google.protobuf.Enum.options) + return options_.Get(index); +} +inline ::google::protobuf::Option* Enum::add_options() { + // @@protoc_insertion_point(field_add:google.protobuf.Enum.options) + return options_.Add(); +} inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& Enum::options() const { // @@protoc_insertion_point(field_list:google.protobuf.Enum.options) @@ -1795,50 +2037,57 @@ Enum::options() const { inline bool Enum::has_source_context() const { return this != internal_default_instance() && source_context_ != NULL; } -inline void Enum::clear_source_context() { - if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; - source_context_ = NULL; +inline const ::google::protobuf::SourceContext& Enum::_internal_source_context() const { + return *source_context_; } inline const ::google::protobuf::SourceContext& Enum::source_context() const { + const ::google::protobuf::SourceContext* p = source_context_; // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context) - return source_context_ != NULL ? *source_context_ - : *::google::protobuf::SourceContext::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>( + &::google::protobuf::_SourceContext_default_instance_); +} +inline ::google::protobuf::SourceContext* Enum::release_source_context() { + // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context) + + ::google::protobuf::SourceContext* temp = source_context_; + if (GetArenaNoVirtual() != NULL) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + source_context_ = NULL; + return temp; +} +inline ::google::protobuf::SourceContext* Enum::unsafe_arena_release_source_context() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.source_context) + + ::google::protobuf::SourceContext* temp = source_context_; + source_context_ = NULL; + return temp; } inline ::google::protobuf::SourceContext* Enum::mutable_source_context() { if (source_context_ == NULL) { - _slow_mutable_source_context(); + auto* p = CreateMaybeMessage<::google::protobuf::SourceContext>(GetArenaNoVirtual()); + source_context_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context) return source_context_; } -inline ::google::protobuf::SourceContext* Enum::release_source_context() { - // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context) - - if (GetArenaNoVirtual() != NULL) { - return _slow_release_source_context(); - } else { - ::google::protobuf::SourceContext* temp = source_context_; - source_context_ = NULL; - return temp; - } -} -inline void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { +inline void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { - delete source_context_; + delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_); } - if (source_context != NULL) { - if (message_arena != NULL) { - message_arena->Own(source_context); - } - } - source_context_ = source_context; if (source_context) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + source_context = ::google::protobuf::internal::GetOwnedMessage( + message_arena, source_context, submessage_arena); + } } else { } + source_context_ = source_context; // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_context) } @@ -1873,7 +2122,16 @@ inline void EnumValue::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name) } +#if LANG_CXX11 +inline void EnumValue::set_name(::std::string&& value) { + + name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumValue.name) +} +#endif inline void EnumValue::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -1896,13 +2154,6 @@ inline ::std::string* EnumValue::release_name() { return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* EnumValue::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValue.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void EnumValue::set_allocated_name(::std::string* name) { if (name != NULL) { @@ -1913,6 +2164,13 @@ inline void EnumValue::set_allocated_name(::std::string* name) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name) } +inline ::std::string* EnumValue::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValue.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void EnumValue::unsafe_arena_set_allocated_name( ::std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -1947,23 +2205,23 @@ inline int EnumValue::options_size() const { inline void EnumValue::clear_options() { options_.Clear(); } -inline const ::google::protobuf::Option& EnumValue::options(int index) const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options) - return options_.Get(index); -} inline ::google::protobuf::Option* EnumValue::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options) return options_.Mutable(index); } -inline ::google::protobuf::Option* EnumValue::add_options() { - // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options) - return options_.Add(); -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* EnumValue::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options) return &options_; } +inline const ::google::protobuf::Option& EnumValue::options(int index) const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options) + return options_.Get(index); +} +inline ::google::protobuf::Option* EnumValue::add_options() { + // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options) + return options_.Add(); +} inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& EnumValue::options() const { // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options) @@ -1987,7 +2245,16 @@ inline void Option::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Option.name) } +#if LANG_CXX11 +inline void Option::set_name(::std::string&& value) { + + name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Option.name) +} +#endif inline void Option::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); @@ -2010,13 +2277,6 @@ inline ::std::string* Option::release_name() { return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* Option::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); - - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); -} inline void Option::set_allocated_name(::std::string* name) { if (name != NULL) { @@ -2027,6 +2287,13 @@ inline void Option::set_allocated_name(::std::string* name) { GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name) } +inline ::std::string* Option::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} inline void Option::unsafe_arena_set_allocated_name( ::std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); @@ -2044,54 +2311,63 @@ inline void Option::unsafe_arena_set_allocated_name( inline bool Option::has_value() const { return this != internal_default_instance() && value_ != NULL; } -inline void Option::clear_value() { - if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_; - value_ = NULL; +inline const ::google::protobuf::Any& Option::_internal_value() const { + return *value_; } inline const ::google::protobuf::Any& Option::value() const { + const ::google::protobuf::Any* p = value_; // @@protoc_insertion_point(field_get:google.protobuf.Option.value) - return value_ != NULL ? *value_ - : *::google::protobuf::Any::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Any*>( + &::google::protobuf::_Any_default_instance_); +} +inline ::google::protobuf::Any* Option::release_value() { + // @@protoc_insertion_point(field_release:google.protobuf.Option.value) + + ::google::protobuf::Any* temp = value_; + if (GetArenaNoVirtual() != NULL) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + value_ = NULL; + return temp; +} +inline ::google::protobuf::Any* Option::unsafe_arena_release_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.value) + + ::google::protobuf::Any* temp = value_; + value_ = NULL; + return temp; } inline ::google::protobuf::Any* Option::mutable_value() { if (value_ == NULL) { - _slow_mutable_value(); + auto* p = CreateMaybeMessage<::google::protobuf::Any>(GetArenaNoVirtual()); + value_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value) return value_; } -inline ::google::protobuf::Any* Option::release_value() { - // @@protoc_insertion_point(field_release:google.protobuf.Option.value) - - if (GetArenaNoVirtual() != NULL) { - return _slow_release_value(); - } else { - ::google::protobuf::Any* temp = value_; - value_ = NULL; - return temp; - } -} -inline void Option::set_allocated_value(::google::protobuf::Any* value) { +inline void Option::set_allocated_value(::google::protobuf::Any* value) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { - delete value_; + delete reinterpret_cast< ::google::protobuf::MessageLite*>(value_); } - if (value != NULL) { - if (message_arena != NULL) { - message_arena->Own(value); - } - } - value_ = value; if (value) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage( + message_arena, value, submessage_arena); + } } else { } + value_ = value; // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value) } -#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ // ------------------------------------------------------------------- // ------------------------------------------------------------------- @@ -2103,25 +2379,23 @@ inline void Option::set_allocated_value(::google::protobuf::Any* value) { // @@protoc_insertion_point(namespace_scope) - } // namespace protobuf } // namespace google -#ifndef SWIG namespace google { namespace protobuf { -template <> struct is_proto_enum< ::google::protobuf::Field_Kind> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::protobuf::Field_Kind> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::Field_Kind>() { return ::google::protobuf::Field_Kind_descriptor(); } -template <> struct is_proto_enum< ::google::protobuf::Field_Cardinality> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::protobuf::Field_Cardinality> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::Field_Cardinality>() { return ::google::protobuf::Field_Cardinality_descriptor(); } -template <> struct is_proto_enum< ::google::protobuf::Syntax> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::protobuf::Syntax> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::Syntax>() { return ::google::protobuf::Syntax_descriptor(); @@ -2129,8 +2403,7 @@ inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::Syntax>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_google_2fprotobuf_2ftype_2eproto__INCLUDED +#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2ftype_2eproto |