diff options
Diffstat (limited to 'src/google/protobuf/api.pb.cc')
-rw-r--r-- | src/google/protobuf/api.pb.cc | 694 |
1 files changed, 508 insertions, 186 deletions
diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 273307c7..ac2a0e89 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -6,8 +6,8 @@ #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> @@ -18,38 +18,29 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> -namespace protobuf_google_2fprotobuf_2fapi_2eproto { -extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Method; -} // namespace protobuf_google_2fprotobuf_2fapi_2eproto -namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto { -extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SourceContext; -} // namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto -namespace protobuf_google_2fprotobuf_2ftype_2eproto { -extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftype_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Option; -} // namespace protobuf_google_2fprotobuf_2ftype_2eproto +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto; namespace google { namespace protobuf { class ApiDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed<Api> - _instance; + ::google::protobuf::internal::ExplicitlyConstructed<Api> _instance; } _Api_default_instance_; class MethodDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed<Method> - _instance; + ::google::protobuf::internal::ExplicitlyConstructed<Method> _instance; } _Method_default_instance_; class MixinDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed<Mixin> - _instance; + ::google::protobuf::internal::ExplicitlyConstructed<Mixin> _instance; } _Mixin_default_instance_; } // namespace protobuf } // namespace google -namespace protobuf_google_2fprotobuf_2fapi_2eproto { -static void InitDefaultsApi() { +static void InitDefaultsApi_google_2fprotobuf_2fapi_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { @@ -60,14 +51,14 @@ static void InitDefaultsApi() { ::google::protobuf::Api::InitAsDefaultInstance(); } -LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<4> scc_info_Api = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsApi}, { - &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Method.base, - &protobuf_google_2fprotobuf_2ftype_2eproto::scc_info_Option.base, - &protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::scc_info_SourceContext.base, - &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Mixin.base,}}; +LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<4> scc_info_Api_google_2fprotobuf_2fapi_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsApi_google_2fprotobuf_2fapi_2eproto}, { + &scc_info_Method_google_2fprotobuf_2fapi_2eproto.base, + &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base, + &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base, + &scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base,}}; -static void InitDefaultsMethod() { +static void InitDefaultsMethod_google_2fprotobuf_2fapi_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { @@ -78,11 +69,11 @@ static void InitDefaultsMethod() { ::google::protobuf::Method::InitAsDefaultInstance(); } -LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_Method = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethod}, { - &protobuf_google_2fprotobuf_2ftype_2eproto::scc_info_Option.base,}}; +LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethod_google_2fprotobuf_2fapi_2eproto}, { + &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}}; -static void InitDefaultsMixin() { +static void InitDefaultsMixin_google_2fprotobuf_2fapi_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { @@ -93,18 +84,20 @@ static void InitDefaultsMixin() { ::google::protobuf::Mixin::InitAsDefaultInstance(); } -LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixin}, {}}; +LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixin_google_2fprotobuf_2fapi_2eproto}, {}}; -void InitDefaults() { - ::google::protobuf::internal::InitSCC(&scc_info_Api.base); - ::google::protobuf::internal::InitSCC(&scc_info_Method.base); - ::google::protobuf::internal::InitSCC(&scc_info_Mixin.base); +void InitDefaults_google_2fprotobuf_2fapi_2eproto() { + ::google::protobuf::internal::InitSCC(&scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); } -::google::protobuf::Metadata file_level_metadata[3]; +::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3]; +constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; +constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { +const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, _internal_metadata_), ~0u, // no _extensions_ @@ -149,66 +142,48 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Mixin_default_instance_), }; -static void protobuf_AssignDescriptors() { - AddDescriptors(); - AssignDescriptors( - "google/protobuf/api.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); -} - -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, 3); -} - -static void AddDescriptorsImpl() { - InitDefaults(); - static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\031google/protobuf/api.proto\022\017google.prot" - "obuf\032$google/protobuf/source_context.pro" - "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014" - "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p" - "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google" - ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou" - "rce_context\030\005 \001(\0132\036.google.protobuf.Sour" - "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto" - "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto" - "buf.Syntax\"\325\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\030\n\020r" - "equest_type_url\030\002 \001(\t\022\031\n\021request_streami" - "ng\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022r" - "esponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\013" - "2\027.google.protobuf.Option\022\'\n\006syntax\030\007 \001(" - "\0162\027.google.protobuf.Syntax\"#\n\005Mixin\022\014\n\004n" - "ame\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBu\n\023com.google.pr" - "otobufB\010ApiProtoP\001Z+google.golang.org/ge" - "nproto/protobuf/api;api\242\002\003GPB\252\002\036Google.P" - "rotobuf.WellKnownTypesb\006proto3" +::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fapi_2eproto = { + {}, AddDescriptors_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", schemas, + file_default_instances, TableStruct_google_2fprotobuf_2fapi_2eproto::offsets, + file_level_metadata_google_2fprotobuf_2fapi_2eproto, 3, file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto, file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto, +}; + +::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = { + false, InitDefaults_google_2fprotobuf_2fapi_2eproto, + "\n\031google/protobuf/api.proto\022\017google.prot" + "obuf\032$google/protobuf/source_context.pro" + "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014" + "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p" + "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google" + ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou" + "rce_context\030\005 \001(\0132\036.google.protobuf.Sour" + "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto" + "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto" + "buf.Syntax\"\325\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\030\n\020r" + "equest_type_url\030\002 \001(\t\022\031\n\021request_streami" + "ng\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022r" + "esponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\013" + "2\027.google.protobuf.Option\022\'\n\006syntax\030\007 \001(" + "\0162\027.google.protobuf.Syntax\"#\n\005Mixin\022\014\n\004n" + "ame\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBu\n\023com.google.pr" + "otobufB\010ApiProtoP\001Z+google.golang.org/ge" + "nproto/protobuf/api;api\242\002\003GPB\252\002\036Google.P" + "rotobuf.WellKnownTypesb\006proto3" +, + "google/protobuf/api.proto", &assign_descriptors_table_google_2fprotobuf_2fapi_2eproto, 750, +}; + +void AddDescriptors_google_2fprotobuf_2fapi_2eproto() { + static constexpr ::google::protobuf::internal::InitFunc deps[2] = + { + ::AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, + ::AddDescriptors_google_2fprotobuf_2ftype_2eproto, }; - ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 750); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "google/protobuf/api.proto", &protobuf_RegisterTypes); - ::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::AddDescriptors(); - ::protobuf_google_2fprotobuf_2ftype_2eproto::AddDescriptors(); + ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fapi_2eproto, deps, 2); } -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_2fapi_2eproto +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto = []() { AddDescriptors_google_2fprotobuf_2fapi_2eproto(); return true; }(); namespace google { namespace protobuf { @@ -218,6 +193,15 @@ void Api::InitAsDefaultInstance() { ::google::protobuf::_Api_default_instance_._instance.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>( ::google::protobuf::SourceContext::internal_default_instance()); } +class Api::HasBitSetters { + public: + static const ::google::protobuf::SourceContext& source_context(const Api* msg); +}; + +const ::google::protobuf::SourceContext& +Api::HasBitSetters::source_context(const Api* msg) { + return *msg->source_context_; +} void Api::clear_options() { options_.Clear(); } @@ -239,8 +223,6 @@ const int Api::kSyntaxFieldNumber; Api::Api() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - ::google::protobuf::internal::InitSCC( - &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Api.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Api) } @@ -269,6 +251,8 @@ Api::Api(const Api& from) } void Api::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&source_context_, 0, static_cast<size_t>( @@ -290,13 +274,8 @@ void Api::SharedDtor() { void Api::SetCachedSize(int size) const { _cached_size_.Set(size); } -const ::google::protobuf::Descriptor* Api::descriptor() { - ::protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; -} - const Api& Api::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Api.base); + ::google::protobuf::internal::InitSCC(&::scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); return *internal_default_instance(); } @@ -320,9 +299,151 @@ void Api::Clear() { _internal_metadata_.Clear(); } +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Api::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast<Api*>(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); + if (!ptr) goto error; + switch (tag >> 3) { + case 0: goto error; + // string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + ctx->extra_parse_data().SetFieldName("google.protobuf.Api.name"); + parser_till_end = ::google::protobuf::internal::StringParserUTF8; + ::std::string* str = msg->mutable_name(); + str->clear(); + object = str; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + // repeated .google.protobuf.Method methods = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + do { + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + parser_till_end = ::google::protobuf::Method::_InternalParse; + object = msg->add_methods(); + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + if (ptr >= end) break; + } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 18 && (ptr += 1)); + break; + } + // repeated .google.protobuf.Option options = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + do { + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + parser_till_end = ::google::protobuf::Option::_InternalParse; + object = msg->add_options(); + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + if (ptr >= end) break; + } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 26 && (ptr += 1)); + break; + } + // string version = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + ctx->extra_parse_data().SetFieldName("google.protobuf.Api.version"); + parser_till_end = ::google::protobuf::internal::StringParserUTF8; + ::std::string* str = msg->mutable_version(); + str->clear(); + object = str; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + // .google.protobuf.SourceContext source_context = 5; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + parser_till_end = ::google::protobuf::SourceContext::_InternalParse; + object = msg->mutable_source_context(); + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + // repeated .google.protobuf.Mixin mixins = 6; + case 6: { + if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + do { + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + parser_till_end = ::google::protobuf::Mixin::_InternalParse; + object = msg->add_mixins(); + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + if (ptr >= end) break; + } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 50 && (ptr += 1)); + break; + } + // .google.protobuf.Syntax syntax = 7; + case 7: { + if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; + ::google::protobuf::uint64 val; + ptr = Varint::Parse64(ptr, &val); + if (!ptr) goto error; + ::google::protobuf::Syntax value = static_cast<::google::protobuf::Syntax>(val); + msg->set_syntax(value); + break; + } + default: { + handle_unusual: (void)&&handle_unusual; + if ((tag & 7) == 4) { + if (!ctx->ValidEndGroup(tag)) goto error; + 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; +error: + return nullptr; +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 Api::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!GOOGLE_PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Api) for (;;) { @@ -332,8 +453,7 @@ bool Api::MergePartialFromCodedStream( switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -348,8 +468,7 @@ bool Api::MergePartialFromCodedStream( // repeated .google.protobuf.Method methods = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_methods())); } else { @@ -360,8 +479,7 @@ bool Api::MergePartialFromCodedStream( // repeated .google.protobuf.Option options = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_options())); } else { @@ -372,8 +490,7 @@ bool Api::MergePartialFromCodedStream( // string version = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -388,8 +505,7 @@ bool Api::MergePartialFromCodedStream( // .google.protobuf.SourceContext source_context = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_source_context())); } else { @@ -400,8 +516,7 @@ bool Api::MergePartialFromCodedStream( // repeated .google.protobuf.Mixin mixins = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_mixins())); } else { @@ -412,8 +527,7 @@ bool Api::MergePartialFromCodedStream( // .google.protobuf.Syntax syntax = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { int value = 0; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -444,6 +558,7 @@ failure: return false; #undef DO_ } +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Api::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { @@ -492,7 +607,7 @@ void Api::SerializeWithCachedSizes( // .google.protobuf.SourceContext source_context = 5; if (this->has_source_context()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, this->_internal_source_context(), output); + 5, HasBitSetters::source_context(this), output); } // repeated .google.protobuf.Mixin mixins = 6; @@ -510,9 +625,9 @@ void Api::SerializeWithCachedSizes( 7, this->syntax(), output); } - 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.Api) } @@ -566,7 +681,7 @@ void Api::SerializeWithCachedSizes( if (this->has_source_context()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( - 5, this->_internal_source_context(), deterministic, target); + 5, HasBitSetters::source_context(this), deterministic, target); } // repeated .google.protobuf.Mixin mixins = 6; @@ -583,9 +698,9 @@ void Api::SerializeWithCachedSizes( 7, this->syntax(), target); } - 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.Api) return target; @@ -595,11 +710,15 @@ size_t Api::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api) 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; + // repeated .google.protobuf.Method methods = 2; { unsigned int count = static_cast<unsigned int>(this->methods_size()); @@ -669,7 +788,7 @@ void Api::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Api) GOOGLE_DCHECK_NE(&from, this); const Api* source = - ::google::protobuf::internal::DynamicCastToGenerated<const Api>( + ::google::protobuf::DynamicCastToGenerated<Api>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Api) @@ -730,6 +849,7 @@ void Api::Swap(Api* other) { } void Api::InternalSwap(Api* other) { using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); CastToBase(&methods_)->InternalSwap(CastToBase(&other->methods_)); CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); CastToBase(&mixins_)->InternalSwap(CastToBase(&other->mixins_)); @@ -739,12 +859,11 @@ void Api::InternalSwap(Api* other) { GetArenaNoVirtual()); swap(source_context_, other->source_context_); swap(syntax_, other->syntax_); - _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata Api::GetMetadata() const { - protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages]; + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); + return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages]; } @@ -752,6 +871,10 @@ void Api::InternalSwap(Api* other) { void Method::InitAsDefaultInstance() { } +class Method::HasBitSetters { + public: +}; + void Method::clear_options() { options_.Clear(); } @@ -767,8 +890,6 @@ const int Method::kSyntaxFieldNumber; Method::Method() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - ::google::protobuf::internal::InitSCC( - &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Method.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Method) } @@ -796,6 +917,8 @@ Method::Method(const Method& from) } void Method::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); request_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); response_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -818,13 +941,8 @@ void Method::SharedDtor() { void Method::SetCachedSize(int size) const { _cached_size_.Set(size); } -const ::google::protobuf::Descriptor* Method::descriptor() { - ::protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; -} - const Method& Method::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Method.base); + ::google::protobuf::internal::InitSCC(&::scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); return *internal_default_instance(); } @@ -845,9 +963,142 @@ void Method::Clear() { _internal_metadata_.Clear(); } +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Method::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast<Method*>(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); + if (!ptr) goto error; + switch (tag >> 3) { + case 0: goto error; + // string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + ctx->extra_parse_data().SetFieldName("google.protobuf.Method.name"); + parser_till_end = ::google::protobuf::internal::StringParserUTF8; + ::std::string* str = msg->mutable_name(); + str->clear(); + object = str; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + // string request_type_url = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + ctx->extra_parse_data().SetFieldName("google.protobuf.Method.request_type_url"); + parser_till_end = ::google::protobuf::internal::StringParserUTF8; + ::std::string* str = msg->mutable_request_type_url(); + str->clear(); + object = str; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + // bool request_streaming = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; + ::google::protobuf::uint64 val; + ptr = Varint::Parse64(ptr, &val); + if (!ptr) goto error; + bool value = val; + msg->set_request_streaming(value); + break; + } + // string response_type_url = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + ctx->extra_parse_data().SetFieldName("google.protobuf.Method.response_type_url"); + parser_till_end = ::google::protobuf::internal::StringParserUTF8; + ::std::string* str = msg->mutable_response_type_url(); + str->clear(); + object = str; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + // bool response_streaming = 5; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; + ::google::protobuf::uint64 val; + ptr = Varint::Parse64(ptr, &val); + if (!ptr) goto error; + bool value = val; + msg->set_response_streaming(value); + break; + } + // repeated .google.protobuf.Option options = 6; + case 6: { + if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + do { + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + parser_till_end = ::google::protobuf::Option::_InternalParse; + object = msg->add_options(); + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + if (ptr >= end) break; + } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 50 && (ptr += 1)); + break; + } + // .google.protobuf.Syntax syntax = 7; + case 7: { + if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; + ::google::protobuf::uint64 val; + ptr = Varint::Parse64(ptr, &val); + if (!ptr) goto error; + ::google::protobuf::Syntax value = static_cast<::google::protobuf::Syntax>(val); + msg->set_syntax(value); + break; + } + default: { + handle_unusual: (void)&&handle_unusual; + if ((tag & 7) == 4) { + if (!ctx->ValidEndGroup(tag)) goto error; + 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; +error: + return nullptr; +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 Method::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!GOOGLE_PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Method) for (;;) { @@ -857,8 +1108,7 @@ bool Method::MergePartialFromCodedStream( switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -873,8 +1123,7 @@ bool Method::MergePartialFromCodedStream( // string request_type_url = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_request_type_url())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -889,8 +1138,7 @@ bool Method::MergePartialFromCodedStream( // bool request_streaming = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -903,8 +1151,7 @@ bool Method::MergePartialFromCodedStream( // string response_type_url = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_response_type_url())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -919,8 +1166,7 @@ bool Method::MergePartialFromCodedStream( // bool response_streaming = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -933,8 +1179,7 @@ bool Method::MergePartialFromCodedStream( // repeated .google.protobuf.Option options = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_options())); } else { @@ -945,8 +1190,7 @@ bool Method::MergePartialFromCodedStream( // .google.protobuf.Syntax syntax = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { int value = 0; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -977,6 +1221,7 @@ failure: return false; #undef DO_ } +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Method::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { @@ -1039,9 +1284,9 @@ void Method::SerializeWithCachedSizes( 7, this->syntax(), output); } - 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.Method) } @@ -1110,9 +1355,9 @@ void Method::SerializeWithCachedSizes( 7, this->syntax(), target); } - 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.Method) return target; @@ -1122,11 +1367,15 @@ size_t Method::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method) 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; + // repeated .google.protobuf.Option options = 6; { unsigned int count = static_cast<unsigned int>(this->options_size()); @@ -1184,7 +1433,7 @@ void Method::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Method) GOOGLE_DCHECK_NE(&from, this); const Method* source = - ::google::protobuf::internal::DynamicCastToGenerated<const Method>( + ::google::protobuf::DynamicCastToGenerated<Method>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Method) @@ -1250,6 +1499,7 @@ void Method::Swap(Method* other) { } void Method::InternalSwap(Method* other) { using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); @@ -1260,12 +1510,11 @@ void Method::InternalSwap(Method* other) { swap(request_streaming_, other->request_streaming_); swap(response_streaming_, other->response_streaming_); swap(syntax_, other->syntax_); - _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata Method::GetMetadata() const { - protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages]; + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); + return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages]; } @@ -1273,6 +1522,10 @@ void Method::InternalSwap(Method* other) { void Mixin::InitAsDefaultInstance() { } +class Mixin::HasBitSetters { + public: +}; + #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Mixin::kNameFieldNumber; const int Mixin::kRootFieldNumber; @@ -1280,8 +1533,6 @@ const int Mixin::kRootFieldNumber; Mixin::Mixin() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - ::google::protobuf::internal::InitSCC( - &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Mixin.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Mixin) } @@ -1301,6 +1552,8 @@ Mixin::Mixin(const Mixin& from) } void Mixin::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1318,13 +1571,8 @@ void Mixin::SharedDtor() { void Mixin::SetCachedSize(int size) const { _cached_size_.Set(size); } -const ::google::protobuf::Descriptor* Mixin::descriptor() { - ::protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; -} - const Mixin& Mixin::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Mixin.base); + ::google::protobuf::internal::InitSCC(&::scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); return *internal_default_instance(); } @@ -1340,9 +1588,80 @@ void Mixin::Clear() { _internal_metadata_.Clear(); } +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Mixin::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast<Mixin*>(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); + if (!ptr) goto error; + switch (tag >> 3) { + case 0: goto error; + // string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + ctx->extra_parse_data().SetFieldName("google.protobuf.Mixin.name"); + parser_till_end = ::google::protobuf::internal::StringParserUTF8; + ::std::string* str = msg->mutable_name(); + str->clear(); + object = str; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + // string root = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = Varint::Parse32Inline(ptr, &size); + if (!ptr) goto error; + ctx->extra_parse_data().SetFieldName("google.protobuf.Mixin.root"); + parser_till_end = ::google::protobuf::internal::StringParserUTF8; + ::std::string* str = msg->mutable_root(); + str->clear(); + object = str; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error; + ptr = newend; + break; + } + default: { + handle_unusual: (void)&&handle_unusual; + if ((tag & 7) == 4) { + if (!ctx->ValidEndGroup(tag)) goto error; + 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; +error: + return nullptr; +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 Mixin::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!GOOGLE_PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Mixin) for (;;) { @@ -1352,8 +1671,7 @@ bool Mixin::MergePartialFromCodedStream( switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -1368,8 +1686,7 @@ bool Mixin::MergePartialFromCodedStream( // string root = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_root())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -1401,6 +1718,7 @@ failure: return false; #undef DO_ } +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Mixin::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { @@ -1428,9 +1746,9 @@ void Mixin::SerializeWithCachedSizes( 2, this->root(), output); } - 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.Mixin) } @@ -1464,9 +1782,9 @@ void Mixin::SerializeWithCachedSizes( 2, this->root(), target); } - 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.Mixin) return target; @@ -1476,11 +1794,15 @@ size_t Mixin::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin) 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; + // string name = 1; if (this->name().size() > 0) { total_size += 1 + @@ -1504,7 +1826,7 @@ void Mixin::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Mixin) GOOGLE_DCHECK_NE(&from, this); const Mixin* source = - ::google::protobuf::internal::DynamicCastToGenerated<const Mixin>( + ::google::protobuf::DynamicCastToGenerated<Mixin>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Mixin) @@ -1556,16 +1878,16 @@ void Mixin::Swap(Mixin* other) { } void Mixin::InternalSwap(Mixin* other) { using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); root_.Swap(&other->root_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata Mixin::GetMetadata() const { - protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages]; + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); + return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages]; } |