aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/descriptor.pb.cc
diff options
context:
space:
mode:
authorkenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-04-25 02:53:47 +0000
committerkenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-04-25 02:53:47 +0000
commitd37d46dfbcedadeb439ad0367f8afcf8867dca43 (patch)
treeb896df229f7c671637924c156d5a759ba50a3190 /src/google/protobuf/descriptor.pb.cc
parent709ea28f3264aa5632e5577a4080671173fc6166 (diff)
downloadprotobuf-d37d46dfbcedadeb439ad0367f8afcf8867dca43.tar.gz
protobuf-d37d46dfbcedadeb439ad0367f8afcf8867dca43.tar.bz2
protobuf-d37d46dfbcedadeb439ad0367f8afcf8867dca43.zip
Integrate recent changes from Google-internal code tree. See CHANGES.txt
for details.
Diffstat (limited to 'src/google/protobuf/descriptor.pb.cc')
-rw-r--r--src/google/protobuf/descriptor.pb.cc1995
1 files changed, 1289 insertions, 706 deletions
diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc
index 8d1b7e3e..6f0b5b54 100644
--- a/src/google/protobuf/descriptor.pb.cc
+++ b/src/google/protobuf/descriptor.pb.cc
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
#include "google/protobuf/descriptor.pb.h"
+#include <google/protobuf/stubs/once.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/reflection_ops.h>
@@ -73,9 +74,13 @@ const ::google::protobuf::internal::GeneratedMessageReflection*
} // namespace
-void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors(const ::google::protobuf::FileDescriptor* file) {
+void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
+ protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "google/protobuf/descriptor.proto");
+ GOOGLE_CHECK(file != NULL);
FileDescriptorSet_descriptor_ = file->message_type(0);
- FileDescriptorSet::default_instance_ = new FileDescriptorSet();
static const int FileDescriptorSet_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_),
};
@@ -88,11 +93,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(FileDescriptorSet));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- FileDescriptorSet_descriptor_, FileDescriptorSet::default_instance_);
FileDescriptorProto_descriptor_ = file->message_type(1);
- FileDescriptorProto::default_instance_ = new FileDescriptorProto();
static const int FileDescriptorProto_offsets_[8] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_),
@@ -112,11 +115,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(FileDescriptorProto));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- FileDescriptorProto_descriptor_, FileDescriptorProto::default_instance_);
DescriptorProto_descriptor_ = file->message_type(2);
- DescriptorProto::default_instance_ = new DescriptorProto();
static const int DescriptorProto_offsets_[7] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_),
@@ -135,9 +136,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(DescriptorProto));
DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0);
- DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange();
static const int DescriptorProto_ExtensionRange_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_),
@@ -151,13 +152,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(DescriptorProto_ExtensionRange));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- DescriptorProto_ExtensionRange_descriptor_, DescriptorProto_ExtensionRange::default_instance_);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- DescriptorProto_descriptor_, DescriptorProto::default_instance_);
FieldDescriptorProto_descriptor_ = file->message_type(3);
- FieldDescriptorProto::default_instance_ = new FieldDescriptorProto();
static const int FieldDescriptorProto_offsets_[8] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_),
@@ -177,13 +174,11 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(FieldDescriptorProto));
FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0);
FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- FieldDescriptorProto_descriptor_, FieldDescriptorProto::default_instance_);
EnumDescriptorProto_descriptor_ = file->message_type(4);
- EnumDescriptorProto::default_instance_ = new EnumDescriptorProto();
static const int EnumDescriptorProto_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_),
@@ -198,11 +193,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(EnumDescriptorProto));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- EnumDescriptorProto_descriptor_, EnumDescriptorProto::default_instance_);
EnumValueDescriptorProto_descriptor_ = file->message_type(5);
- EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto();
static const int EnumValueDescriptorProto_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_),
@@ -217,11 +210,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(EnumValueDescriptorProto));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- EnumValueDescriptorProto_descriptor_, EnumValueDescriptorProto::default_instance_);
ServiceDescriptorProto_descriptor_ = file->message_type(6);
- ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto();
static const int ServiceDescriptorProto_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_),
@@ -236,11 +227,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(ServiceDescriptorProto));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ServiceDescriptorProto_descriptor_, ServiceDescriptorProto::default_instance_);
MethodDescriptorProto_descriptor_ = file->message_type(7);
- MethodDescriptorProto::default_instance_ = new MethodDescriptorProto();
static const int MethodDescriptorProto_offsets_[4] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_),
@@ -256,11 +245,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(MethodDescriptorProto));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- MethodDescriptorProto_descriptor_, MethodDescriptorProto::default_instance_);
FileOptions_descriptor_ = file->message_type(8);
- FileOptions::default_instance_ = new FileOptions();
static const int FileOptions_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_),
@@ -277,12 +264,10 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(FileOptions));
FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- FileOptions_descriptor_, FileOptions::default_instance_);
MessageOptions_descriptor_ = file->message_type(9);
- MessageOptions::default_instance_ = new MessageOptions();
static const int MessageOptions_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_),
@@ -296,14 +281,13 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(MessageOptions));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- MessageOptions_descriptor_, MessageOptions::default_instance_);
FieldOptions_descriptor_ = file->message_type(10);
- FieldOptions::default_instance_ = new FieldOptions();
- static const int FieldOptions_offsets_[4] = {
+ static const int FieldOptions_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, experimental_map_key_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_),
};
@@ -316,12 +300,10 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(FieldOptions));
FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- FieldOptions_descriptor_, FieldOptions::default_instance_);
EnumOptions_descriptor_ = file->message_type(11);
- EnumOptions::default_instance_ = new EnumOptions();
static const int EnumOptions_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_),
};
@@ -334,11 +316,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(EnumOptions));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- EnumOptions_descriptor_, EnumOptions::default_instance_);
EnumValueOptions_descriptor_ = file->message_type(12);
- EnumValueOptions::default_instance_ = new EnumValueOptions();
static const int EnumValueOptions_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_),
};
@@ -351,11 +331,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(EnumValueOptions));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- EnumValueOptions_descriptor_, EnumValueOptions::default_instance_);
ServiceOptions_descriptor_ = file->message_type(13);
- ServiceOptions::default_instance_ = new ServiceOptions();
static const int ServiceOptions_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_),
};
@@ -368,11 +346,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(ServiceOptions));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ServiceOptions_descriptor_, ServiceOptions::default_instance_);
MethodOptions_descriptor_ = file->message_type(14);
- MethodOptions::default_instance_ = new MethodOptions();
static const int MethodOptions_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_),
};
@@ -385,11 +361,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(MethodOptions));
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- MethodOptions_descriptor_, MethodOptions::default_instance_);
UninterpretedOption_descriptor_ = file->message_type(15);
- UninterpretedOption::default_instance_ = new UninterpretedOption();
static const int UninterpretedOption_offsets_[6] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_),
@@ -407,9 +381,9 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(UninterpretedOption));
UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0);
- UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart();
static const int UninterpretedOption_NamePart_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_),
@@ -423,40 +397,67 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescr
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
sizeof(UninterpretedOption_NamePart));
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto);
+}
+
+void protobuf_RegisterTypes() {
+ protobuf_AssignDescriptorsOnce();
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- UninterpretedOption_NamePart_descriptor_, UninterpretedOption_NamePart::default_instance_);
+ FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- UninterpretedOption_descriptor_, UninterpretedOption::default_instance_);
- FileDescriptorSet::default_instance_->InitAsDefaultInstance();
- FileDescriptorProto::default_instance_->InitAsDefaultInstance();
- DescriptorProto::default_instance_->InitAsDefaultInstance();
- DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance();
- FieldDescriptorProto::default_instance_->InitAsDefaultInstance();
- EnumDescriptorProto::default_instance_->InitAsDefaultInstance();
- EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance();
- ServiceDescriptorProto::default_instance_->InitAsDefaultInstance();
- MethodDescriptorProto::default_instance_->InitAsDefaultInstance();
- FileOptions::default_instance_->InitAsDefaultInstance();
- MessageOptions::default_instance_->InitAsDefaultInstance();
- FieldOptions::default_instance_->InitAsDefaultInstance();
- EnumOptions::default_instance_->InitAsDefaultInstance();
- EnumValueOptions::default_instance_->InitAsDefaultInstance();
- ServiceOptions::default_instance_->InitAsDefaultInstance();
- MethodOptions::default_instance_->InitAsDefaultInstance();
- UninterpretedOption::default_instance_->InitAsDefaultInstance();
- UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance();
+ FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ DescriptorProto_descriptor_, &DescriptorProto::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ FileOptions_descriptor_, &FileOptions::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ MessageOptions_descriptor_, &MessageOptions::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ FieldOptions_descriptor_, &FieldOptions::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ EnumOptions_descriptor_, &EnumOptions::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ EnumValueOptions_descriptor_, &EnumValueOptions::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ ServiceOptions_descriptor_, &ServiceOptions::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ MethodOptions_descriptor_, &MethodOptions::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ UninterpretedOption_descriptor_, &UninterpretedOption::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance());
}
-void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto() {
+} // namespace
+
+void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
static bool already_here = false;
if (already_here) return;
already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
- ::google::protobuf::DescriptorPool* pool =
- ::google::protobuf::DescriptorPool::internal_generated_pool();
- pool->InternalBuildGeneratedFile(
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n google/protobuf/descriptor.proto\022\017goog"
"le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
"\030\001 \003(\0132$.google.protobuf.FileDescriptorP"
@@ -509,48 +510,86 @@ void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto() {
"ptions\"\177\n\025MethodDescriptorProto\022\014\n\004name\030"
"\001 \001(\t\022\022\n\ninput_type\030\002 \001(\t\022\023\n\013output_type"
"\030\003 \001(\t\022/\n\007options\030\004 \001(\0132\036.google.protobu"
- "f.MethodOptions\"\253\002\n\013FileOptions\022\024\n\014java_"
+ "f.MethodOptions\"\247\002\n\013FileOptions\022\024\n\014java_"
"package\030\001 \001(\t\022\034\n\024java_outer_classname\030\010 "
"\001(\t\022\"\n\023java_multiple_files\030\n \001(\010:\005false\022"
- "J\n\014optimize_for\030\t \001(\0162).google.protobuf."
- "FileOptions.OptimizeMode:\tCODE_SIZE\022C\n\024u"
- "ninterpreted_option\030\347\007 \003(\0132$.google.prot"
- "obuf.UninterpretedOption\"(\n\014OptimizeMode"
- "\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020\002*\t\010\350\007\020\200\200\200\200\002\"\210\001"
- "\n\016MessageOptions\022&\n\027message_set_wire_for"
- "mat\030\001 \001(\010:\005false\022C\n\024uninterpreted_option"
- "\030\347\007 \003(\0132$.google.protobuf.UninterpretedO"
- "ption*\t\010\350\007\020\200\200\200\200\002\"\345\001\n\014FieldOptions\0222\n\005cty"
- "pe\030\001 \001(\0162#.google.protobuf.FieldOptions."
- "CType\022\016\n\006packed\030\002 \001(\010\022\034\n\024experimental_ma"
- "p_key\030\t \001(\t\022C\n\024uninterpreted_option\030\347\007 \003"
- "(\0132$.google.protobuf.UninterpretedOption"
- "\"#\n\005CType\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002*\t\010"
- "\350\007\020\200\200\200\200\002\"]\n\013EnumOptions\022C\n\024uninterpreted"
- "_option\030\347\007 \003(\0132$.google.protobuf.Uninter"
- "pretedOption*\t\010\350\007\020\200\200\200\200\002\"b\n\020EnumValueOpti"
- "ons\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goo"
- "gle.protobuf.UninterpretedOption*\t\010\350\007\020\200\200"
- "\200\200\002\"`\n\016ServiceOptions\022C\n\024uninterpreted_o"
+ "F\n\014optimize_for\030\t \001(\0162).google.protobuf."
+ "FileOptions.OptimizeMode:\005SPEED\022C\n\024unint"
+ "erpreted_option\030\347\007 \003(\0132$.google.protobuf"
+ ".UninterpretedOption\"(\n\014OptimizeMode\022\t\n\005"
+ "SPEED\020\001\022\r\n\tCODE_SIZE\020\002*\t\010\350\007\020\200\200\200\200\002\"\210\001\n\016Me"
+ "ssageOptions\022&\n\027message_set_wire_format\030"
+ "\001 \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 "
+ "\003(\0132$.google.protobuf.UninterpretedOptio"
+ "n*\t\010\350\007\020\200\200\200\200\002\"\200\002\n\014FieldOptions\0222\n\005ctype\030\001"
+ " \001(\0162#.google.protobuf.FieldOptions.CTyp"
+ "e\022\016\n\006packed\030\002 \001(\010\022\031\n\ndeprecated\030\003 \001(\010:\005f"
+ "alse\022\034\n\024experimental_map_key\030\t \001(\t\022C\n\024un"
+ "interpreted_option\030\347\007 \003(\0132$.google.proto"
+ "buf.UninterpretedOption\"#\n\005CType\022\010\n\004CORD"
+ "\020\001\022\020\n\014STRING_PIECE\020\002*\t\010\350\007\020\200\200\200\200\002\"]\n\013EnumO"
+ "ptions\022C\n\024uninterpreted_option\030\347\007 \003(\0132$."
+ "google.protobuf.UninterpretedOption*\t\010\350\007"
+ "\020\200\200\200\200\002\"b\n\020EnumValueOptions\022C\n\024uninterpre"
+ "ted_option\030\347\007 \003(\0132$.google.protobuf.Unin"
+ "terpretedOption*\t\010\350\007\020\200\200\200\200\002\"`\n\016ServiceOpt"
+ "ions\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.go"
+ "ogle.protobuf.UninterpretedOption*\t\010\350\007\020\200"
+ "\200\200\200\002\"_\n\rMethodOptions\022C\n\024uninterpreted_o"
"ption\030\347\007 \003(\0132$.google.protobuf.Uninterpr"
- "etedOption*\t\010\350\007\020\200\200\200\200\002\"_\n\rMethodOptions\022C"
- "\n\024uninterpreted_option\030\347\007 \003(\0132$.google.p"
- "rotobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\205"
- "\002\n\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-.g"
- "oogle.protobuf.UninterpretedOption.NameP"
- "art\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positiv"
- "e_int_value\030\004 \001(\004\022\032\n\022negative_int_value\030"
- "\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_va"
- "lue\030\007 \001(\014\0323\n\010NamePart\022\021\n\tname_part\030\001 \002(\t"
- "\022\024\n\014is_extension\030\002 \002(\010B)\n\023com.google.pro"
- "tobufB\020DescriptorProtosH\001", 3465,
- &protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors);
-}
-
-// Force BuildDescriptors() to be called at static initialization time.
+ "etedOption*\t\010\350\007\020\200\200\200\200\002\"\205\002\n\023UninterpretedO"
+ "ption\022;\n\004name\030\002 \003(\0132-.google.protobuf.Un"
+ "interpretedOption.NamePart\022\030\n\020identifier"
+ "_value\030\003 \001(\t\022\032\n\022positive_int_value\030\004 \001(\004"
+ "\022\032\n\022negative_int_value\030\005 \001(\003\022\024\n\014double_v"
+ "alue\030\006 \001(\001\022\024\n\014string_value\030\007 \001(\014\0323\n\010Name"
+ "Part\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030"
+ "\002 \002(\010B)\n\023com.google.protobufB\020Descriptor"
+ "ProtosH\001", 3488);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
+ FileDescriptorSet::default_instance_ = new FileDescriptorSet();
+ FileDescriptorProto::default_instance_ = new FileDescriptorProto();
+ DescriptorProto::default_instance_ = new DescriptorProto();
+ DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange();
+ FieldDescriptorProto::default_instance_ = new FieldDescriptorProto();
+ EnumDescriptorProto::default_instance_ = new EnumDescriptorProto();
+ EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto();
+ ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto();
+ MethodDescriptorProto::default_instance_ = new MethodDescriptorProto();
+ FileOptions::default_instance_ = new FileOptions();
+ MessageOptions::default_instance_ = new MessageOptions();
+ FieldOptions::default_instance_ = new FieldOptions();
+ EnumOptions::default_instance_ = new EnumOptions();
+ EnumValueOptions::default_instance_ = new EnumValueOptions();
+ ServiceOptions::default_instance_ = new ServiceOptions();
+ MethodOptions::default_instance_ = new MethodOptions();
+ UninterpretedOption::default_instance_ = new UninterpretedOption();
+ UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart();
+ FileDescriptorSet::default_instance_->InitAsDefaultInstance();
+ FileDescriptorProto::default_instance_->InitAsDefaultInstance();
+ DescriptorProto::default_instance_->InitAsDefaultInstance();
+ DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance();
+ FieldDescriptorProto::default_instance_->InitAsDefaultInstance();
+ EnumDescriptorProto::default_instance_->InitAsDefaultInstance();
+ EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance();
+ ServiceDescriptorProto::default_instance_->InitAsDefaultInstance();
+ MethodDescriptorProto::default_instance_->InitAsDefaultInstance();
+ FileOptions::default_instance_->InitAsDefaultInstance();
+ MessageOptions::default_instance_->InitAsDefaultInstance();
+ FieldOptions::default_instance_->InitAsDefaultInstance();
+ EnumOptions::default_instance_->InitAsDefaultInstance();
+ EnumValueOptions::default_instance_->InitAsDefaultInstance();
+ ServiceOptions::default_instance_->InitAsDefaultInstance();
+ MethodOptions::default_instance_->InitAsDefaultInstance();
+ UninterpretedOption::default_instance_->InitAsDefaultInstance();
+ UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance();
+}
+
+// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto {
StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() {
- protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
}
} static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_;
@@ -562,37 +601,39 @@ const int FileDescriptorSet::kFileFieldNumber;
#endif // !_MSC_VER
FileDescriptorSet::FileDescriptorSet()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- file_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void FileDescriptorSet::InitAsDefaultInstance() {}
FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- file_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void FileDescriptorSet::SharedCtor() {
+ _cached_size_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
FileDescriptorSet::~FileDescriptorSet() {
+ SharedDtor();
+}
+
+void FileDescriptorSet::SharedDtor() {
if (this != default_instance_) {
}
}
const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() {
- if (FileDescriptorSet_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FileDescriptorSet_descriptor_;
}
const FileDescriptorSet& FileDescriptorSet::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL;
@@ -643,20 +684,37 @@ bool FileDescriptorSet::MergePartialFromCodedStream(
#undef DO_
}
-bool FileDescriptorSet::SerializeWithCachedSizes(
+void FileDescriptorSet::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ FileDescriptorSet::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// repeated .google.protobuf.FileDescriptorProto file = 1;
for (int i = 0; i < this->file_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->file(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->file(i), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .google.protobuf.FileDescriptorProto file = 1;
+ for (int i = 0; i < this->file_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(1, this->file(i), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int FileDescriptorSet::ByteSize() const {
@@ -731,7 +789,7 @@ const ::google::protobuf::Descriptor* FileDescriptorSet::GetDescriptor() const {
}
const ::google::protobuf::Reflection* FileDescriptorSet::GetReflection() const {
- if (FileDescriptorSet_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FileDescriptorSet_reflection_;
}
@@ -751,40 +809,32 @@ const int FileDescriptorProto::kOptionsFieldNumber;
#endif // !_MSC_VER
FileDescriptorProto::FileDescriptorProto()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- package_(const_cast< ::std::string*>(&_default_package_)),
- dependency_(),
- message_type_(),
- enum_type_(),
- service_(),
- extension_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void FileDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance());
}
FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- package_(const_cast< ::std::string*>(&_default_package_)),
- dependency_(),
- message_type_(),
- enum_type_(),
- service_(),
- extension_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void FileDescriptorProto::SharedCtor() {
+ _cached_size_ = 0;
+ name_ = const_cast< ::std::string*>(&_default_name_);
+ package_ = const_cast< ::std::string*>(&_default_package_);
+ options_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
FileDescriptorProto::~FileDescriptorProto() {
+ SharedDtor();
+}
+
+void FileDescriptorProto::SharedDtor() {
if (name_ != &_default_name_) {
delete name_;
}
@@ -797,13 +847,12 @@ FileDescriptorProto::~FileDescriptorProto() {
}
const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() {
- if (FileDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FileDescriptorProto_descriptor_;
}
const FileDescriptorProto& FileDescriptorProto::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL;
@@ -965,55 +1014,107 @@ bool FileDescriptorProto::MergePartialFromCodedStream(
#undef DO_
}
-bool FileDescriptorProto::SerializeWithCachedSizes(
+void FileDescriptorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ FileDescriptorProto::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string name = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output);
}
// optional string package = 2;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(2, this->package(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(2, this->package(), output);
}
// repeated string dependency = 3;
for (int i = 0; i < this->dependency_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(3, this->dependency(i), output));
+ ::google::protobuf::internal::WireFormat::WriteString(3, this->dependency(i), output);
}
// repeated .google.protobuf.DescriptorProto message_type = 4;
for (int i = 0; i < this->message_type_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->message_type(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->message_type(i), output);
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
for (int i = 0; i < this->enum_type_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(5, this->enum_type(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(5, this->enum_type(i), output);
}
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
for (int i = 0; i < this->service_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(6, this->service(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(6, this->service(i), output);
}
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
for (int i = 0; i < this->extension_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(7, this->extension(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(7, this->extension(i), output);
}
// optional .google.protobuf.FileOptions options = 8;
if (_has_bit(7)) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(8, this->options(), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(8, this->options(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string name = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name(), target);
+ }
+
+ // optional string package = 2;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(2, this->package(), target);
+ }
+
+ // repeated string dependency = 3;
+ for (int i = 0; i < this->dependency_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(3, this->dependency(i), target);
+ }
+
+ // repeated .google.protobuf.DescriptorProto message_type = 4;
+ for (int i = 0; i < this->message_type_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(4, this->message_type(i), target);
+ }
+
+ // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+ for (int i = 0; i < this->enum_type_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(5, this->enum_type(i), target);
+ }
+
+ // repeated .google.protobuf.ServiceDescriptorProto service = 6;
+ for (int i = 0; i < this->service_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(6, this->service(i), target);
+ }
+
+ // repeated .google.protobuf.FieldDescriptorProto extension = 7;
+ for (int i = 0; i < this->extension_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(7, this->extension(i), target);
+ }
+
+ // optional .google.protobuf.FileOptions options = 8;
+ if (_has_bit(7)) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(8, this->options(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int FileDescriptorProto::ByteSize() const {
@@ -1174,7 +1275,7 @@ const ::google::protobuf::Descriptor* FileDescriptorProto::GetDescriptor() const
}
const ::google::protobuf::Reflection* FileDescriptorProto::GetReflection() const {
- if (FileDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FileDescriptorProto_reflection_;
}
@@ -1186,39 +1287,41 @@ const int DescriptorProto_ExtensionRange::kEndFieldNumber;
#endif // !_MSC_VER
DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- start_(0),
- end_(0) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void DescriptorProto_ExtensionRange::InitAsDefaultInstance() {}
DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- start_(0),
- end_(0) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void DescriptorProto_ExtensionRange::SharedCtor() {
+ _cached_size_ = 0;
+ start_ = 0;
+ end_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
+ SharedDtor();
+}
+
+void DescriptorProto_ExtensionRange::SharedDtor() {
if (this != default_instance_) {
}
}
const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() {
- if (DescriptorProto_ExtensionRange_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return DescriptorProto_ExtensionRange_descriptor_;
}
const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL;
@@ -1285,25 +1388,47 @@ bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream(
#undef DO_
}
-bool DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
+void DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional int32 start = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteInt32(1, this->start(), output));
+ ::google::protobuf::internal::WireFormat::WriteInt32(1, this->start(), output);
}
// optional int32 end = 2;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteInt32(2, this->end(), output));
+ ::google::protobuf::internal::WireFormat::WriteInt32(2, this->end(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 start = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->start(), target);
+ }
+
+ // optional int32 end = 2;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(2, this->end(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int DescriptorProto_ExtensionRange::ByteSize() const {
@@ -1391,7 +1516,7 @@ const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::GetDescrip
}
const ::google::protobuf::Reflection* DescriptorProto_ExtensionRange::GetReflection() const {
- if (DescriptorProto_ExtensionRange_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return DescriptorProto_ExtensionRange_reflection_;
}
@@ -1409,38 +1534,31 @@ const int DescriptorProto::kOptionsFieldNumber;
#endif // !_MSC_VER
DescriptorProto::DescriptorProto()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- field_(),
- extension_(),
- nested_type_(),
- enum_type_(),
- extension_range_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void DescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance());
}
DescriptorProto::DescriptorProto(const DescriptorProto& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- field_(),
- extension_(),
- nested_type_(),
- enum_type_(),
- extension_range_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void DescriptorProto::SharedCtor() {
+ _cached_size_ = 0;
+ name_ = const_cast< ::std::string*>(&_default_name_);
+ options_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
DescriptorProto::~DescriptorProto() {
+ SharedDtor();
+}
+
+void DescriptorProto::SharedDtor() {
if (name_ != &_default_name_) {
delete name_;
}
@@ -1450,13 +1568,12 @@ DescriptorProto::~DescriptorProto() {
}
const ::google::protobuf::Descriptor* DescriptorProto::descriptor() {
- if (DescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return DescriptorProto_descriptor_;
}
const DescriptorProto& DescriptorProto::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
DescriptorProto* DescriptorProto::default_instance_ = NULL;
@@ -1601,50 +1718,97 @@ bool DescriptorProto::MergePartialFromCodedStream(
#undef DO_
}
-bool DescriptorProto::SerializeWithCachedSizes(
+void DescriptorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ DescriptorProto::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string name = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output);
}
// repeated .google.protobuf.FieldDescriptorProto field = 2;
for (int i = 0; i < this->field_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->field(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->field(i), output);
}
// repeated .google.protobuf.DescriptorProto nested_type = 3;
for (int i = 0; i < this->nested_type_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->nested_type(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->nested_type(i), output);
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
for (int i = 0; i < this->enum_type_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->enum_type(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->enum_type(i), output);
}
// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
for (int i = 0; i < this->extension_range_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(5, this->extension_range(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(5, this->extension_range(i), output);
}
// repeated .google.protobuf.FieldDescriptorProto extension = 6;
for (int i = 0; i < this->extension_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(6, this->extension(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(6, this->extension(i), output);
}
// optional .google.protobuf.MessageOptions options = 7;
if (_has_bit(6)) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(7, this->options(), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(7, this->options(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string name = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name(), target);
+ }
+
+ // repeated .google.protobuf.FieldDescriptorProto field = 2;
+ for (int i = 0; i < this->field_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(2, this->field(i), target);
+ }
+
+ // repeated .google.protobuf.DescriptorProto nested_type = 3;
+ for (int i = 0; i < this->nested_type_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(3, this->nested_type(i), target);
+ }
+
+ // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+ for (int i = 0; i < this->enum_type_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(4, this->enum_type(i), target);
+ }
+
+ // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+ for (int i = 0; i < this->extension_range_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(5, this->extension_range(i), target);
+ }
+
+ // repeated .google.protobuf.FieldDescriptorProto extension = 6;
+ for (int i = 0; i < this->extension_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(6, this->extension(i), target);
+ }
+
+ // optional .google.protobuf.MessageOptions options = 7;
+ if (_has_bit(6)) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(7, this->options(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int DescriptorProto::ByteSize() const {
@@ -1796,14 +1960,14 @@ const ::google::protobuf::Descriptor* DescriptorProto::GetDescriptor() const {
}
const ::google::protobuf::Reflection* DescriptorProto::GetReflection() const {
- if (DescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return DescriptorProto_reflection_;
}
// ===================================================================
const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() {
- if (FieldDescriptorProto_Type_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FieldDescriptorProto_Type_descriptor_;
}
bool FieldDescriptorProto_Type_IsValid(int value) {
@@ -1855,7 +2019,7 @@ const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
#endif // _MSC_VER
const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
- if (FieldDescriptorProto_Label_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FieldDescriptorProto_Label_descriptor_;
}
bool FieldDescriptorProto_Label_IsValid(int value) {
@@ -1892,40 +2056,37 @@ const int FieldDescriptorProto::kOptionsFieldNumber;
#endif // !_MSC_VER
FieldDescriptorProto::FieldDescriptorProto()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- number_(0),
- label_(1),
- type_(1),
- type_name_(const_cast< ::std::string*>(&_default_type_name_)),
- extendee_(const_cast< ::std::string*>(&_default_extendee_)),
- default_value_(const_cast< ::std::string*>(&_default_default_value_)),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void FieldDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance());
}
FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- number_(0),
- label_(1),
- type_(1),
- type_name_(const_cast< ::std::string*>(&_default_type_name_)),
- extendee_(const_cast< ::std::string*>(&_default_extendee_)),
- default_value_(const_cast< ::std::string*>(&_default_default_value_)),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void FieldDescriptorProto::SharedCtor() {
+ _cached_size_ = 0;
+ name_ = const_cast< ::std::string*>(&_default_name_);
+ number_ = 0;
+ label_ = 1;
+ type_ = 1;
+ type_name_ = const_cast< ::std::string*>(&_default_type_name_);
+ extendee_ = const_cast< ::std::string*>(&_default_extendee_);
+ default_value_ = const_cast< ::std::string*>(&_default_default_value_);
+ options_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
FieldDescriptorProto::~FieldDescriptorProto() {
+ SharedDtor();
+}
+
+void FieldDescriptorProto::SharedDtor() {
if (name_ != &_default_name_) {
delete name_;
}
@@ -1944,13 +2105,12 @@ FieldDescriptorProto::~FieldDescriptorProto() {
}
const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() {
- if (FieldDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FieldDescriptorProto_descriptor_;
}
const FieldDescriptorProto& FieldDescriptorProto::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL;
@@ -2047,7 +2207,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream(
if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) {
set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value));
} else {
- mutable_unknown_fields()->AddField(4)->add_varint(value);
+ mutable_unknown_fields()->AddVarint(4, value);
}
if (input->ExpectTag(40)) goto parse_type;
break;
@@ -2065,7 +2225,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream(
if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) {
set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value));
} else {
- mutable_unknown_fields()->AddField(5)->add_varint(value);
+ mutable_unknown_fields()->AddVarint(5, value);
}
if (input->ExpectTag(50)) goto parse_type_name;
break;
@@ -2124,55 +2284,107 @@ bool FieldDescriptorProto::MergePartialFromCodedStream(
#undef DO_
}
-bool FieldDescriptorProto::SerializeWithCachedSizes(
+void FieldDescriptorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ FieldDescriptorProto::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string name = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output);
}
// optional string extendee = 2;
if (_has_bit(5)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(2, this->extendee(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(2, this->extendee(), output);
}
// optional int32 number = 3;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteInt32(3, this->number(), output));
+ ::google::protobuf::internal::WireFormat::WriteInt32(3, this->number(), output);
}
// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteEnum(4, this->label(), output));
+ ::google::protobuf::internal::WireFormat::WriteEnum(4, this->label(), output);
}
// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
if (_has_bit(3)) {
- DO_(::google::protobuf::internal::WireFormat::WriteEnum(5, this->type(), output));
+ ::google::protobuf::internal::WireFormat::WriteEnum(5, this->type(), output);
}
// optional string type_name = 6;
if (_has_bit(4)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(6, this->type_name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(6, this->type_name(), output);
}
// optional string default_value = 7;
if (_has_bit(6)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(7, this->default_value(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(7, this->default_value(), output);
}
// optional .google.protobuf.FieldOptions options = 8;
if (_has_bit(7)) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(8, this->options(), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(8, this->options(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string name = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name(), target);
+ }
+
+ // optional string extendee = 2;
+ if (_has_bit(5)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(2, this->extendee(), target);
+ }
+
+ // optional int32 number = 3;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(3, this->number(), target);
+ }
+
+ // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(4, this->label(), target);
+ }
+
+ // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+ if (_has_bit(3)) {
+ target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(5, this->type(), target);
+ }
+
+ // optional string type_name = 6;
+ if (_has_bit(4)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(6, this->type_name(), target);
+ }
+
+ // optional string default_value = 7;
+ if (_has_bit(6)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(7, this->default_value(), target);
+ }
+
+ // optional .google.protobuf.FieldOptions options = 8;
+ if (_has_bit(7)) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(8, this->options(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int FieldDescriptorProto::ByteSize() const {
@@ -2323,7 +2535,7 @@ const ::google::protobuf::Descriptor* FieldDescriptorProto::GetDescriptor() cons
}
const ::google::protobuf::Reflection* FieldDescriptorProto::GetReflection() const {
- if (FieldDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FieldDescriptorProto_reflection_;
}
@@ -2337,30 +2549,31 @@ const int EnumDescriptorProto::kOptionsFieldNumber;
#endif // !_MSC_VER
EnumDescriptorProto::EnumDescriptorProto()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- value_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void EnumDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance());
}
EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- value_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void EnumDescriptorProto::SharedCtor() {
+ _cached_size_ = 0;
+ name_ = const_cast< ::std::string*>(&_default_name_);
+ options_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
EnumDescriptorProto::~EnumDescriptorProto() {
+ SharedDtor();
+}
+
+void EnumDescriptorProto::SharedDtor() {
if (name_ != &_default_name_) {
delete name_;
}
@@ -2370,13 +2583,12 @@ EnumDescriptorProto::~EnumDescriptorProto() {
}
const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() {
- if (EnumDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumDescriptorProto_descriptor_;
}
const EnumDescriptorProto& EnumDescriptorProto::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL;
@@ -2461,30 +2673,57 @@ bool EnumDescriptorProto::MergePartialFromCodedStream(
#undef DO_
}
-bool EnumDescriptorProto::SerializeWithCachedSizes(
+void EnumDescriptorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ EnumDescriptorProto::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string name = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output);
}
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
for (int i = 0; i < this->value_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->value(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->value(i), output);
}
// optional .google.protobuf.EnumOptions options = 3;
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string name = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name(), target);
+ }
+
+ // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+ for (int i = 0; i < this->value_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(2, this->value(i), target);
+ }
+
+ // optional .google.protobuf.EnumOptions options = 3;
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(3, this->options(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int EnumDescriptorProto::ByteSize() const {
@@ -2587,7 +2826,7 @@ const ::google::protobuf::Descriptor* EnumDescriptorProto::GetDescriptor() const
}
const ::google::protobuf::Reflection* EnumDescriptorProto::GetReflection() const {
- if (EnumDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumDescriptorProto_reflection_;
}
@@ -2601,30 +2840,32 @@ const int EnumValueDescriptorProto::kOptionsFieldNumber;
#endif // !_MSC_VER
EnumValueDescriptorProto::EnumValueDescriptorProto()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- number_(0),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void EnumValueDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance());
}
EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- number_(0),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void EnumValueDescriptorProto::SharedCtor() {
+ _cached_size_ = 0;
+ name_ = const_cast< ::std::string*>(&_default_name_);
+ number_ = 0;
+ options_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
EnumValueDescriptorProto::~EnumValueDescriptorProto() {
+ SharedDtor();
+}
+
+void EnumValueDescriptorProto::SharedDtor() {
if (name_ != &_default_name_) {
delete name_;
}
@@ -2634,13 +2875,12 @@ EnumValueDescriptorProto::~EnumValueDescriptorProto() {
}
const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() {
- if (EnumValueDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumValueDescriptorProto_descriptor_;
}
const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL;
@@ -2725,30 +2965,57 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream(
#undef DO_
}
-bool EnumValueDescriptorProto::SerializeWithCachedSizes(
+void EnumValueDescriptorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ EnumValueDescriptorProto::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string name = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output);
}
// optional int32 number = 2;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteInt32(2, this->number(), output));
+ ::google::protobuf::internal::WireFormat::WriteInt32(2, this->number(), output);
}
// optional .google.protobuf.EnumValueOptions options = 3;
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string name = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name(), target);
+ }
+
+ // optional int32 number = 2;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(2, this->number(), target);
+ }
+
+ // optional .google.protobuf.EnumValueOptions options = 3;
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(3, this->options(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int EnumValueDescriptorProto::ByteSize() const {
@@ -2849,7 +3116,7 @@ const ::google::protobuf::Descriptor* EnumValueDescriptorProto::GetDescriptor()
}
const ::google::protobuf::Reflection* EnumValueDescriptorProto::GetReflection() const {
- if (EnumValueDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumValueDescriptorProto_reflection_;
}
@@ -2863,30 +3130,31 @@ const int ServiceDescriptorProto::kOptionsFieldNumber;
#endif // !_MSC_VER
ServiceDescriptorProto::ServiceDescriptorProto()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- method_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void ServiceDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance());
}
ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- method_(),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void ServiceDescriptorProto::SharedCtor() {
+ _cached_size_ = 0;
+ name_ = const_cast< ::std::string*>(&_default_name_);
+ options_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
ServiceDescriptorProto::~ServiceDescriptorProto() {
+ SharedDtor();
+}
+
+void ServiceDescriptorProto::SharedDtor() {
if (name_ != &_default_name_) {
delete name_;
}
@@ -2896,13 +3164,12 @@ ServiceDescriptorProto::~ServiceDescriptorProto() {
}
const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() {
- if (ServiceDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return ServiceDescriptorProto_descriptor_;
}
const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL;
@@ -2987,30 +3254,57 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream(
#undef DO_
}
-bool ServiceDescriptorProto::SerializeWithCachedSizes(
+void ServiceDescriptorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ ServiceDescriptorProto::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string name = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output);
}
// repeated .google.protobuf.MethodDescriptorProto method = 2;
for (int i = 0; i < this->method_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->method(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->method(i), output);
}
// optional .google.protobuf.ServiceOptions options = 3;
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string name = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name(), target);
+ }
+
+ // repeated .google.protobuf.MethodDescriptorProto method = 2;
+ for (int i = 0; i < this->method_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(2, this->method(i), target);
+ }
+
+ // optional .google.protobuf.ServiceOptions options = 3;
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(3, this->options(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int ServiceDescriptorProto::ByteSize() const {
@@ -3113,7 +3407,7 @@ const ::google::protobuf::Descriptor* ServiceDescriptorProto::GetDescriptor() co
}
const ::google::protobuf::Reflection* ServiceDescriptorProto::GetReflection() const {
- if (ServiceDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return ServiceDescriptorProto_reflection_;
}
@@ -3130,32 +3424,33 @@ const int MethodDescriptorProto::kOptionsFieldNumber;
#endif // !_MSC_VER
MethodDescriptorProto::MethodDescriptorProto()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- input_type_(const_cast< ::std::string*>(&_default_input_type_)),
- output_type_(const_cast< ::std::string*>(&_default_output_type_)),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void MethodDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance());
}
MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(const_cast< ::std::string*>(&_default_name_)),
- input_type_(const_cast< ::std::string*>(&_default_input_type_)),
- output_type_(const_cast< ::std::string*>(&_default_output_type_)),
- options_(NULL) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void MethodDescriptorProto::SharedCtor() {
+ _cached_size_ = 0;
+ name_ = const_cast< ::std::string*>(&_default_name_);
+ input_type_ = const_cast< ::std::string*>(&_default_input_type_);
+ output_type_ = const_cast< ::std::string*>(&_default_output_type_);
+ options_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
MethodDescriptorProto::~MethodDescriptorProto() {
+ SharedDtor();
+}
+
+void MethodDescriptorProto::SharedDtor() {
if (name_ != &_default_name_) {
delete name_;
}
@@ -3171,13 +3466,12 @@ MethodDescriptorProto::~MethodDescriptorProto() {
}
const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() {
- if (MethodDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return MethodDescriptorProto_descriptor_;
}
const MethodDescriptorProto& MethodDescriptorProto::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL;
@@ -3281,35 +3575,67 @@ bool MethodDescriptorProto::MergePartialFromCodedStream(
#undef DO_
}
-bool MethodDescriptorProto::SerializeWithCachedSizes(
+void MethodDescriptorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ MethodDescriptorProto::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string name = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output);
}
// optional string input_type = 2;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(2, this->input_type(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(2, this->input_type(), output);
}
// optional string output_type = 3;
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(3, this->output_type(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(3, this->output_type(), output);
}
// optional .google.protobuf.MethodOptions options = 4;
if (_has_bit(3)) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->options(), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->options(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string name = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name(), target);
+ }
+
+ // optional string input_type = 2;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(2, this->input_type(), target);
+ }
+
+ // optional string output_type = 3;
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(3, this->output_type(), target);
+ }
+
+ // optional .google.protobuf.MethodOptions options = 4;
+ if (_has_bit(3)) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(4, this->options(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int MethodDescriptorProto::ByteSize() const {
@@ -3419,14 +3745,14 @@ const ::google::protobuf::Descriptor* MethodDescriptorProto::GetDescriptor() con
}
const ::google::protobuf::Reflection* MethodDescriptorProto::GetReflection() const {
- if (MethodDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return MethodDescriptorProto_reflection_;
}
// ===================================================================
const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
- if (FileOptions_OptimizeMode_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FileOptions_OptimizeMode_descriptor_;
}
bool FileOptions_OptimizeMode_IsValid(int value) {
@@ -3456,39 +3782,32 @@ const int FileOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
FileOptions::FileOptions()
- : ::google::protobuf::Message(),
- _extensions_(&FileOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- java_package_(const_cast< ::std::string*>(&_default_java_package_)),
- java_outer_classname_(const_cast< ::std::string*>(&_default_java_outer_classname_)),
- java_multiple_files_(false),
- optimize_for_(2),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void FileOptions::InitAsDefaultInstance() {}
FileOptions::FileOptions(const FileOptions& from)
- : ::google::protobuf::Message(),
- _extensions_(&FileOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- java_package_(const_cast< ::std::string*>(&_default_java_package_)),
- java_outer_classname_(const_cast< ::std::string*>(&_default_java_outer_classname_)),
- java_multiple_files_(false),
- optimize_for_(2),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void FileOptions::SharedCtor() {
+ _cached_size_ = 0;
+ java_package_ = const_cast< ::std::string*>(&_default_java_package_);
+ java_outer_classname_ = const_cast< ::std::string*>(&_default_java_outer_classname_);
+ java_multiple_files_ = false;
+ optimize_for_ = 1;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
FileOptions::~FileOptions() {
+ SharedDtor();
+}
+
+void FileOptions::SharedDtor() {
if (java_package_ != &_default_java_package_) {
delete java_package_;
}
@@ -3500,13 +3819,12 @@ FileOptions::~FileOptions() {
}
const ::google::protobuf::Descriptor* FileOptions::descriptor() {
- if (FileOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FileOptions_descriptor_;
}
const FileOptions& FileOptions::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
FileOptions* FileOptions::default_instance_ = NULL;
@@ -3529,7 +3847,7 @@ void FileOptions::Clear() {
}
}
java_multiple_files_ = false;
- optimize_for_ = 2;
+ optimize_for_ = 1;
}
uninterpreted_option_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
@@ -3565,7 +3883,7 @@ bool FileOptions::MergePartialFromCodedStream(
break;
}
- // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
+ // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
case 9: {
if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
@@ -3577,7 +3895,7 @@ bool FileOptions::MergePartialFromCodedStream(
if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) {
set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value));
} else {
- mutable_unknown_fields()->AddField(9)->add_varint(value);
+ mutable_unknown_fields()->AddVarint(9, value);
}
if (input->ExpectTag(80)) goto parse_java_multiple_files;
break;
@@ -3618,7 +3936,8 @@ bool FileOptions::MergePartialFromCodedStream(
return true;
}
if ((8000u <= tag)) {
- DO_(_extensions_.ParseField(tag, input, this));
+ DO_(_extensions_.ParseField(tag, input, default_instance_,
+ mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
@@ -3631,44 +3950,85 @@ bool FileOptions::MergePartialFromCodedStream(
#undef DO_
}
-bool FileOptions::SerializeWithCachedSizes(
+void FileOptions::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ FileOptions::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional string java_package = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->java_package(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->java_package(), output);
}
// optional string java_outer_classname = 8;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(8, this->java_outer_classname(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(8, this->java_outer_classname(), output);
}
- // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
+ // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
if (_has_bit(3)) {
- DO_(::google::protobuf::internal::WireFormat::WriteEnum(9, this->optimize_for(), output));
+ ::google::protobuf::internal::WireFormat::WriteEnum(9, this->optimize_for(), output);
}
// optional bool java_multiple_files = 10 [default = false];
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteBool(10, this->java_multiple_files(), output));
+ ::google::protobuf::internal::WireFormat::WriteBool(10, this->java_multiple_files(), output);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (int i = 0; i < this->uninterpreted_option_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output);
}
// Extension range [1000, 536870912)
- DO_(_extensions_.SerializeWithCachedSizes(
- 1000, 536870912, *this, output));
+ _extensions_.SerializeWithCachedSizes(
+ 1000, 536870912, output);
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string java_package = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->java_package(), target);
+ }
+
+ // optional string java_outer_classname = 8;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(8, this->java_outer_classname(), target);
+ }
+
+ // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
+ if (_has_bit(3)) {
+ target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(9, this->optimize_for(), target);
+ }
+
+ // optional bool java_multiple_files = 10 [default = false];
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(10, this->java_multiple_files(), target);
+ }
+
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (int i = 0; i < this->uninterpreted_option_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(999, this->uninterpreted_option(i), target);
+ }
+
+ // Extension range [1000, 536870912)
+ target = _extensions_.SerializeWithCachedSizesToArray(
+ 1000, 536870912, target);
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int FileOptions::ByteSize() const {
@@ -3692,7 +4052,7 @@ int FileOptions::ByteSize() const {
total_size += 1 + 1;
}
- // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
+ // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
if (has_optimize_for()) {
total_size += 1 +
::google::protobuf::internal::WireFormat::EnumSize(this->optimize_for());
@@ -3707,7 +4067,7 @@ int FileOptions::ByteSize() const {
this->uninterpreted_option(i));
}
- total_size += _extensions_.ByteSize(*this);
+ total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
@@ -3791,7 +4151,7 @@ const ::google::protobuf::Descriptor* FileOptions::GetDescriptor() const {
}
const ::google::protobuf::Reflection* FileOptions::GetReflection() const {
- if (FileOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FileOptions_reflection_;
}
@@ -3803,45 +4163,40 @@ const int MessageOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
MessageOptions::MessageOptions()
- : ::google::protobuf::Message(),
- _extensions_(&MessageOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- message_set_wire_format_(false),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void MessageOptions::InitAsDefaultInstance() {}
MessageOptions::MessageOptions(const MessageOptions& from)
- : ::google::protobuf::Message(),
- _extensions_(&MessageOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- message_set_wire_format_(false),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void MessageOptions::SharedCtor() {
+ _cached_size_ = 0;
+ message_set_wire_format_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
MessageOptions::~MessageOptions() {
+ SharedDtor();
+}
+
+void MessageOptions::SharedDtor() {
if (this != default_instance_) {
}
}
const ::google::protobuf::Descriptor* MessageOptions::descriptor() {
- if (MessageOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return MessageOptions_descriptor_;
}
const MessageOptions& MessageOptions::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
MessageOptions* MessageOptions::default_instance_ = NULL;
@@ -3900,7 +4255,8 @@ bool MessageOptions::MergePartialFromCodedStream(
return true;
}
if ((8000u <= tag)) {
- DO_(_extensions_.ParseField(tag, input, this));
+ DO_(_extensions_.ParseField(tag, input, default_instance_,
+ mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
@@ -3913,29 +4269,55 @@ bool MessageOptions::MergePartialFromCodedStream(
#undef DO_
}
-bool MessageOptions::SerializeWithCachedSizes(
+void MessageOptions::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ MessageOptions::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional bool message_set_wire_format = 1 [default = false];
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteBool(1, this->message_set_wire_format(), output));
+ ::google::protobuf::internal::WireFormat::WriteBool(1, this->message_set_wire_format(), output);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (int i = 0; i < this->uninterpreted_option_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output);
}
// Extension range [1000, 536870912)
- DO_(_extensions_.SerializeWithCachedSizes(
- 1000, 536870912, *this, output));
+ _extensions_.SerializeWithCachedSizes(
+ 1000, 536870912, output);
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional bool message_set_wire_format = 1 [default = false];
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(1, this->message_set_wire_format(), target);
+ }
+
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (int i = 0; i < this->uninterpreted_option_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(999, this->uninterpreted_option(i), target);
+ }
+
+ // Extension range [1000, 536870912)
+ target = _extensions_.SerializeWithCachedSizesToArray(
+ 1000, 536870912, target);
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int MessageOptions::ByteSize() const {
@@ -3956,7 +4338,7 @@ int MessageOptions::ByteSize() const {
this->uninterpreted_option(i));
}
- total_size += _extensions_.ByteSize(*this);
+ total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
@@ -4028,14 +4410,14 @@ const ::google::protobuf::Descriptor* MessageOptions::GetDescriptor() const {
}
const ::google::protobuf::Reflection* MessageOptions::GetReflection() const {
- if (MessageOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return MessageOptions_reflection_;
}
// ===================================================================
const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() {
- if (FieldOptions_CType_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FieldOptions_CType_descriptor_;
}
bool FieldOptions_CType_IsValid(int value) {
@@ -4058,42 +4440,38 @@ const ::std::string FieldOptions::_default_experimental_map_key_;
#ifndef _MSC_VER
const int FieldOptions::kCtypeFieldNumber;
const int FieldOptions::kPackedFieldNumber;
+const int FieldOptions::kDeprecatedFieldNumber;
const int FieldOptions::kExperimentalMapKeyFieldNumber;
const int FieldOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
FieldOptions::FieldOptions()
- : ::google::protobuf::Message(),
- _extensions_(&FieldOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- ctype_(1),
- packed_(false),
- experimental_map_key_(const_cast< ::std::string*>(&_default_experimental_map_key_)),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void FieldOptions::InitAsDefaultInstance() {}
FieldOptions::FieldOptions(const FieldOptions& from)
- : ::google::protobuf::Message(),
- _extensions_(&FieldOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- ctype_(1),
- packed_(false),
- experimental_map_key_(const_cast< ::std::string*>(&_default_experimental_map_key_)),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void FieldOptions::SharedCtor() {
+ _cached_size_ = 0;
+ ctype_ = 1;
+ packed_ = false;
+ deprecated_ = false;
+ experimental_map_key_ = const_cast< ::std::string*>(&_default_experimental_map_key_);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
FieldOptions::~FieldOptions() {
+ SharedDtor();
+}
+
+void FieldOptions::SharedDtor() {
if (experimental_map_key_ != &_default_experimental_map_key_) {
delete experimental_map_key_;
}
@@ -4102,13 +4480,12 @@ FieldOptions::~FieldOptions() {
}
const ::google::protobuf::Descriptor* FieldOptions::descriptor() {
- if (FieldOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FieldOptions_descriptor_;
}
const FieldOptions& FieldOptions::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
FieldOptions* FieldOptions::default_instance_ = NULL;
@@ -4122,7 +4499,8 @@ void FieldOptions::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
ctype_ = 1;
packed_ = false;
- if (_has_bit(2)) {
+ deprecated_ = false;
+ if (_has_bit(3)) {
if (experimental_map_key_ != &_default_experimental_map_key_) {
experimental_map_key_->clear();
}
@@ -4150,7 +4528,7 @@ bool FieldOptions::MergePartialFromCodedStream(
if (::google::protobuf::FieldOptions_CType_IsValid(value)) {
set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value));
} else {
- mutable_unknown_fields()->AddField(1)->add_varint(value);
+ mutable_unknown_fields()->AddVarint(1, value);
}
if (input->ExpectTag(16)) goto parse_packed;
break;
@@ -4166,6 +4544,20 @@ bool FieldOptions::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormat::ReadBool(
input, &packed_));
_set_bit(1);
+ if (input->ExpectTag(24)) goto parse_deprecated;
+ break;
+ }
+
+ // optional bool deprecated = 3 [default = false];
+ case 3: {
+ if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
+ ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
+ goto handle_uninterpreted;
+ }
+ parse_deprecated:
+ DO_(::google::protobuf::internal::WireFormat::ReadBool(
+ input, &deprecated_));
+ _set_bit(2);
if (input->ExpectTag(74)) goto parse_experimental_map_key;
break;
}
@@ -4203,7 +4595,8 @@ bool FieldOptions::MergePartialFromCodedStream(
return true;
}
if ((8000u <= tag)) {
- DO_(_extensions_.ParseField(tag, input, this));
+ DO_(_extensions_.ParseField(tag, input, default_instance_,
+ mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
@@ -4216,39 +4609,85 @@ bool FieldOptions::MergePartialFromCodedStream(
#undef DO_
}
-bool FieldOptions::SerializeWithCachedSizes(
+void FieldOptions::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ FieldOptions::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// optional .google.protobuf.FieldOptions.CType ctype = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteEnum(1, this->ctype(), output));
+ ::google::protobuf::internal::WireFormat::WriteEnum(1, this->ctype(), output);
}
// optional bool packed = 2;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteBool(2, this->packed(), output));
+ ::google::protobuf::internal::WireFormat::WriteBool(2, this->packed(), output);
+ }
+
+ // optional bool deprecated = 3 [default = false];
+ if (_has_bit(2)) {
+ ::google::protobuf::internal::WireFormat::WriteBool(3, this->deprecated(), output);
}
// optional string experimental_map_key = 9;
+ if (_has_bit(3)) {
+ ::google::protobuf::internal::WireFormat::WriteString(9, this->experimental_map_key(), output);
+ }
+
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (int i = 0; i < this->uninterpreted_option_size(); i++) {
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output);
+ }
+
+ // Extension range [1000, 536870912)
+ _extensions_.SerializeWithCachedSizes(
+ 1000, 536870912, output);
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .google.protobuf.FieldOptions.CType ctype = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(1, this->ctype(), target);
+ }
+
+ // optional bool packed = 2;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(2, this->packed(), target);
+ }
+
+ // optional bool deprecated = 3 [default = false];
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(9, this->experimental_map_key(), output));
+ target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(3, this->deprecated(), target);
+ }
+
+ // optional string experimental_map_key = 9;
+ if (_has_bit(3)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(9, this->experimental_map_key(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (int i = 0; i < this->uninterpreted_option_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(999, this->uninterpreted_option(i), target);
}
// Extension range [1000, 536870912)
- DO_(_extensions_.SerializeWithCachedSizes(
- 1000, 536870912, *this, output));
+ target = _extensions_.SerializeWithCachedSizesToArray(
+ 1000, 536870912, target);
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
}
- return true;
-#undef DO_
+ return target;
}
int FieldOptions::ByteSize() const {
@@ -4266,6 +4705,11 @@ int FieldOptions::ByteSize() const {
total_size += 1 + 1;
}
+ // optional bool deprecated = 3 [default = false];
+ if (has_deprecated()) {
+ total_size += 1 + 1;
+ }
+
// optional string experimental_map_key = 9;
if (has_experimental_map_key()) {
total_size += 1 +
@@ -4281,7 +4725,7 @@ int FieldOptions::ByteSize() const {
this->uninterpreted_option(i));
}
- total_size += _extensions_.ByteSize(*this);
+ total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
@@ -4315,6 +4759,9 @@ void FieldOptions::MergeFrom(const FieldOptions& from) {
set_packed(from.packed());
}
if (from._has_bit(2)) {
+ set_deprecated(from.deprecated());
+ }
+ if (from._has_bit(3)) {
set_experimental_map_key(from.experimental_map_key());
}
}
@@ -4338,6 +4785,7 @@ void FieldOptions::Swap(FieldOptions* other) {
if (other != this) {
std::swap(ctype_, other->ctype_);
std::swap(packed_, other->packed_);
+ std::swap(deprecated_, other->deprecated_);
std::swap(experimental_map_key_, other->experimental_map_key_);
uninterpreted_option_.Swap(&other->uninterpreted_option_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
@@ -4361,7 +4809,7 @@ const ::google::protobuf::Descriptor* FieldOptions::GetDescriptor() const {
}
const ::google::protobuf::Reflection* FieldOptions::GetReflection() const {
- if (FieldOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return FieldOptions_reflection_;
}
@@ -4372,43 +4820,39 @@ const int EnumOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
EnumOptions::EnumOptions()
- : ::google::protobuf::Message(),
- _extensions_(&EnumOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void EnumOptions::InitAsDefaultInstance() {}
EnumOptions::EnumOptions(const EnumOptions& from)
- : ::google::protobuf::Message(),
- _extensions_(&EnumOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void EnumOptions::SharedCtor() {
+ _cached_size_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
EnumOptions::~EnumOptions() {
+ SharedDtor();
+}
+
+void EnumOptions::SharedDtor() {
if (this != default_instance_) {
}
}
const ::google::protobuf::Descriptor* EnumOptions::descriptor() {
- if (EnumOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumOptions_descriptor_;
}
const EnumOptions& EnumOptions::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
EnumOptions* EnumOptions::default_instance_ = NULL;
@@ -4451,7 +4895,8 @@ bool EnumOptions::MergePartialFromCodedStream(
return true;
}
if ((8000u <= tag)) {
- DO_(_extensions_.ParseField(tag, input, this));
+ DO_(_extensions_.ParseField(tag, input, default_instance_,
+ mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
@@ -4464,24 +4909,45 @@ bool EnumOptions::MergePartialFromCodedStream(
#undef DO_
}
-bool EnumOptions::SerializeWithCachedSizes(
+void EnumOptions::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ EnumOptions::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (int i = 0; i < this->uninterpreted_option_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output);
}
// Extension range [1000, 536870912)
- DO_(_extensions_.SerializeWithCachedSizes(
- 1000, 536870912, *this, output));
+ _extensions_.SerializeWithCachedSizes(
+ 1000, 536870912, output);
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (int i = 0; i < this->uninterpreted_option_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(999, this->uninterpreted_option(i), target);
+ }
+
+ // Extension range [1000, 536870912)
+ target = _extensions_.SerializeWithCachedSizesToArray(
+ 1000, 536870912, target);
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int EnumOptions::ByteSize() const {
@@ -4495,7 +4961,7 @@ int EnumOptions::ByteSize() const {
this->uninterpreted_option(i));
}
- total_size += _extensions_.ByteSize(*this);
+ total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
@@ -4561,7 +5027,7 @@ const ::google::protobuf::Descriptor* EnumOptions::GetDescriptor() const {
}
const ::google::protobuf::Reflection* EnumOptions::GetReflection() const {
- if (EnumOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumOptions_reflection_;
}
@@ -4572,43 +5038,39 @@ const int EnumValueOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
EnumValueOptions::EnumValueOptions()
- : ::google::protobuf::Message(),
- _extensions_(&EnumValueOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void EnumValueOptions::InitAsDefaultInstance() {}
EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
- : ::google::protobuf::Message(),
- _extensions_(&EnumValueOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void EnumValueOptions::SharedCtor() {
+ _cached_size_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
EnumValueOptions::~EnumValueOptions() {
+ SharedDtor();
+}
+
+void EnumValueOptions::SharedDtor() {
if (this != default_instance_) {
}
}
const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() {
- if (EnumValueOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumValueOptions_descriptor_;
}
const EnumValueOptions& EnumValueOptions::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
EnumValueOptions* EnumValueOptions::default_instance_ = NULL;
@@ -4651,7 +5113,8 @@ bool EnumValueOptions::MergePartialFromCodedStream(
return true;
}
if ((8000u <= tag)) {
- DO_(_extensions_.ParseField(tag, input, this));
+ DO_(_extensions_.ParseField(tag, input, default_instance_,
+ mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
@@ -4664,24 +5127,45 @@ bool EnumValueOptions::MergePartialFromCodedStream(
#undef DO_
}
-bool EnumValueOptions::SerializeWithCachedSizes(
+void EnumValueOptions::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ EnumValueOptions::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (int i = 0; i < this->uninterpreted_option_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output);
}
// Extension range [1000, 536870912)
- DO_(_extensions_.SerializeWithCachedSizes(
- 1000, 536870912, *this, output));
+ _extensions_.SerializeWithCachedSizes(
+ 1000, 536870912, output);
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (int i = 0; i < this->uninterpreted_option_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(999, this->uninterpreted_option(i), target);
+ }
+
+ // Extension range [1000, 536870912)
+ target = _extensions_.SerializeWithCachedSizesToArray(
+ 1000, 536870912, target);
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int EnumValueOptions::ByteSize() const {
@@ -4695,7 +5179,7 @@ int EnumValueOptions::ByteSize() const {
this->uninterpreted_option(i));
}
- total_size += _extensions_.ByteSize(*this);
+ total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
@@ -4761,7 +5245,7 @@ const ::google::protobuf::Descriptor* EnumValueOptions::GetDescriptor() const {
}
const ::google::protobuf::Reflection* EnumValueOptions::GetReflection() const {
- if (EnumValueOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return EnumValueOptions_reflection_;
}
@@ -4772,43 +5256,39 @@ const int ServiceOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
ServiceOptions::ServiceOptions()
- : ::google::protobuf::Message(),
- _extensions_(&ServiceOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void ServiceOptions::InitAsDefaultInstance() {}
ServiceOptions::ServiceOptions(const ServiceOptions& from)
- : ::google::protobuf::Message(),
- _extensions_(&ServiceOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void ServiceOptions::SharedCtor() {
+ _cached_size_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
ServiceOptions::~ServiceOptions() {
+ SharedDtor();
+}
+
+void ServiceOptions::SharedDtor() {
if (this != default_instance_) {
}
}
const ::google::protobuf::Descriptor* ServiceOptions::descriptor() {
- if (ServiceOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return ServiceOptions_descriptor_;
}
const ServiceOptions& ServiceOptions::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
ServiceOptions* ServiceOptions::default_instance_ = NULL;
@@ -4851,7 +5331,8 @@ bool ServiceOptions::MergePartialFromCodedStream(
return true;
}
if ((8000u <= tag)) {
- DO_(_extensions_.ParseField(tag, input, this));
+ DO_(_extensions_.ParseField(tag, input, default_instance_,
+ mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
@@ -4864,24 +5345,45 @@ bool ServiceOptions::MergePartialFromCodedStream(
#undef DO_
}
-bool ServiceOptions::SerializeWithCachedSizes(
+void ServiceOptions::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ ServiceOptions::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (int i = 0; i < this->uninterpreted_option_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output);
}
// Extension range [1000, 536870912)
- DO_(_extensions_.SerializeWithCachedSizes(
- 1000, 536870912, *this, output));
+ _extensions_.SerializeWithCachedSizes(
+ 1000, 536870912, output);
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (int i = 0; i < this->uninterpreted_option_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(999, this->uninterpreted_option(i), target);
+ }
+
+ // Extension range [1000, 536870912)
+ target = _extensions_.SerializeWithCachedSizesToArray(
+ 1000, 536870912, target);
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int ServiceOptions::ByteSize() const {
@@ -4895,7 +5397,7 @@ int ServiceOptions::ByteSize() const {
this->uninterpreted_option(i));
}
- total_size += _extensions_.ByteSize(*this);
+ total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
@@ -4961,7 +5463,7 @@ const ::google::protobuf::Descriptor* ServiceOptions::GetDescriptor() const {
}
const ::google::protobuf::Reflection* ServiceOptions::GetReflection() const {
- if (ServiceOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return ServiceOptions_reflection_;
}
@@ -4972,43 +5474,39 @@ const int MethodOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
MethodOptions::MethodOptions()
- : ::google::protobuf::Message(),
- _extensions_(&MethodOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void MethodOptions::InitAsDefaultInstance() {}
MethodOptions::MethodOptions(const MethodOptions& from)
- : ::google::protobuf::Message(),
- _extensions_(&MethodOptions_descriptor_,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory()),
- _unknown_fields_(),
- _cached_size_(0),
- uninterpreted_option_() {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void MethodOptions::SharedCtor() {
+ _cached_size_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
MethodOptions::~MethodOptions() {
+ SharedDtor();
+}
+
+void MethodOptions::SharedDtor() {
if (this != default_instance_) {
}
}
const ::google::protobuf::Descriptor* MethodOptions::descriptor() {
- if (MethodOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return MethodOptions_descriptor_;
}
const MethodOptions& MethodOptions::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
MethodOptions* MethodOptions::default_instance_ = NULL;
@@ -5051,7 +5549,8 @@ bool MethodOptions::MergePartialFromCodedStream(
return true;
}
if ((8000u <= tag)) {
- DO_(_extensions_.ParseField(tag, input, this));
+ DO_(_extensions_.ParseField(tag, input, default_instance_,
+ mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
@@ -5064,24 +5563,45 @@ bool MethodOptions::MergePartialFromCodedStream(
#undef DO_
}
-bool MethodOptions::SerializeWithCachedSizes(
+void MethodOptions::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ MethodOptions::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (int i = 0; i < this->uninterpreted_option_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output);
}
// Extension range [1000, 536870912)
- DO_(_extensions_.SerializeWithCachedSizes(
- 1000, 536870912, *this, output));
+ _extensions_.SerializeWithCachedSizes(
+ 1000, 536870912, output);
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (int i = 0; i < this->uninterpreted_option_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(999, this->uninterpreted_option(i), target);
+ }
+
+ // Extension range [1000, 536870912)
+ target = _extensions_.SerializeWithCachedSizesToArray(
+ 1000, 536870912, target);
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int MethodOptions::ByteSize() const {
@@ -5095,7 +5615,7 @@ int MethodOptions::ByteSize() const {
this->uninterpreted_option(i));
}
- total_size += _extensions_.ByteSize(*this);
+ total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
@@ -5161,7 +5681,7 @@ const ::google::protobuf::Descriptor* MethodOptions::GetDescriptor() const {
}
const ::google::protobuf::Reflection* MethodOptions::GetReflection() const {
- if (MethodOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return MethodOptions_reflection_;
}
@@ -5174,27 +5694,30 @@ const int UninterpretedOption_NamePart::kIsExtensionFieldNumber;
#endif // !_MSC_VER
UninterpretedOption_NamePart::UninterpretedOption_NamePart()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_part_(const_cast< ::std::string*>(&_default_name_part_)),
- is_extension_(false) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void UninterpretedOption_NamePart::InitAsDefaultInstance() {}
UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_part_(const_cast< ::std::string*>(&_default_name_part_)),
- is_extension_(false) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void UninterpretedOption_NamePart::SharedCtor() {
+ _cached_size_ = 0;
+ name_part_ = const_cast< ::std::string*>(&_default_name_part_);
+ is_extension_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
+ SharedDtor();
+}
+
+void UninterpretedOption_NamePart::SharedDtor() {
if (name_part_ != &_default_name_part_) {
delete name_part_;
}
@@ -5203,13 +5726,12 @@ UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
}
const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() {
- if (UninterpretedOption_NamePart_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return UninterpretedOption_NamePart_descriptor_;
}
const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL;
@@ -5278,25 +5800,47 @@ bool UninterpretedOption_NamePart::MergePartialFromCodedStream(
#undef DO_
}
-bool UninterpretedOption_NamePart::SerializeWithCachedSizes(
+void UninterpretedOption_NamePart::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ UninterpretedOption_NamePart::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// required string name_part = 1;
if (_has_bit(0)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name_part(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(1, this->name_part(), output);
}
// required bool is_extension = 2;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteBool(2, this->is_extension(), output));
+ ::google::protobuf::internal::WireFormat::WriteBool(2, this->is_extension(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // required string name_part = 1;
+ if (_has_bit(0)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->name_part(), target);
+ }
+
+ // required bool is_extension = 2;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(2, this->is_extension(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int UninterpretedOption_NamePart::ByteSize() const {
@@ -5382,7 +5926,7 @@ const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::GetDescripto
}
const ::google::protobuf::Reflection* UninterpretedOption_NamePart::GetReflection() const {
- if (UninterpretedOption_NamePart_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return UninterpretedOption_NamePart_reflection_;
}
@@ -5400,35 +5944,33 @@ const int UninterpretedOption::kStringValueFieldNumber;
#endif // !_MSC_VER
UninterpretedOption::UninterpretedOption()
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(),
- identifier_value_(const_cast< ::std::string*>(&_default_identifier_value_)),
- positive_int_value_(GOOGLE_ULONGLONG(0)),
- negative_int_value_(GOOGLE_LONGLONG(0)),
- double_value_(0),
- string_value_(const_cast< ::std::string*>(&_default_string_value_)) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
}
void UninterpretedOption::InitAsDefaultInstance() {}
UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
- : ::google::protobuf::Message(),
- _unknown_fields_(),
- _cached_size_(0),
- name_(),
- identifier_value_(const_cast< ::std::string*>(&_default_identifier_value_)),
- positive_int_value_(GOOGLE_ULONGLONG(0)),
- negative_int_value_(GOOGLE_LONGLONG(0)),
- double_value_(0),
- string_value_(const_cast< ::std::string*>(&_default_string_value_)) {
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ : ::google::protobuf::Message() {
+ SharedCtor();
MergeFrom(from);
}
+void UninterpretedOption::SharedCtor() {
+ _cached_size_ = 0;
+ identifier_value_ = const_cast< ::std::string*>(&_default_identifier_value_);
+ positive_int_value_ = GOOGLE_ULONGLONG(0);
+ negative_int_value_ = GOOGLE_LONGLONG(0);
+ double_value_ = 0;
+ string_value_ = const_cast< ::std::string*>(&_default_string_value_);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
UninterpretedOption::~UninterpretedOption() {
+ SharedDtor();
+}
+
+void UninterpretedOption::SharedDtor() {
if (identifier_value_ != &_default_identifier_value_) {
delete identifier_value_;
}
@@ -5440,13 +5982,12 @@ UninterpretedOption::~UninterpretedOption() {
}
const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() {
- if (UninterpretedOption_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return UninterpretedOption_descriptor_;
}
const UninterpretedOption& UninterpretedOption::default_instance() {
- if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
- return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
}
UninterpretedOption* UninterpretedOption::default_instance_ = NULL;
@@ -5578,45 +6119,87 @@ bool UninterpretedOption::MergePartialFromCodedStream(
#undef DO_
}
-bool UninterpretedOption::SerializeWithCachedSizes(
+void UninterpretedOption::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
+ if (raw_buffer != NULL) {
+ UninterpretedOption::SerializeWithCachedSizesToArray(raw_buffer);
+ return;
+ }
+
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
for (int i = 0; i < this->name_size(); i++) {
- DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->name(i), output));
+ ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->name(i), output);
}
// optional string identifier_value = 3;
if (_has_bit(1)) {
- DO_(::google::protobuf::internal::WireFormat::WriteString(3, this->identifier_value(), output));
+ ::google::protobuf::internal::WireFormat::WriteString(3, this->identifier_value(), output);
}
// optional uint64 positive_int_value = 4;
if (_has_bit(2)) {
- DO_(::google::protobuf::internal::WireFormat::WriteUInt64(4, this->positive_int_value(), output));
+ ::google::protobuf::internal::WireFormat::WriteUInt64(4, this->positive_int_value(), output);
}
// optional int64 negative_int_value = 5;
if (_has_bit(3)) {
- DO_(::google::protobuf::internal::WireFormat::WriteInt64(5, this->negative_int_value(), output));
+ ::google::protobuf::internal::WireFormat::WriteInt64(5, this->negative_int_value(), output);
}
// optional double double_value = 6;
if (_has_bit(4)) {
- DO_(::google::protobuf::internal::WireFormat::WriteDouble(6, this->double_value(), output));
+ ::google::protobuf::internal::WireFormat::WriteDouble(6, this->double_value(), output);
}
// optional bytes string_value = 7;
if (_has_bit(5)) {
- DO_(::google::protobuf::internal::WireFormat::WriteBytes(7, this->string_value(), output));
+ ::google::protobuf::internal::WireFormat::WriteBytes(7, this->string_value(), output);
}
if (!unknown_fields().empty()) {
- DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output));
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
}
- return true;
-#undef DO_
+}
+
+::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
+ for (int i = 0; i < this->name_size(); i++) {
+ target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(2, this->name(i), target);
+ }
+
+ // optional string identifier_value = 3;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormat::WriteStringToArray(3, this->identifier_value(), target);
+ }
+
+ // optional uint64 positive_int_value = 4;
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormat::WriteUInt64ToArray(4, this->positive_int_value(), target);
+ }
+
+ // optional int64 negative_int_value = 5;
+ if (_has_bit(3)) {
+ target = ::google::protobuf::internal::WireFormat::WriteInt64ToArray(5, this->negative_int_value(), target);
+ }
+
+ // optional double double_value = 6;
+ if (_has_bit(4)) {
+ target = ::google::protobuf::internal::WireFormat::WriteDoubleToArray(6, this->double_value(), target);
+ }
+
+ // optional bytes string_value = 7;
+ if (_has_bit(5)) {
+ target = ::google::protobuf::internal::WireFormat::WriteBytesToArray(7, this->string_value(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
}
int UninterpretedOption::ByteSize() const {
@@ -5746,7 +6329,7 @@ const ::google::protobuf::Descriptor* UninterpretedOption::GetDescriptor() const
}
const ::google::protobuf::Reflection* UninterpretedOption::GetReflection() const {
- if (UninterpretedOption_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ protobuf_AssignDescriptorsOnce();
return UninterpretedOption_reflection_;
}