diff options
Diffstat (limited to 'src/google/protobuf/empty.pb.cc')
-rw-r--r-- | src/google/protobuf/empty.pb.cc | 170 |
1 files changed, 94 insertions, 76 deletions
diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 163a4f6a..9d0f9ae0 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -6,30 +6,25 @@ #include <algorithm> #include <google/protobuf/stubs/common.h> -#include <google/protobuf/stubs/port.h> #include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> -// This is a temporary google only hack -#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS -#include "third_party/protobuf/version.h" -#endif // @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> namespace google { namespace protobuf { class EmptyDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed<Empty> - _instance; + ::google::protobuf::internal::ExplicitlyConstructed<Empty> _instance; } _Empty_default_instance_; } // namespace protobuf } // namespace google -namespace protobuf_google_2fprotobuf_2fempty_2eproto { -static void InitDefaultsEmpty() { +static void InitDefaultsEmpty_google_2fprotobuf_2fempty_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { @@ -40,23 +35,25 @@ static void InitDefaultsEmpty() { ::google::protobuf::Empty::InitAsDefaultInstance(); } -LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Empty = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmpty}, {}}; +PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Empty_google_2fprotobuf_2fempty_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmpty_google_2fprotobuf_2fempty_2eproto}, {}}; -void InitDefaults() { - ::google::protobuf::internal::InitSCC(&scc_info_Empty.base); +void InitDefaults_google_2fprotobuf_2fempty_2eproto() { + ::google::protobuf::internal::InitSCC(&scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base); } -::google::protobuf::Metadata file_level_metadata[1]; +::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fempty_2eproto[1]; +constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr; +constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { +const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fempty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Empty, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::google::protobuf::Empty, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ }; -static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { +static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::google::protobuf::Empty)}, }; @@ -64,50 +61,32 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Empty_default_instance_), }; -static void protobuf_AssignDescriptors() { - AddDescriptors(); - AssignDescriptors( - "google/protobuf/empty.proto", schemas, file_default_instances, TableStruct::offsets, - file_level_metadata, NULL, NULL); -} - -static void protobuf_AssignDescriptorsOnce() { - static ::google::protobuf::internal::once_flag once; - ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); -} +::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fempty_2eproto = { + {}, AddDescriptors_google_2fprotobuf_2fempty_2eproto, "google/protobuf/empty.proto", schemas, + file_default_instances, TableStruct_google_2fprotobuf_2fempty_2eproto::offsets, + file_level_metadata_google_2fprotobuf_2fempty_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto, file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto, +}; -void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; -void protobuf_RegisterTypes(const ::std::string&) { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); -} +::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fempty_2eproto = { + false, InitDefaults_google_2fprotobuf_2fempty_2eproto, + "\n\033google/protobuf/empty.proto\022\017google.pr" + "otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n" + "EmptyProtoP\001Z\'github.com/golang/protobuf" + "/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf" + ".WellKnownTypesb\006proto3" +, + "google/protobuf/empty.proto", &assign_descriptors_table_google_2fprotobuf_2fempty_2eproto, 183, +}; -static void AddDescriptorsImpl() { - InitDefaults(); - static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\033google/protobuf/empty.proto\022\017google.pr" - "otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n" - "EmptyProtoP\001Z\'github.com/golang/protobuf" - "/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf" - ".WellKnownTypesb\006proto3" +void AddDescriptors_google_2fprotobuf_2fempty_2eproto() { + static constexpr ::google::protobuf::internal::InitFunc deps[1] = + { }; - ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 183); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "google/protobuf/empty.proto", &protobuf_RegisterTypes); + ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fempty_2eproto, deps, 0); } -void AddDescriptors() { - static ::google::protobuf::internal::once_flag once; - ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); -} -// Force AddDescriptors() to be called at dynamic initialization time. -struct StaticDescriptorInitializer { - StaticDescriptorInitializer() { - AddDescriptors(); - } -} static_descriptor_initializer; -} // namespace protobuf_google_2fprotobuf_2fempty_2eproto +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_google_2fprotobuf_2fempty_2eproto = []() { AddDescriptors_google_2fprotobuf_2fempty_2eproto(); return true; }(); namespace google { namespace protobuf { @@ -115,20 +94,21 @@ namespace protobuf { void Empty::InitAsDefaultInstance() { } +class Empty::HasBitSetters { + public: +}; + #if !defined(_MSC_VER) || _MSC_VER >= 1900 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Empty::Empty() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - ::google::protobuf::internal::InitSCC( - &protobuf_google_2fprotobuf_2fempty_2eproto::scc_info_Empty.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Empty) } Empty::Empty(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { - ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fempty_2eproto::scc_info_Empty.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) @@ -161,13 +141,8 @@ void Empty::RegisterArenaDtor(::google::protobuf::Arena*) { void Empty::SetCachedSize(int size) const { _cached_size_.Set(size); } -const ::google::protobuf::Descriptor* Empty::descriptor() { - ::protobuf_google_2fprotobuf_2fempty_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fempty_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; -} - const Empty& Empty::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fempty_2eproto::scc_info_Empty.base); + ::google::protobuf::internal::InitSCC(&::scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base); return *internal_default_instance(); } @@ -181,9 +156,46 @@ void Empty::Clear() { _internal_metadata_.Clear(); } +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Empty::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast<Empty*>(object); + ::google::protobuf::uint32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ::google::protobuf::uint32 tag; + ptr = Varint::Parse32Inline(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + default: { + handle_unusual: (void)&&handle_unusual; + if ((tag & 7) == 4 || tag == 0) { + bool ok = ctx->ValidEndGroup(tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ok); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: (void)&&len_delim_till_end; + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +group_continues: (void)&&group_continues; + GOOGLE_DCHECK(ptr >= end); + ctx->StoreGroup({_InternalParse, msg}, {parser_till_end, object}, depth); + return ptr; +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Empty::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Empty) for (;;) { @@ -205,6 +217,7 @@ failure: return false; #undef DO_ } +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Empty::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { @@ -212,9 +225,9 @@ void Empty::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Empty) } @@ -226,9 +239,9 @@ void Empty::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty) return target; @@ -238,11 +251,15 @@ size_t Empty::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty) size_t total_size = 0; - if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + _internal_metadata_.unknown_fields()); } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -252,7 +269,7 @@ void Empty::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Empty) GOOGLE_DCHECK_NE(&from, this); const Empty* source = - ::google::protobuf::internal::DynamicCastToGenerated<const Empty>( + ::google::protobuf::DynamicCastToGenerated<Empty>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Empty) @@ -315,8 +332,8 @@ void Empty::InternalSwap(Empty* other) { } ::google::protobuf::Metadata Empty::GetMetadata() const { - protobuf_google_2fprotobuf_2fempty_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fempty_2eproto::file_level_metadata[kIndexInFileMessages]; + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fempty_2eproto); + return ::file_level_metadata_google_2fprotobuf_2fempty_2eproto[kIndexInFileMessages]; } @@ -325,10 +342,11 @@ void Empty::InternalSwap(Empty* other) { } // namespace google namespace google { namespace protobuf { -template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Empty* Arena::CreateMaybeMessage< ::google::protobuf::Empty >(Arena* arena) { +template<> PROTOBUF_NOINLINE ::google::protobuf::Empty* Arena::CreateMaybeMessage< ::google::protobuf::Empty >(Arena* arena) { return Arena::CreateMessageInternal< ::google::protobuf::Empty >(arena); } } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> |