blob: 87303ef87bef0b472d2f669239a989ce9e5070ce [file] [log] [blame]
temporal40ee5512008-07-10 02:12:20 +00001// Generated by the protocol buffer compiler. DO NOT EDIT!
2
kenton@google.com80b1d622009-07-29 01:13:20 +00003#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
temporal40ee5512008-07-10 02:12:20 +00004#include "google/protobuf/descriptor.pb.h"
kenton@google.comc65c0412010-02-01 20:35:34 +00005
6#include <algorithm>
7
kenton@google.comd37d46d2009-04-25 02:53:47 +00008#include <google/protobuf/stubs/once.h>
temporal40ee5512008-07-10 02:12:20 +00009#include <google/protobuf/io/coded_stream.h>
kenton@google.com80b1d622009-07-29 01:13:20 +000010#include <google/protobuf/wire_format_lite_inl.h>
11#include <google/protobuf/descriptor.h>
temporal40ee5512008-07-10 02:12:20 +000012#include <google/protobuf/reflection_ops.h>
kenton@google.com80b1d622009-07-29 01:13:20 +000013#include <google/protobuf/wire_format.h>
kenton@google.comfccb1462009-12-18 02:11:36 +000014// @@protoc_insertion_point(includes)
temporal40ee5512008-07-10 02:12:20 +000015
16namespace google {
17namespace protobuf {
18
19namespace {
20
temporal779f61c2008-08-13 03:15:00 +000021const ::google::protobuf::Descriptor* FileDescriptorSet_descriptor_ = NULL;
22const ::google::protobuf::internal::GeneratedMessageReflection*
23 FileDescriptorSet_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000024const ::google::protobuf::Descriptor* FileDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000025const ::google::protobuf::internal::GeneratedMessageReflection*
26 FileDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000027const ::google::protobuf::Descriptor* DescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000028const ::google::protobuf::internal::GeneratedMessageReflection*
29 DescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000030const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000031const ::google::protobuf::internal::GeneratedMessageReflection*
32 DescriptorProto_ExtensionRange_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000033const ::google::protobuf::Descriptor* FieldDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000034const ::google::protobuf::internal::GeneratedMessageReflection*
35 FieldDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000036const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor_ = NULL;
37const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor_ = NULL;
38const ::google::protobuf::Descriptor* EnumDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000039const ::google::protobuf::internal::GeneratedMessageReflection*
40 EnumDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000041const ::google::protobuf::Descriptor* EnumValueDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000042const ::google::protobuf::internal::GeneratedMessageReflection*
43 EnumValueDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000044const ::google::protobuf::Descriptor* ServiceDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000045const ::google::protobuf::internal::GeneratedMessageReflection*
46 ServiceDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000047const ::google::protobuf::Descriptor* MethodDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000048const ::google::protobuf::internal::GeneratedMessageReflection*
49 MethodDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000050const ::google::protobuf::Descriptor* FileOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000051const ::google::protobuf::internal::GeneratedMessageReflection*
52 FileOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000053const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor_ = NULL;
54const ::google::protobuf::Descriptor* MessageOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000055const ::google::protobuf::internal::GeneratedMessageReflection*
56 MessageOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000057const ::google::protobuf::Descriptor* FieldOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000058const ::google::protobuf::internal::GeneratedMessageReflection*
59 FieldOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000060const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor_ = NULL;
61const ::google::protobuf::Descriptor* EnumOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000062const ::google::protobuf::internal::GeneratedMessageReflection*
63 EnumOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000064const ::google::protobuf::Descriptor* EnumValueOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000065const ::google::protobuf::internal::GeneratedMessageReflection*
66 EnumValueOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000067const ::google::protobuf::Descriptor* ServiceOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000068const ::google::protobuf::internal::GeneratedMessageReflection*
69 ServiceOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000070const ::google::protobuf::Descriptor* MethodOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000071const ::google::protobuf::internal::GeneratedMessageReflection*
72 MethodOptions_reflection_ = NULL;
kenton@google.com24bf56f2008-09-24 20:31:01 +000073const ::google::protobuf::Descriptor* UninterpretedOption_descriptor_ = NULL;
74const ::google::protobuf::internal::GeneratedMessageReflection*
75 UninterpretedOption_reflection_ = NULL;
76const ::google::protobuf::Descriptor* UninterpretedOption_NamePart_descriptor_ = NULL;
77const ::google::protobuf::internal::GeneratedMessageReflection*
78 UninterpretedOption_NamePart_reflection_ = NULL;
liujisi@google.com33165fe2010-11-02 13:14:58 +000079const ::google::protobuf::Descriptor* SourceCodeInfo_descriptor_ = NULL;
80const ::google::protobuf::internal::GeneratedMessageReflection*
81 SourceCodeInfo_reflection_ = NULL;
82const ::google::protobuf::Descriptor* SourceCodeInfo_Location_descriptor_ = NULL;
83const ::google::protobuf::internal::GeneratedMessageReflection*
84 SourceCodeInfo_Location_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000085
86} // namespace
87
88
kenton@google.comd37d46d2009-04-25 02:53:47 +000089void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
90 protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
91 const ::google::protobuf::FileDescriptor* file =
92 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
93 "google/protobuf/descriptor.proto");
94 GOOGLE_CHECK(file != NULL);
kenton@google.com24bf56f2008-09-24 20:31:01 +000095 FileDescriptorSet_descriptor_ = file->message_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +000096 static const int FileDescriptorSet_offsets_[1] = {
97 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_),
98 };
kenton@google.com24bf56f2008-09-24 20:31:01 +000099 FileDescriptorSet_reflection_ =
100 new ::google::protobuf::internal::GeneratedMessageReflection(
101 FileDescriptorSet_descriptor_,
102 FileDescriptorSet::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000103 FileDescriptorSet_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000104 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]),
105 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _unknown_fields_),
106 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000107 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000108 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000109 sizeof(FileDescriptorSet));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000110 FileDescriptorProto_descriptor_ = file->message_type(1);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000111 static const int FileDescriptorProto_offsets_[9] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000112 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_),
113 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_),
114 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_),
115 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_),
116 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_),
117 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_),
118 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_),
119 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000120 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, source_code_info_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000121 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000122 FileDescriptorProto_reflection_ =
123 new ::google::protobuf::internal::GeneratedMessageReflection(
124 FileDescriptorProto_descriptor_,
125 FileDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000126 FileDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000127 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]),
128 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _unknown_fields_),
129 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000130 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000131 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000132 sizeof(FileDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000133 DescriptorProto_descriptor_ = file->message_type(2);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000134 static const int DescriptorProto_offsets_[7] = {
135 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_),
136 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_),
137 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_),
138 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_),
139 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_),
140 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_),
141 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_),
142 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000143 DescriptorProto_reflection_ =
144 new ::google::protobuf::internal::GeneratedMessageReflection(
145 DescriptorProto_descriptor_,
146 DescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000147 DescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000148 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]),
149 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _unknown_fields_),
150 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000151 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000152 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000153 sizeof(DescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000154 DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000155 static const int DescriptorProto_ExtensionRange_offsets_[2] = {
156 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_),
157 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_),
158 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000159 DescriptorProto_ExtensionRange_reflection_ =
160 new ::google::protobuf::internal::GeneratedMessageReflection(
161 DescriptorProto_ExtensionRange_descriptor_,
162 DescriptorProto_ExtensionRange::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000163 DescriptorProto_ExtensionRange_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000164 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]),
165 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _unknown_fields_),
166 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000167 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000168 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000169 sizeof(DescriptorProto_ExtensionRange));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000170 FieldDescriptorProto_descriptor_ = file->message_type(3);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000171 static const int FieldDescriptorProto_offsets_[8] = {
172 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_),
173 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_),
174 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_),
175 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_),
176 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_),
177 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_),
178 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_),
179 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_),
180 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000181 FieldDescriptorProto_reflection_ =
182 new ::google::protobuf::internal::GeneratedMessageReflection(
183 FieldDescriptorProto_descriptor_,
184 FieldDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000185 FieldDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000186 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]),
187 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _unknown_fields_),
188 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000189 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000190 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000191 sizeof(FieldDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000192 FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0);
193 FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000194 EnumDescriptorProto_descriptor_ = file->message_type(4);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000195 static const int EnumDescriptorProto_offsets_[3] = {
196 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_),
197 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_),
198 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_),
199 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000200 EnumDescriptorProto_reflection_ =
201 new ::google::protobuf::internal::GeneratedMessageReflection(
202 EnumDescriptorProto_descriptor_,
203 EnumDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000204 EnumDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000205 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]),
206 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _unknown_fields_),
207 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000208 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000209 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000210 sizeof(EnumDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000211 EnumValueDescriptorProto_descriptor_ = file->message_type(5);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000212 static const int EnumValueDescriptorProto_offsets_[3] = {
213 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_),
214 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_),
215 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_),
216 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000217 EnumValueDescriptorProto_reflection_ =
218 new ::google::protobuf::internal::GeneratedMessageReflection(
219 EnumValueDescriptorProto_descriptor_,
220 EnumValueDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000221 EnumValueDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000222 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]),
223 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _unknown_fields_),
224 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000225 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000226 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000227 sizeof(EnumValueDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000228 ServiceDescriptorProto_descriptor_ = file->message_type(6);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000229 static const int ServiceDescriptorProto_offsets_[3] = {
230 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_),
231 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_),
232 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_),
233 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000234 ServiceDescriptorProto_reflection_ =
235 new ::google::protobuf::internal::GeneratedMessageReflection(
236 ServiceDescriptorProto_descriptor_,
237 ServiceDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000238 ServiceDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000239 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]),
240 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _unknown_fields_),
241 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000242 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000243 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000244 sizeof(ServiceDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000245 MethodDescriptorProto_descriptor_ = file->message_type(7);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000246 static const int MethodDescriptorProto_offsets_[4] = {
247 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_),
248 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_),
249 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_),
250 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_),
251 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000252 MethodDescriptorProto_reflection_ =
253 new ::google::protobuf::internal::GeneratedMessageReflection(
254 MethodDescriptorProto_descriptor_,
255 MethodDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000256 MethodDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000257 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]),
258 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _unknown_fields_),
259 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000260 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000261 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000262 sizeof(MethodDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000263 FileOptions_descriptor_ = file->message_type(8);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000264 static const int FileOptions_offsets_[9] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000265 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_),
266 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_),
267 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000268 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generate_equals_and_hash_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000269 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_),
kenton@google.comfccb1462009-12-18 02:11:36 +0000270 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_generic_services_),
271 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generic_services_),
272 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, py_generic_services_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000273 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_),
274 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000275 FileOptions_reflection_ =
276 new ::google::protobuf::internal::GeneratedMessageReflection(
277 FileOptions_descriptor_,
278 FileOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000279 FileOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000280 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]),
281 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _unknown_fields_),
282 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000283 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000284 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000285 sizeof(FileOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000286 FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000287 MessageOptions_descriptor_ = file->message_type(9);
kenton@google.com80b1d622009-07-29 01:13:20 +0000288 static const int MessageOptions_offsets_[3] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000289 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_),
kenton@google.com80b1d622009-07-29 01:13:20 +0000290 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, no_standard_descriptor_accessor_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000291 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_),
292 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000293 MessageOptions_reflection_ =
294 new ::google::protobuf::internal::GeneratedMessageReflection(
295 MessageOptions_descriptor_,
296 MessageOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000297 MessageOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000298 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]),
299 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _unknown_fields_),
300 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000301 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000302 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000303 sizeof(MessageOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000304 FieldOptions_descriptor_ = file->message_type(10);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000305 static const int FieldOptions_offsets_[5] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000306 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_),
kenton@google.com2d6daa72009-01-22 01:27:00 +0000307 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000308 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000309 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, experimental_map_key_),
310 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_),
311 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000312 FieldOptions_reflection_ =
313 new ::google::protobuf::internal::GeneratedMessageReflection(
314 FieldOptions_descriptor_,
315 FieldOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000316 FieldOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000317 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]),
318 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _unknown_fields_),
319 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000320 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000321 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000322 sizeof(FieldOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000323 FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000324 EnumOptions_descriptor_ = file->message_type(11);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000325 static const int EnumOptions_offsets_[1] = {
326 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_),
327 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000328 EnumOptions_reflection_ =
329 new ::google::protobuf::internal::GeneratedMessageReflection(
330 EnumOptions_descriptor_,
331 EnumOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000332 EnumOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000333 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]),
334 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _unknown_fields_),
335 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000336 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000337 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000338 sizeof(EnumOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000339 EnumValueOptions_descriptor_ = file->message_type(12);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000340 static const int EnumValueOptions_offsets_[1] = {
341 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_),
342 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000343 EnumValueOptions_reflection_ =
344 new ::google::protobuf::internal::GeneratedMessageReflection(
345 EnumValueOptions_descriptor_,
346 EnumValueOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000347 EnumValueOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000348 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]),
349 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _unknown_fields_),
350 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000351 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000352 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000353 sizeof(EnumValueOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000354 ServiceOptions_descriptor_ = file->message_type(13);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000355 static const int ServiceOptions_offsets_[1] = {
356 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_),
357 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000358 ServiceOptions_reflection_ =
359 new ::google::protobuf::internal::GeneratedMessageReflection(
360 ServiceOptions_descriptor_,
361 ServiceOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000362 ServiceOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000363 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]),
364 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _unknown_fields_),
365 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000366 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000367 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000368 sizeof(ServiceOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000369 MethodOptions_descriptor_ = file->message_type(14);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000370 static const int MethodOptions_offsets_[1] = {
371 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_),
372 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000373 MethodOptions_reflection_ =
374 new ::google::protobuf::internal::GeneratedMessageReflection(
375 MethodOptions_descriptor_,
376 MethodOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000377 MethodOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000378 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]),
379 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _unknown_fields_),
380 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000381 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000382 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000383 sizeof(MethodOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000384 UninterpretedOption_descriptor_ = file->message_type(15);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000385 static const int UninterpretedOption_offsets_[7] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000386 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_),
387 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_),
388 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_),
389 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_),
390 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_),
391 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000392 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, aggregate_value_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000393 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000394 UninterpretedOption_reflection_ =
395 new ::google::protobuf::internal::GeneratedMessageReflection(
396 UninterpretedOption_descriptor_,
397 UninterpretedOption::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000398 UninterpretedOption_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000399 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]),
400 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _unknown_fields_),
401 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000402 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000403 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000404 sizeof(UninterpretedOption));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000405 UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000406 static const int UninterpretedOption_NamePart_offsets_[2] = {
407 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_),
408 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_),
409 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000410 UninterpretedOption_NamePart_reflection_ =
411 new ::google::protobuf::internal::GeneratedMessageReflection(
412 UninterpretedOption_NamePart_descriptor_,
413 UninterpretedOption_NamePart::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000414 UninterpretedOption_NamePart_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000415 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]),
416 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _unknown_fields_),
417 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000418 ::google::protobuf::DescriptorPool::generated_pool(),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000419 ::google::protobuf::MessageFactory::generated_factory(),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000420 sizeof(UninterpretedOption_NamePart));
liujisi@google.com33165fe2010-11-02 13:14:58 +0000421 SourceCodeInfo_descriptor_ = file->message_type(16);
422 static const int SourceCodeInfo_offsets_[1] = {
423 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, location_),
424 };
425 SourceCodeInfo_reflection_ =
426 new ::google::protobuf::internal::GeneratedMessageReflection(
427 SourceCodeInfo_descriptor_,
428 SourceCodeInfo::default_instance_,
429 SourceCodeInfo_offsets_,
430 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _has_bits_[0]),
431 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _unknown_fields_),
432 -1,
433 ::google::protobuf::DescriptorPool::generated_pool(),
434 ::google::protobuf::MessageFactory::generated_factory(),
435 sizeof(SourceCodeInfo));
436 SourceCodeInfo_Location_descriptor_ = SourceCodeInfo_descriptor_->nested_type(0);
437 static const int SourceCodeInfo_Location_offsets_[2] = {
438 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, path_),
439 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, span_),
440 };
441 SourceCodeInfo_Location_reflection_ =
442 new ::google::protobuf::internal::GeneratedMessageReflection(
443 SourceCodeInfo_Location_descriptor_,
444 SourceCodeInfo_Location::default_instance_,
445 SourceCodeInfo_Location_offsets_,
446 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _has_bits_[0]),
447 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _unknown_fields_),
448 -1,
449 ::google::protobuf::DescriptorPool::generated_pool(),
450 ::google::protobuf::MessageFactory::generated_factory(),
451 sizeof(SourceCodeInfo_Location));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000452}
453
kenton@google.comd37d46d2009-04-25 02:53:47 +0000454namespace {
455
456GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
457inline void protobuf_AssignDescriptorsOnce() {
458 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
459 &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto);
460}
461
kenton@google.com80b1d622009-07-29 01:13:20 +0000462void protobuf_RegisterTypes(const ::std::string&) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000463 protobuf_AssignDescriptorsOnce();
464 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
465 FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance());
466 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
467 FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance());
468 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
469 DescriptorProto_descriptor_, &DescriptorProto::default_instance());
470 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
471 DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance());
472 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
473 FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance());
474 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
475 EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance());
476 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
477 EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance());
478 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
479 ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance());
480 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
481 MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance());
482 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
483 FileOptions_descriptor_, &FileOptions::default_instance());
484 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
485 MessageOptions_descriptor_, &MessageOptions::default_instance());
486 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
487 FieldOptions_descriptor_, &FieldOptions::default_instance());
488 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
489 EnumOptions_descriptor_, &EnumOptions::default_instance());
490 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
491 EnumValueOptions_descriptor_, &EnumValueOptions::default_instance());
492 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
493 ServiceOptions_descriptor_, &ServiceOptions::default_instance());
494 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
495 MethodOptions_descriptor_, &MethodOptions::default_instance());
496 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
497 UninterpretedOption_descriptor_, &UninterpretedOption::default_instance());
498 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
499 UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000500 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
501 SourceCodeInfo_descriptor_, &SourceCodeInfo::default_instance());
502 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
503 SourceCodeInfo_Location_descriptor_, &SourceCodeInfo_Location::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000504}
505
506} // namespace
507
kenton@google.com63e646b2009-05-06 19:27:03 +0000508void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto() {
509 delete FileDescriptorSet::default_instance_;
510 delete FileDescriptorSet_reflection_;
511 delete FileDescriptorProto::default_instance_;
512 delete FileDescriptorProto_reflection_;
513 delete DescriptorProto::default_instance_;
514 delete DescriptorProto_reflection_;
515 delete DescriptorProto_ExtensionRange::default_instance_;
516 delete DescriptorProto_ExtensionRange_reflection_;
517 delete FieldDescriptorProto::default_instance_;
518 delete FieldDescriptorProto_reflection_;
519 delete EnumDescriptorProto::default_instance_;
520 delete EnumDescriptorProto_reflection_;
521 delete EnumValueDescriptorProto::default_instance_;
522 delete EnumValueDescriptorProto_reflection_;
523 delete ServiceDescriptorProto::default_instance_;
524 delete ServiceDescriptorProto_reflection_;
525 delete MethodDescriptorProto::default_instance_;
526 delete MethodDescriptorProto_reflection_;
527 delete FileOptions::default_instance_;
528 delete FileOptions_reflection_;
529 delete MessageOptions::default_instance_;
530 delete MessageOptions_reflection_;
531 delete FieldOptions::default_instance_;
532 delete FieldOptions_reflection_;
533 delete EnumOptions::default_instance_;
534 delete EnumOptions_reflection_;
535 delete EnumValueOptions::default_instance_;
536 delete EnumValueOptions_reflection_;
537 delete ServiceOptions::default_instance_;
538 delete ServiceOptions_reflection_;
539 delete MethodOptions::default_instance_;
540 delete MethodOptions_reflection_;
541 delete UninterpretedOption::default_instance_;
542 delete UninterpretedOption_reflection_;
543 delete UninterpretedOption_NamePart::default_instance_;
544 delete UninterpretedOption_NamePart_reflection_;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000545 delete SourceCodeInfo::default_instance_;
546 delete SourceCodeInfo_reflection_;
547 delete SourceCodeInfo_Location::default_instance_;
548 delete SourceCodeInfo_Location_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000549}
550
kenton@google.comd37d46d2009-04-25 02:53:47 +0000551void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
temporal40ee5512008-07-10 02:12:20 +0000552 static bool already_here = false;
553 if (already_here) return;
554 already_here = true;
555 GOOGLE_PROTOBUF_VERIFY_VERSION;
temporal40ee5512008-07-10 02:12:20 +0000556
kenton@google.comd37d46d2009-04-25 02:53:47 +0000557 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
temporal40ee5512008-07-10 02:12:20 +0000558 "\n google/protobuf/descriptor.proto\022\017goog"
temporal779f61c2008-08-13 03:15:00 +0000559 "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
560 "\030\001 \003(\0132$.google.protobuf.FileDescriptorP"
liujisi@google.com33165fe2010-11-02 13:14:58 +0000561 "roto\"\227\003\n\023FileDescriptorProto\022\014\n\004name\030\001 \001"
temporal779f61c2008-08-13 03:15:00 +0000562 "(\t\022\017\n\007package\030\002 \001(\t\022\022\n\ndependency\030\003 \003(\t\022"
563 "6\n\014message_type\030\004 \003(\0132 .google.protobuf."
564 "DescriptorProto\0227\n\tenum_type\030\005 \003(\0132$.goo"
565 "gle.protobuf.EnumDescriptorProto\0228\n\007serv"
566 "ice\030\006 \003(\0132\'.google.protobuf.ServiceDescr"
567 "iptorProto\0228\n\textension\030\007 \003(\0132%.google.p"
568 "rotobuf.FieldDescriptorProto\022-\n\007options\030"
liujisi@google.com33165fe2010-11-02 13:14:58 +0000569 "\010 \001(\0132\034.google.protobuf.FileOptions\0229\n\020s"
570 "ource_code_info\030\t \001(\0132\037.google.protobuf."
571 "SourceCodeInfo\"\251\003\n\017DescriptorProto\022\014\n\004na"
572 "me\030\001 \001(\t\0224\n\005field\030\002 \003(\0132%.google.protobu"
573 "f.FieldDescriptorProto\0228\n\textension\030\006 \003("
574 "\0132%.google.protobuf.FieldDescriptorProto"
575 "\0225\n\013nested_type\030\003 \003(\0132 .google.protobuf."
576 "DescriptorProto\0227\n\tenum_type\030\004 \003(\0132$.goo"
577 "gle.protobuf.EnumDescriptorProto\022H\n\017exte"
578 "nsion_range\030\005 \003(\0132/.google.protobuf.Desc"
579 "riptorProto.ExtensionRange\0220\n\007options\030\007 "
580 "\001(\0132\037.google.protobuf.MessageOptions\032,\n\016"
581 "ExtensionRange\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001"
582 "(\005\"\224\005\n\024FieldDescriptorProto\022\014\n\004name\030\001 \001("
583 "\t\022\016\n\006number\030\003 \001(\005\022:\n\005label\030\004 \001(\0162+.googl"
584 "e.protobuf.FieldDescriptorProto.Label\0228\n"
585 "\004type\030\005 \001(\0162*.google.protobuf.FieldDescr"
586 "iptorProto.Type\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010ex"
587 "tendee\030\002 \001(\t\022\025\n\rdefault_value\030\007 \001(\t\022.\n\007o"
588 "ptions\030\010 \001(\0132\035.google.protobuf.FieldOpti"
589 "ons\"\266\002\n\004Type\022\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FL"
590 "OAT\020\002\022\016\n\nTYPE_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016"
591 "\n\nTYPE_INT32\020\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE"
592 "_FIXED32\020\007\022\r\n\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING"
593 "\020\t\022\016\n\nTYPE_GROUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\n"
594 "TYPE_BYTES\020\014\022\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_EN"
595 "UM\020\016\022\021\n\rTYPE_SFIXED32\020\017\022\021\n\rTYPE_SFIXED64"
596 "\020\020\022\017\n\013TYPE_SINT32\020\021\022\017\n\013TYPE_SINT64\020\022\"C\n\005"
597 "Label\022\022\n\016LABEL_OPTIONAL\020\001\022\022\n\016LABEL_REQUI"
598 "RED\020\002\022\022\n\016LABEL_REPEATED\020\003\"\214\001\n\023EnumDescri"
599 "ptorProto\022\014\n\004name\030\001 \001(\t\0228\n\005value\030\002 \003(\0132)"
600 ".google.protobuf.EnumValueDescriptorProt"
601 "o\022-\n\007options\030\003 \001(\0132\034.google.protobuf.Enu"
602 "mOptions\"l\n\030EnumValueDescriptorProto\022\014\n\004"
603 "name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\0222\n\007options\030\003 "
604 "\001(\0132!.google.protobuf.EnumValueOptions\"\220"
605 "\001\n\026ServiceDescriptorProto\022\014\n\004name\030\001 \001(\t\022"
606 "6\n\006method\030\002 \003(\0132&.google.protobuf.Method"
607 "DescriptorProto\0220\n\007options\030\003 \001(\0132\037.googl"
608 "e.protobuf.ServiceOptions\"\177\n\025MethodDescr"
609 "iptorProto\022\014\n\004name\030\001 \001(\t\022\022\n\ninput_type\030\002"
610 " \001(\t\022\023\n\013output_type\030\003 \001(\t\022/\n\007options\030\004 \001"
611 "(\0132\036.google.protobuf.MethodOptions\"\325\003\n\013F"
612 "ileOptions\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java"
613 "_outer_classname\030\010 \001(\t\022\"\n\023java_multiple_"
614 "files\030\n \001(\010:\005false\022,\n\035java_generate_equa"
615 "ls_and_hash\030\024 \001(\010:\005false\022F\n\014optimize_for"
616 "\030\t \001(\0162).google.protobuf.FileOptions.Opt"
617 "imizeMode:\005SPEED\022\"\n\023cc_generic_services\030"
618 "\020 \001(\010:\005false\022$\n\025java_generic_services\030\021 "
619 "\001(\010:\005false\022\"\n\023py_generic_services\030\022 \001(\010:"
620 "\005false\022C\n\024uninterpreted_option\030\347\007 \003(\0132$."
621 "google.protobuf.UninterpretedOption\":\n\014O"
622 "ptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n"
623 "\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\270\001\n\016MessageOp"
624 "tions\022&\n\027message_set_wire_format\030\001 \001(\010:\005"
625 "false\022.\n\037no_standard_descriptor_accessor"
626 "\030\002 \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007"
627 " \003(\0132$.google.protobuf.UninterpretedOpti"
628 "on*\t\010\350\007\020\200\200\200\200\002\"\224\002\n\014FieldOptions\022:\n\005ctype\030"
629 "\001 \001(\0162#.google.protobuf.FieldOptions.CTy"
630 "pe:\006STRING\022\016\n\006packed\030\002 \001(\010\022\031\n\ndeprecated"
631 "\030\003 \001(\010:\005false\022\034\n\024experimental_map_key\030\t "
632 "\001(\t\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goo"
633 "gle.protobuf.UninterpretedOption\"/\n\005CTyp"
634 "e\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020"
635 "\002*\t\010\350\007\020\200\200\200\200\002\"]\n\013EnumOptions\022C\n\024uninterpr"
636 "eted_option\030\347\007 \003(\0132$.google.protobuf.Uni"
637 "nterpretedOption*\t\010\350\007\020\200\200\200\200\002\"b\n\020EnumValue"
638 "Options\022C\n\024uninterpreted_option\030\347\007 \003(\0132$"
639 ".google.protobuf.UninterpretedOption*\t\010\350"
640 "\007\020\200\200\200\200\002\"`\n\016ServiceOptions\022C\n\024uninterpret"
kenton@google.comfccb1462009-12-18 02:11:36 +0000641 "ed_option\030\347\007 \003(\0132$.google.protobuf.Unint"
liujisi@google.com33165fe2010-11-02 13:14:58 +0000642 "erpretedOption*\t\010\350\007\020\200\200\200\200\002\"_\n\rMethodOptio"
643 "ns\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goog"
644 "le.protobuf.UninterpretedOption*\t\010\350\007\020\200\200\200"
645 "\200\002\"\236\002\n\023UninterpretedOption\022;\n\004name\030\002 \003(\013"
646 "2-.google.protobuf.UninterpretedOption.N"
647 "amePart\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022pos"
648 "itive_int_value\030\004 \001(\004\022\032\n\022negative_int_va"
649 "lue\030\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014strin"
650 "g_value\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323"
651 "\n\010NamePart\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_exte"
652 "nsion\030\002 \002(\010\"|\n\016SourceCodeInfo\022:\n\010locatio"
653 "n\030\001 \003(\0132(.google.protobuf.SourceCodeInfo"
654 ".Location\032.\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022"
655 "\020\n\004span\030\002 \003(\005B\002\020\001B)\n\023com.google.protobuf"
656 "B\020DescriptorProtosH\001", 3940);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000657 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
658 "google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
659 FileDescriptorSet::default_instance_ = new FileDescriptorSet();
660 FileDescriptorProto::default_instance_ = new FileDescriptorProto();
661 DescriptorProto::default_instance_ = new DescriptorProto();
662 DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange();
663 FieldDescriptorProto::default_instance_ = new FieldDescriptorProto();
664 EnumDescriptorProto::default_instance_ = new EnumDescriptorProto();
665 EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto();
666 ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto();
667 MethodDescriptorProto::default_instance_ = new MethodDescriptorProto();
668 FileOptions::default_instance_ = new FileOptions();
669 MessageOptions::default_instance_ = new MessageOptions();
670 FieldOptions::default_instance_ = new FieldOptions();
671 EnumOptions::default_instance_ = new EnumOptions();
672 EnumValueOptions::default_instance_ = new EnumValueOptions();
673 ServiceOptions::default_instance_ = new ServiceOptions();
674 MethodOptions::default_instance_ = new MethodOptions();
675 UninterpretedOption::default_instance_ = new UninterpretedOption();
676 UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000677 SourceCodeInfo::default_instance_ = new SourceCodeInfo();
678 SourceCodeInfo_Location::default_instance_ = new SourceCodeInfo_Location();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000679 FileDescriptorSet::default_instance_->InitAsDefaultInstance();
680 FileDescriptorProto::default_instance_->InitAsDefaultInstance();
681 DescriptorProto::default_instance_->InitAsDefaultInstance();
682 DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance();
683 FieldDescriptorProto::default_instance_->InitAsDefaultInstance();
684 EnumDescriptorProto::default_instance_->InitAsDefaultInstance();
685 EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance();
686 ServiceDescriptorProto::default_instance_->InitAsDefaultInstance();
687 MethodDescriptorProto::default_instance_->InitAsDefaultInstance();
688 FileOptions::default_instance_->InitAsDefaultInstance();
689 MessageOptions::default_instance_->InitAsDefaultInstance();
690 FieldOptions::default_instance_->InitAsDefaultInstance();
691 EnumOptions::default_instance_->InitAsDefaultInstance();
692 EnumValueOptions::default_instance_->InitAsDefaultInstance();
693 ServiceOptions::default_instance_->InitAsDefaultInstance();
694 MethodOptions::default_instance_->InitAsDefaultInstance();
695 UninterpretedOption::default_instance_->InitAsDefaultInstance();
696 UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000697 SourceCodeInfo::default_instance_->InitAsDefaultInstance();
698 SourceCodeInfo_Location::default_instance_->InitAsDefaultInstance();
kenton@google.com63e646b2009-05-06 19:27:03 +0000699 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto);
temporal40ee5512008-07-10 02:12:20 +0000700}
701
kenton@google.comd37d46d2009-04-25 02:53:47 +0000702// Force AddDescriptors() to be called at static initialization time.
temporal40ee5512008-07-10 02:12:20 +0000703struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto {
704 StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000705 protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +0000706 }
707} static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_;
708
709
710// ===================================================================
711
kenton@google.comcfa2d8a2009-04-18 00:02:12 +0000712#ifndef _MSC_VER
713const int FileDescriptorSet::kFileFieldNumber;
714#endif // !_MSC_VER
temporal779f61c2008-08-13 03:15:00 +0000715
kenton@google.com573989f2009-10-30 22:02:17 +0000716FileDescriptorSet::FileDescriptorSet()
kenton@google.comfccb1462009-12-18 02:11:36 +0000717 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000718 SharedCtor();
temporal779f61c2008-08-13 03:15:00 +0000719}
720
kenton@google.com80b1d622009-07-29 01:13:20 +0000721void FileDescriptorSet::InitAsDefaultInstance() {
722}
kenton@google.com24bf56f2008-09-24 20:31:01 +0000723
kenton@google.com573989f2009-10-30 22:02:17 +0000724FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
kenton@google.comfccb1462009-12-18 02:11:36 +0000725 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000726 SharedCtor();
temporal779f61c2008-08-13 03:15:00 +0000727 MergeFrom(from);
728}
729
kenton@google.comd37d46d2009-04-25 02:53:47 +0000730void FileDescriptorSet::SharedCtor() {
731 _cached_size_ = 0;
732 ::memset(_has_bits_, 0, sizeof(_has_bits_));
733}
734
temporal779f61c2008-08-13 03:15:00 +0000735FileDescriptorSet::~FileDescriptorSet() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000736 SharedDtor();
737}
738
739void FileDescriptorSet::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +0000740 if (this != default_instance_) {
temporal779f61c2008-08-13 03:15:00 +0000741 }
742}
743
kenton@google.comfccb1462009-12-18 02:11:36 +0000744void FileDescriptorSet::SetCachedSize(int size) const {
745 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
746 _cached_size_ = size;
747 GOOGLE_SAFE_CONCURRENT_WRITES_END();
748}
temporal779f61c2008-08-13 03:15:00 +0000749const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000750 protobuf_AssignDescriptorsOnce();
temporal779f61c2008-08-13 03:15:00 +0000751 return FileDescriptorSet_descriptor_;
752}
753
kenton@google.com24bf56f2008-09-24 20:31:01 +0000754const FileDescriptorSet& FileDescriptorSet::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000755 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +0000756}
757
758FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL;
759
temporal779f61c2008-08-13 03:15:00 +0000760FileDescriptorSet* FileDescriptorSet::New() const {
761 return new FileDescriptorSet;
762}
763
764void FileDescriptorSet::Clear() {
765 file_.Clear();
766 ::memset(_has_bits_, 0, sizeof(_has_bits_));
767 mutable_unknown_fields()->Clear();
768}
769
770bool FileDescriptorSet::MergePartialFromCodedStream(
771 ::google::protobuf::io::CodedInputStream* input) {
772#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
773 ::google::protobuf::uint32 tag;
774 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +0000775 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal779f61c2008-08-13 03:15:00 +0000776 // repeated .google.protobuf.FileDescriptorProto file = 1;
777 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +0000778 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +0000779 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +0000780 parse_file:
781 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
782 input, add_file()));
783 } else {
temporal779f61c2008-08-13 03:15:00 +0000784 goto handle_uninterpreted;
785 }
temporal779f61c2008-08-13 03:15:00 +0000786 if (input->ExpectTag(10)) goto parse_file;
787 if (input->ExpectAtEnd()) return true;
788 break;
789 }
790
791 default: {
792 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +0000793 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
794 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal779f61c2008-08-13 03:15:00 +0000795 return true;
796 }
797 DO_(::google::protobuf::internal::WireFormat::SkipField(
798 input, tag, mutable_unknown_fields()));
799 break;
800 }
801 }
802 }
803 return true;
804#undef DO_
805}
806
kenton@google.comd37d46d2009-04-25 02:53:47 +0000807void FileDescriptorSet::SerializeWithCachedSizes(
temporal779f61c2008-08-13 03:15:00 +0000808 ::google::protobuf::io::CodedOutputStream* output) const {
temporal779f61c2008-08-13 03:15:00 +0000809 // repeated .google.protobuf.FileDescriptorProto file = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000810 for (int i = 0; i < this->file_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +0000811 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +0000812 1, this->file(i), output);
temporal779f61c2008-08-13 03:15:00 +0000813 }
814
815 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000816 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
817 unknown_fields(), output);
temporal779f61c2008-08-13 03:15:00 +0000818 }
kenton@google.comd37d46d2009-04-25 02:53:47 +0000819}
820
821::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray(
822 ::google::protobuf::uint8* target) const {
823 // repeated .google.protobuf.FileDescriptorProto file = 1;
824 for (int i = 0; i < this->file_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +0000825 target = ::google::protobuf::internal::WireFormatLite::
826 WriteMessageNoVirtualToArray(
827 1, this->file(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000828 }
829
830 if (!unknown_fields().empty()) {
831 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
832 unknown_fields(), target);
833 }
834 return target;
temporal779f61c2008-08-13 03:15:00 +0000835}
836
837int FileDescriptorSet::ByteSize() const {
838 int total_size = 0;
839
840 // repeated .google.protobuf.FileDescriptorProto file = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000841 total_size += 1 * this->file_size();
842 for (int i = 0; i < this->file_size(); i++) {
temporal779f61c2008-08-13 03:15:00 +0000843 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +0000844 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal779f61c2008-08-13 03:15:00 +0000845 this->file(i));
846 }
847
848 if (!unknown_fields().empty()) {
849 total_size +=
850 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
851 unknown_fields());
852 }
kenton@google.comfccb1462009-12-18 02:11:36 +0000853 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal779f61c2008-08-13 03:15:00 +0000854 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +0000855 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal779f61c2008-08-13 03:15:00 +0000856 return total_size;
857}
858
859void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) {
860 GOOGLE_CHECK_NE(&from, this);
861 const FileDescriptorSet* source =
862 ::google::protobuf::internal::dynamic_cast_if_available<const FileDescriptorSet*>(
863 &from);
864 if (source == NULL) {
865 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
866 } else {
867 MergeFrom(*source);
868 }
869}
870
871void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
872 GOOGLE_CHECK_NE(&from, this);
873 file_.MergeFrom(from.file_);
874 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
875}
876
877void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) {
878 if (&from == this) return;
879 Clear();
880 MergeFrom(from);
881}
882
883void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
884 if (&from == this) return;
885 Clear();
886 MergeFrom(from);
887}
888
kenton@google.comceb561d2009-06-25 19:05:36 +0000889bool FileDescriptorSet::IsInitialized() const {
890
891 for (int i = 0; i < file_size(); i++) {
892 if (!this->file(i).IsInitialized()) return false;
893 }
894 return true;
895}
896
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000897void FileDescriptorSet::Swap(FileDescriptorSet* other) {
898 if (other != this) {
899 file_.Swap(&other->file_);
900 std::swap(_has_bits_[0], other->_has_bits_[0]);
901 _unknown_fields_.Swap(&other->_unknown_fields_);
902 std::swap(_cached_size_, other->_cached_size_);
903 }
904}
905
kenton@google.com80b1d622009-07-29 01:13:20 +0000906::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const {
907 protobuf_AssignDescriptorsOnce();
908 ::google::protobuf::Metadata metadata;
909 metadata.descriptor = FileDescriptorSet_descriptor_;
910 metadata.reflection = FileDescriptorSet_reflection_;
911 return metadata;
temporal779f61c2008-08-13 03:15:00 +0000912}
913
temporal779f61c2008-08-13 03:15:00 +0000914
915// ===================================================================
916
kenton@google.comcfa2d8a2009-04-18 00:02:12 +0000917#ifndef _MSC_VER
918const int FileDescriptorProto::kNameFieldNumber;
919const int FileDescriptorProto::kPackageFieldNumber;
920const int FileDescriptorProto::kDependencyFieldNumber;
921const int FileDescriptorProto::kMessageTypeFieldNumber;
922const int FileDescriptorProto::kEnumTypeFieldNumber;
923const int FileDescriptorProto::kServiceFieldNumber;
924const int FileDescriptorProto::kExtensionFieldNumber;
925const int FileDescriptorProto::kOptionsFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000926const int FileDescriptorProto::kSourceCodeInfoFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +0000927#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +0000928
kenton@google.com573989f2009-10-30 22:02:17 +0000929FileDescriptorProto::FileDescriptorProto()
kenton@google.comfccb1462009-12-18 02:11:36 +0000930 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000931 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +0000932}
933
kenton@google.com80b1d622009-07-29 01:13:20 +0000934void FileDescriptorProto::InitAsDefaultInstance() {
935 options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000936 source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(&::google::protobuf::SourceCodeInfo::default_instance());
temporal40ee5512008-07-10 02:12:20 +0000937}
938
kenton@google.com573989f2009-10-30 22:02:17 +0000939FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
kenton@google.comfccb1462009-12-18 02:11:36 +0000940 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000941 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +0000942 MergeFrom(from);
943}
944
kenton@google.comd37d46d2009-04-25 02:53:47 +0000945void FileDescriptorProto::SharedCtor() {
946 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000947 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
948 package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000949 options_ = NULL;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000950 source_code_info_ = NULL;
kenton@google.comd37d46d2009-04-25 02:53:47 +0000951 ::memset(_has_bits_, 0, sizeof(_has_bits_));
952}
953
temporal40ee5512008-07-10 02:12:20 +0000954FileDescriptorProto::~FileDescriptorProto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000955 SharedDtor();
956}
957
958void FileDescriptorProto::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +0000959 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +0000960 delete name_;
961 }
liujisi@google.com33165fe2010-11-02 13:14:58 +0000962 if (package_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +0000963 delete package_;
964 }
kenton@google.com24bf56f2008-09-24 20:31:01 +0000965 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +0000966 delete options_;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000967 delete source_code_info_;
temporal40ee5512008-07-10 02:12:20 +0000968 }
969}
970
kenton@google.comfccb1462009-12-18 02:11:36 +0000971void FileDescriptorProto::SetCachedSize(int size) const {
972 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
973 _cached_size_ = size;
974 GOOGLE_SAFE_CONCURRENT_WRITES_END();
975}
temporal40ee5512008-07-10 02:12:20 +0000976const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000977 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +0000978 return FileDescriptorProto_descriptor_;
979}
980
kenton@google.com24bf56f2008-09-24 20:31:01 +0000981const FileDescriptorProto& FileDescriptorProto::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000982 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +0000983}
984
985FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL;
986
temporal40ee5512008-07-10 02:12:20 +0000987FileDescriptorProto* FileDescriptorProto::New() const {
988 return new FileDescriptorProto;
989}
990
991void FileDescriptorProto::Clear() {
992 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +0000993 if (has_name()) {
994 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +0000995 name_->clear();
996 }
997 }
liujisi@google.com33165fe2010-11-02 13:14:58 +0000998 if (has_package()) {
999 if (package_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00001000 package_->clear();
1001 }
1002 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001003 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001004 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
1005 }
1006 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001007 if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
1008 if (has_source_code_info()) {
1009 if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear();
1010 }
1011 }
temporal40ee5512008-07-10 02:12:20 +00001012 dependency_.Clear();
1013 message_type_.Clear();
1014 enum_type_.Clear();
1015 service_.Clear();
1016 extension_.Clear();
1017 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1018 mutable_unknown_fields()->Clear();
1019}
1020
1021bool FileDescriptorProto::MergePartialFromCodedStream(
1022 ::google::protobuf::io::CodedInputStream* input) {
1023#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1024 ::google::protobuf::uint32 tag;
1025 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001026 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00001027 // optional string name = 1;
1028 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001029 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001030 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001031 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1032 input, this->mutable_name()));
1033 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1034 this->name().data(), this->name().length(),
1035 ::google::protobuf::internal::WireFormat::PARSE);
1036 } else {
temporal40ee5512008-07-10 02:12:20 +00001037 goto handle_uninterpreted;
1038 }
temporal40ee5512008-07-10 02:12:20 +00001039 if (input->ExpectTag(18)) goto parse_package;
1040 break;
1041 }
1042
1043 // optional string package = 2;
1044 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001045 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001046 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001047 parse_package:
1048 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1049 input, this->mutable_package()));
1050 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1051 this->package().data(), this->package().length(),
1052 ::google::protobuf::internal::WireFormat::PARSE);
1053 } else {
temporal40ee5512008-07-10 02:12:20 +00001054 goto handle_uninterpreted;
1055 }
temporal40ee5512008-07-10 02:12:20 +00001056 if (input->ExpectTag(26)) goto parse_dependency;
1057 break;
1058 }
1059
1060 // repeated string dependency = 3;
1061 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001062 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001063 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001064 parse_dependency:
1065 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1066 input, this->add_dependency()));
1067 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1068 this->dependency(0).data(), this->dependency(0).length(),
1069 ::google::protobuf::internal::WireFormat::PARSE);
1070 } else {
temporal40ee5512008-07-10 02:12:20 +00001071 goto handle_uninterpreted;
1072 }
temporal40ee5512008-07-10 02:12:20 +00001073 if (input->ExpectTag(26)) goto parse_dependency;
1074 if (input->ExpectTag(34)) goto parse_message_type;
1075 break;
1076 }
1077
1078 // repeated .google.protobuf.DescriptorProto message_type = 4;
1079 case 4: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001080 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001081 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001082 parse_message_type:
1083 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1084 input, add_message_type()));
1085 } else {
temporal40ee5512008-07-10 02:12:20 +00001086 goto handle_uninterpreted;
1087 }
temporal40ee5512008-07-10 02:12:20 +00001088 if (input->ExpectTag(34)) goto parse_message_type;
1089 if (input->ExpectTag(42)) goto parse_enum_type;
1090 break;
1091 }
1092
1093 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
1094 case 5: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001095 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001096 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001097 parse_enum_type:
1098 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1099 input, add_enum_type()));
1100 } else {
temporal40ee5512008-07-10 02:12:20 +00001101 goto handle_uninterpreted;
1102 }
temporal40ee5512008-07-10 02:12:20 +00001103 if (input->ExpectTag(42)) goto parse_enum_type;
1104 if (input->ExpectTag(50)) goto parse_service;
1105 break;
1106 }
1107
1108 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
1109 case 6: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001110 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001111 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001112 parse_service:
1113 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1114 input, add_service()));
1115 } else {
temporal40ee5512008-07-10 02:12:20 +00001116 goto handle_uninterpreted;
1117 }
temporal40ee5512008-07-10 02:12:20 +00001118 if (input->ExpectTag(50)) goto parse_service;
1119 if (input->ExpectTag(58)) goto parse_extension;
1120 break;
1121 }
1122
1123 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
1124 case 7: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001125 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001126 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001127 parse_extension:
1128 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1129 input, add_extension()));
1130 } else {
temporal40ee5512008-07-10 02:12:20 +00001131 goto handle_uninterpreted;
1132 }
temporal40ee5512008-07-10 02:12:20 +00001133 if (input->ExpectTag(58)) goto parse_extension;
1134 if (input->ExpectTag(66)) goto parse_options;
1135 break;
1136 }
1137
1138 // optional .google.protobuf.FileOptions options = 8;
1139 case 8: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001140 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001141 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001142 parse_options:
1143 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1144 input, mutable_options()));
1145 } else {
temporal40ee5512008-07-10 02:12:20 +00001146 goto handle_uninterpreted;
1147 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001148 if (input->ExpectTag(74)) goto parse_source_code_info;
1149 break;
1150 }
1151
1152 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1153 case 9: {
1154 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1155 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1156 parse_source_code_info:
1157 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1158 input, mutable_source_code_info()));
1159 } else {
1160 goto handle_uninterpreted;
1161 }
temporal40ee5512008-07-10 02:12:20 +00001162 if (input->ExpectAtEnd()) return true;
1163 break;
1164 }
1165
1166 default: {
1167 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00001168 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1169 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00001170 return true;
1171 }
1172 DO_(::google::protobuf::internal::WireFormat::SkipField(
1173 input, tag, mutable_unknown_fields()));
1174 break;
1175 }
1176 }
1177 }
1178 return true;
1179#undef DO_
1180}
1181
kenton@google.comd37d46d2009-04-25 02:53:47 +00001182void FileDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00001183 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00001184 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001185 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001186 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1187 this->name().data(), this->name().length(),
1188 ::google::protobuf::internal::WireFormat::SERIALIZE);
1189 ::google::protobuf::internal::WireFormatLite::WriteString(
1190 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00001191 }
1192
1193 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001194 if (has_package()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001195 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1196 this->package().data(), this->package().length(),
1197 ::google::protobuf::internal::WireFormat::SERIALIZE);
1198 ::google::protobuf::internal::WireFormatLite::WriteString(
1199 2, this->package(), output);
temporal40ee5512008-07-10 02:12:20 +00001200 }
1201
1202 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001203 for (int i = 0; i < this->dependency_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001204 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1205 this->dependency(i).data(), this->dependency(i).length(),
1206 ::google::protobuf::internal::WireFormat::SERIALIZE);
1207 ::google::protobuf::internal::WireFormatLite::WriteString(
1208 3, this->dependency(i), output);
temporal40ee5512008-07-10 02:12:20 +00001209 }
1210
1211 // repeated .google.protobuf.DescriptorProto message_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001212 for (int i = 0; i < this->message_type_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001213 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001214 4, this->message_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001215 }
1216
1217 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001218 for (int i = 0; i < this->enum_type_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001219 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001220 5, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001221 }
1222
1223 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001224 for (int i = 0; i < this->service_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001225 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001226 6, this->service(i), output);
temporal40ee5512008-07-10 02:12:20 +00001227 }
1228
1229 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001230 for (int i = 0; i < this->extension_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001231 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001232 7, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00001233 }
1234
1235 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001236 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001237 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001238 8, this->options(), output);
temporal40ee5512008-07-10 02:12:20 +00001239 }
1240
liujisi@google.com33165fe2010-11-02 13:14:58 +00001241 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1242 if (has_source_code_info()) {
1243 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1244 9, this->source_code_info(), output);
1245 }
1246
temporal40ee5512008-07-10 02:12:20 +00001247 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001248 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1249 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00001250 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00001251}
1252
1253::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray(
1254 ::google::protobuf::uint8* target) const {
1255 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001256 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001257 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1258 this->name().data(), this->name().length(),
1259 ::google::protobuf::internal::WireFormat::SERIALIZE);
1260 target =
1261 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1262 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001263 }
1264
1265 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001266 if (has_package()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001267 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1268 this->package().data(), this->package().length(),
1269 ::google::protobuf::internal::WireFormat::SERIALIZE);
1270 target =
1271 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1272 2, this->package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001273 }
1274
1275 // repeated string dependency = 3;
1276 for (int i = 0; i < this->dependency_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001277 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1278 this->dependency(i).data(), this->dependency(i).length(),
1279 ::google::protobuf::internal::WireFormat::SERIALIZE);
1280 target = ::google::protobuf::internal::WireFormatLite::
1281 WriteStringToArray(3, this->dependency(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001282 }
1283
1284 // repeated .google.protobuf.DescriptorProto message_type = 4;
1285 for (int i = 0; i < this->message_type_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001286 target = ::google::protobuf::internal::WireFormatLite::
1287 WriteMessageNoVirtualToArray(
1288 4, this->message_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001289 }
1290
1291 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
1292 for (int i = 0; i < this->enum_type_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001293 target = ::google::protobuf::internal::WireFormatLite::
1294 WriteMessageNoVirtualToArray(
1295 5, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001296 }
1297
1298 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
1299 for (int i = 0; i < this->service_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001300 target = ::google::protobuf::internal::WireFormatLite::
1301 WriteMessageNoVirtualToArray(
1302 6, this->service(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001303 }
1304
1305 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
1306 for (int i = 0; i < this->extension_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001307 target = ::google::protobuf::internal::WireFormatLite::
1308 WriteMessageNoVirtualToArray(
1309 7, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001310 }
1311
1312 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001313 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001314 target = ::google::protobuf::internal::WireFormatLite::
1315 WriteMessageNoVirtualToArray(
1316 8, this->options(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001317 }
1318
liujisi@google.com33165fe2010-11-02 13:14:58 +00001319 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1320 if (has_source_code_info()) {
1321 target = ::google::protobuf::internal::WireFormatLite::
1322 WriteMessageNoVirtualToArray(
1323 9, this->source_code_info(), target);
1324 }
1325
kenton@google.comd37d46d2009-04-25 02:53:47 +00001326 if (!unknown_fields().empty()) {
1327 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1328 unknown_fields(), target);
1329 }
1330 return target;
temporal40ee5512008-07-10 02:12:20 +00001331}
1332
1333int FileDescriptorProto::ByteSize() const {
1334 int total_size = 0;
1335
1336 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1337 // optional string name = 1;
1338 if (has_name()) {
1339 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001340 ::google::protobuf::internal::WireFormatLite::StringSize(
1341 this->name());
temporal40ee5512008-07-10 02:12:20 +00001342 }
1343
1344 // optional string package = 2;
1345 if (has_package()) {
1346 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001347 ::google::protobuf::internal::WireFormatLite::StringSize(
1348 this->package());
temporal40ee5512008-07-10 02:12:20 +00001349 }
1350
1351 // optional .google.protobuf.FileOptions options = 8;
1352 if (has_options()) {
1353 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001354 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001355 this->options());
1356 }
1357
1358 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001359 if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
1360 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1361 if (has_source_code_info()) {
1362 total_size += 1 +
1363 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
1364 this->source_code_info());
1365 }
1366
1367 }
temporal40ee5512008-07-10 02:12:20 +00001368 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001369 total_size += 1 * this->dependency_size();
1370 for (int i = 0; i < this->dependency_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001371 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
temporal40ee5512008-07-10 02:12:20 +00001372 this->dependency(i));
1373 }
1374
1375 // repeated .google.protobuf.DescriptorProto message_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001376 total_size += 1 * this->message_type_size();
1377 for (int i = 0; i < this->message_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001378 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001379 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001380 this->message_type(i));
1381 }
1382
1383 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001384 total_size += 1 * this->enum_type_size();
1385 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001386 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001387 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001388 this->enum_type(i));
1389 }
1390
1391 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001392 total_size += 1 * this->service_size();
1393 for (int i = 0; i < this->service_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001394 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001395 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001396 this->service(i));
1397 }
1398
1399 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001400 total_size += 1 * this->extension_size();
1401 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001402 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001403 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001404 this->extension(i));
1405 }
1406
1407 if (!unknown_fields().empty()) {
1408 total_size +=
1409 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1410 unknown_fields());
1411 }
kenton@google.comfccb1462009-12-18 02:11:36 +00001412 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00001413 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00001414 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00001415 return total_size;
1416}
1417
1418void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
1419 GOOGLE_CHECK_NE(&from, this);
1420 const FileDescriptorProto* source =
1421 ::google::protobuf::internal::dynamic_cast_if_available<const FileDescriptorProto*>(
1422 &from);
1423 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001424 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001425 } else {
1426 MergeFrom(*source);
1427 }
1428}
1429
1430void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
1431 GOOGLE_CHECK_NE(&from, this);
1432 dependency_.MergeFrom(from.dependency_);
1433 message_type_.MergeFrom(from.message_type_);
1434 enum_type_.MergeFrom(from.enum_type_);
1435 service_.MergeFrom(from.service_);
1436 extension_.MergeFrom(from.extension_);
1437 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001438 if (from.has_name()) {
temporal40ee5512008-07-10 02:12:20 +00001439 set_name(from.name());
1440 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001441 if (from.has_package()) {
temporal40ee5512008-07-10 02:12:20 +00001442 set_package(from.package());
1443 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001444 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001445 mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options());
1446 }
1447 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001448 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
1449 if (from.has_source_code_info()) {
1450 mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info());
1451 }
1452 }
temporal40ee5512008-07-10 02:12:20 +00001453 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1454}
1455
1456void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
1457 if (&from == this) return;
1458 Clear();
1459 MergeFrom(from);
1460}
1461
1462void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
1463 if (&from == this) return;
1464 Clear();
1465 MergeFrom(from);
1466}
1467
1468bool FileDescriptorProto::IsInitialized() const {
1469
kenton@google.com24bf56f2008-09-24 20:31:01 +00001470 for (int i = 0; i < message_type_size(); i++) {
1471 if (!this->message_type(i).IsInitialized()) return false;
1472 }
1473 for (int i = 0; i < enum_type_size(); i++) {
1474 if (!this->enum_type(i).IsInitialized()) return false;
1475 }
1476 for (int i = 0; i < service_size(); i++) {
1477 if (!this->service(i).IsInitialized()) return false;
1478 }
1479 for (int i = 0; i < extension_size(); i++) {
1480 if (!this->extension(i).IsInitialized()) return false;
1481 }
1482 if (has_options()) {
1483 if (!this->options().IsInitialized()) return false;
1484 }
temporal40ee5512008-07-10 02:12:20 +00001485 return true;
1486}
1487
kenton@google.comceb561d2009-06-25 19:05:36 +00001488void FileDescriptorProto::Swap(FileDescriptorProto* other) {
1489 if (other != this) {
1490 std::swap(name_, other->name_);
1491 std::swap(package_, other->package_);
1492 dependency_.Swap(&other->dependency_);
1493 message_type_.Swap(&other->message_type_);
1494 enum_type_.Swap(&other->enum_type_);
1495 service_.Swap(&other->service_);
1496 extension_.Swap(&other->extension_);
1497 std::swap(options_, other->options_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001498 std::swap(source_code_info_, other->source_code_info_);
kenton@google.comceb561d2009-06-25 19:05:36 +00001499 std::swap(_has_bits_[0], other->_has_bits_[0]);
1500 _unknown_fields_.Swap(&other->_unknown_fields_);
1501 std::swap(_cached_size_, other->_cached_size_);
1502 }
1503}
1504
kenton@google.com80b1d622009-07-29 01:13:20 +00001505::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const {
1506 protobuf_AssignDescriptorsOnce();
1507 ::google::protobuf::Metadata metadata;
1508 metadata.descriptor = FileDescriptorProto_descriptor_;
1509 metadata.reflection = FileDescriptorProto_reflection_;
1510 return metadata;
temporal40ee5512008-07-10 02:12:20 +00001511}
1512
temporal40ee5512008-07-10 02:12:20 +00001513
1514// ===================================================================
1515
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001516#ifndef _MSC_VER
1517const int DescriptorProto_ExtensionRange::kStartFieldNumber;
1518const int DescriptorProto_ExtensionRange::kEndFieldNumber;
1519#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00001520
kenton@google.com573989f2009-10-30 22:02:17 +00001521DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange()
kenton@google.comfccb1462009-12-18 02:11:36 +00001522 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001523 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00001524}
1525
kenton@google.com80b1d622009-07-29 01:13:20 +00001526void DescriptorProto_ExtensionRange::InitAsDefaultInstance() {
1527}
kenton@google.com24bf56f2008-09-24 20:31:01 +00001528
kenton@google.com573989f2009-10-30 22:02:17 +00001529DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00001530 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001531 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00001532 MergeFrom(from);
1533}
1534
kenton@google.comd37d46d2009-04-25 02:53:47 +00001535void DescriptorProto_ExtensionRange::SharedCtor() {
1536 _cached_size_ = 0;
1537 start_ = 0;
1538 end_ = 0;
1539 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1540}
1541
temporal40ee5512008-07-10 02:12:20 +00001542DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001543 SharedDtor();
1544}
1545
1546void DescriptorProto_ExtensionRange::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00001547 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001548 }
1549}
1550
kenton@google.comfccb1462009-12-18 02:11:36 +00001551void DescriptorProto_ExtensionRange::SetCachedSize(int size) const {
1552 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1553 _cached_size_ = size;
1554 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1555}
temporal40ee5512008-07-10 02:12:20 +00001556const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001557 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00001558 return DescriptorProto_ExtensionRange_descriptor_;
1559}
1560
kenton@google.com24bf56f2008-09-24 20:31:01 +00001561const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001562 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001563}
1564
1565DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL;
1566
temporal40ee5512008-07-10 02:12:20 +00001567DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New() const {
1568 return new DescriptorProto_ExtensionRange;
1569}
1570
1571void DescriptorProto_ExtensionRange::Clear() {
1572 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1573 start_ = 0;
1574 end_ = 0;
1575 }
1576 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1577 mutable_unknown_fields()->Clear();
1578}
1579
1580bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream(
1581 ::google::protobuf::io::CodedInputStream* input) {
1582#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1583 ::google::protobuf::uint32 tag;
1584 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001585 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00001586 // optional int32 start = 1;
1587 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001588 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001589 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001590 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1591 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1592 input, &start_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00001593 set_has_start();
kenton@google.comfccb1462009-12-18 02:11:36 +00001594 } else {
temporal40ee5512008-07-10 02:12:20 +00001595 goto handle_uninterpreted;
1596 }
temporal40ee5512008-07-10 02:12:20 +00001597 if (input->ExpectTag(16)) goto parse_end;
1598 break;
1599 }
1600
1601 // optional int32 end = 2;
1602 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001603 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001604 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001605 parse_end:
1606 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1607 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1608 input, &end_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00001609 set_has_end();
kenton@google.comfccb1462009-12-18 02:11:36 +00001610 } else {
temporal40ee5512008-07-10 02:12:20 +00001611 goto handle_uninterpreted;
1612 }
temporal40ee5512008-07-10 02:12:20 +00001613 if (input->ExpectAtEnd()) return true;
1614 break;
1615 }
1616
1617 default: {
1618 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00001619 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1620 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00001621 return true;
1622 }
1623 DO_(::google::protobuf::internal::WireFormat::SkipField(
1624 input, tag, mutable_unknown_fields()));
1625 break;
1626 }
1627 }
1628 }
1629 return true;
1630#undef DO_
1631}
1632
kenton@google.comd37d46d2009-04-25 02:53:47 +00001633void DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00001634 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00001635 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001636 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001637 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output);
temporal40ee5512008-07-10 02:12:20 +00001638 }
1639
1640 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001641 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001642 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output);
temporal40ee5512008-07-10 02:12:20 +00001643 }
1644
1645 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001646 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1647 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00001648 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00001649}
1650
1651::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray(
1652 ::google::protobuf::uint8* target) const {
1653 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001654 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001655 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001656 }
1657
1658 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001659 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001660 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001661 }
1662
1663 if (!unknown_fields().empty()) {
1664 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1665 unknown_fields(), target);
1666 }
1667 return target;
temporal40ee5512008-07-10 02:12:20 +00001668}
1669
1670int DescriptorProto_ExtensionRange::ByteSize() const {
1671 int total_size = 0;
1672
1673 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1674 // optional int32 start = 1;
1675 if (has_start()) {
1676 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001677 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00001678 this->start());
1679 }
1680
1681 // optional int32 end = 2;
1682 if (has_end()) {
1683 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001684 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00001685 this->end());
1686 }
1687
1688 }
1689 if (!unknown_fields().empty()) {
1690 total_size +=
1691 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1692 unknown_fields());
1693 }
kenton@google.comfccb1462009-12-18 02:11:36 +00001694 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00001695 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00001696 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00001697 return total_size;
1698}
1699
1700void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) {
1701 GOOGLE_CHECK_NE(&from, this);
1702 const DescriptorProto_ExtensionRange* source =
1703 ::google::protobuf::internal::dynamic_cast_if_available<const DescriptorProto_ExtensionRange*>(
1704 &from);
1705 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001706 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001707 } else {
1708 MergeFrom(*source);
1709 }
1710}
1711
1712void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
1713 GOOGLE_CHECK_NE(&from, this);
1714 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001715 if (from.has_start()) {
temporal40ee5512008-07-10 02:12:20 +00001716 set_start(from.start());
1717 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001718 if (from.has_end()) {
temporal40ee5512008-07-10 02:12:20 +00001719 set_end(from.end());
1720 }
1721 }
1722 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1723}
1724
1725void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) {
1726 if (&from == this) return;
1727 Clear();
1728 MergeFrom(from);
1729}
1730
1731void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) {
1732 if (&from == this) return;
1733 Clear();
1734 MergeFrom(from);
1735}
1736
kenton@google.comceb561d2009-06-25 19:05:36 +00001737bool DescriptorProto_ExtensionRange::IsInitialized() const {
1738
1739 return true;
1740}
1741
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001742void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) {
1743 if (other != this) {
1744 std::swap(start_, other->start_);
1745 std::swap(end_, other->end_);
1746 std::swap(_has_bits_[0], other->_has_bits_[0]);
1747 _unknown_fields_.Swap(&other->_unknown_fields_);
1748 std::swap(_cached_size_, other->_cached_size_);
1749 }
1750}
1751
kenton@google.com80b1d622009-07-29 01:13:20 +00001752::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const {
1753 protobuf_AssignDescriptorsOnce();
1754 ::google::protobuf::Metadata metadata;
1755 metadata.descriptor = DescriptorProto_ExtensionRange_descriptor_;
1756 metadata.reflection = DescriptorProto_ExtensionRange_reflection_;
1757 return metadata;
temporal40ee5512008-07-10 02:12:20 +00001758}
1759
temporal40ee5512008-07-10 02:12:20 +00001760
1761// -------------------------------------------------------------------
1762
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001763#ifndef _MSC_VER
1764const int DescriptorProto::kNameFieldNumber;
1765const int DescriptorProto::kFieldFieldNumber;
1766const int DescriptorProto::kExtensionFieldNumber;
1767const int DescriptorProto::kNestedTypeFieldNumber;
1768const int DescriptorProto::kEnumTypeFieldNumber;
1769const int DescriptorProto::kExtensionRangeFieldNumber;
1770const int DescriptorProto::kOptionsFieldNumber;
1771#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00001772
kenton@google.com573989f2009-10-30 22:02:17 +00001773DescriptorProto::DescriptorProto()
kenton@google.comfccb1462009-12-18 02:11:36 +00001774 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001775 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00001776}
1777
kenton@google.com80b1d622009-07-29 01:13:20 +00001778void DescriptorProto::InitAsDefaultInstance() {
1779 options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00001780}
1781
kenton@google.com573989f2009-10-30 22:02:17 +00001782DescriptorProto::DescriptorProto(const DescriptorProto& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00001783 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001784 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00001785 MergeFrom(from);
1786}
1787
kenton@google.comd37d46d2009-04-25 02:53:47 +00001788void DescriptorProto::SharedCtor() {
1789 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001790 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001791 options_ = NULL;
1792 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1793}
1794
temporal40ee5512008-07-10 02:12:20 +00001795DescriptorProto::~DescriptorProto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001796 SharedDtor();
1797}
1798
1799void DescriptorProto::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001800 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00001801 delete name_;
1802 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00001803 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001804 delete options_;
1805 }
1806}
1807
kenton@google.comfccb1462009-12-18 02:11:36 +00001808void DescriptorProto::SetCachedSize(int size) const {
1809 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1810 _cached_size_ = size;
1811 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1812}
temporal40ee5512008-07-10 02:12:20 +00001813const ::google::protobuf::Descriptor* DescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001814 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00001815 return DescriptorProto_descriptor_;
1816}
1817
kenton@google.com24bf56f2008-09-24 20:31:01 +00001818const DescriptorProto& DescriptorProto::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001819 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001820}
1821
1822DescriptorProto* DescriptorProto::default_instance_ = NULL;
1823
temporal40ee5512008-07-10 02:12:20 +00001824DescriptorProto* DescriptorProto::New() const {
1825 return new DescriptorProto;
1826}
1827
1828void DescriptorProto::Clear() {
1829 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001830 if (has_name()) {
1831 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00001832 name_->clear();
1833 }
1834 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001835 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001836 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
1837 }
1838 }
1839 field_.Clear();
1840 extension_.Clear();
1841 nested_type_.Clear();
1842 enum_type_.Clear();
1843 extension_range_.Clear();
1844 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1845 mutable_unknown_fields()->Clear();
1846}
1847
1848bool DescriptorProto::MergePartialFromCodedStream(
1849 ::google::protobuf::io::CodedInputStream* input) {
1850#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1851 ::google::protobuf::uint32 tag;
1852 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001853 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00001854 // optional string name = 1;
1855 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001856 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001857 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001858 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1859 input, this->mutable_name()));
1860 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1861 this->name().data(), this->name().length(),
1862 ::google::protobuf::internal::WireFormat::PARSE);
1863 } else {
temporal40ee5512008-07-10 02:12:20 +00001864 goto handle_uninterpreted;
1865 }
temporal40ee5512008-07-10 02:12:20 +00001866 if (input->ExpectTag(18)) goto parse_field;
1867 break;
1868 }
1869
1870 // repeated .google.protobuf.FieldDescriptorProto field = 2;
1871 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001872 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001873 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001874 parse_field:
1875 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1876 input, add_field()));
1877 } else {
temporal40ee5512008-07-10 02:12:20 +00001878 goto handle_uninterpreted;
1879 }
temporal40ee5512008-07-10 02:12:20 +00001880 if (input->ExpectTag(18)) goto parse_field;
1881 if (input->ExpectTag(26)) goto parse_nested_type;
1882 break;
1883 }
1884
1885 // repeated .google.protobuf.DescriptorProto nested_type = 3;
1886 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001887 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001888 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001889 parse_nested_type:
1890 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1891 input, add_nested_type()));
1892 } else {
temporal40ee5512008-07-10 02:12:20 +00001893 goto handle_uninterpreted;
1894 }
temporal40ee5512008-07-10 02:12:20 +00001895 if (input->ExpectTag(26)) goto parse_nested_type;
1896 if (input->ExpectTag(34)) goto parse_enum_type;
1897 break;
1898 }
1899
1900 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
1901 case 4: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001902 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001903 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001904 parse_enum_type:
1905 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1906 input, add_enum_type()));
1907 } else {
temporal40ee5512008-07-10 02:12:20 +00001908 goto handle_uninterpreted;
1909 }
temporal40ee5512008-07-10 02:12:20 +00001910 if (input->ExpectTag(34)) goto parse_enum_type;
1911 if (input->ExpectTag(42)) goto parse_extension_range;
1912 break;
1913 }
1914
1915 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
1916 case 5: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001917 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001918 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001919 parse_extension_range:
1920 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1921 input, add_extension_range()));
1922 } else {
temporal40ee5512008-07-10 02:12:20 +00001923 goto handle_uninterpreted;
1924 }
temporal40ee5512008-07-10 02:12:20 +00001925 if (input->ExpectTag(42)) goto parse_extension_range;
1926 if (input->ExpectTag(50)) goto parse_extension;
1927 break;
1928 }
1929
1930 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
1931 case 6: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001932 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001933 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001934 parse_extension:
1935 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1936 input, add_extension()));
1937 } else {
temporal40ee5512008-07-10 02:12:20 +00001938 goto handle_uninterpreted;
1939 }
temporal40ee5512008-07-10 02:12:20 +00001940 if (input->ExpectTag(50)) goto parse_extension;
1941 if (input->ExpectTag(58)) goto parse_options;
1942 break;
1943 }
1944
1945 // optional .google.protobuf.MessageOptions options = 7;
1946 case 7: {
kenton@google.comfccb1462009-12-18 02:11:36 +00001947 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001948 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001949 parse_options:
1950 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1951 input, mutable_options()));
1952 } else {
temporal40ee5512008-07-10 02:12:20 +00001953 goto handle_uninterpreted;
1954 }
temporal40ee5512008-07-10 02:12:20 +00001955 if (input->ExpectAtEnd()) return true;
1956 break;
1957 }
1958
1959 default: {
1960 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00001961 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1962 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00001963 return true;
1964 }
1965 DO_(::google::protobuf::internal::WireFormat::SkipField(
1966 input, tag, mutable_unknown_fields()));
1967 break;
1968 }
1969 }
1970 }
1971 return true;
1972#undef DO_
1973}
1974
kenton@google.comd37d46d2009-04-25 02:53:47 +00001975void DescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00001976 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00001977 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001978 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001979 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1980 this->name().data(), this->name().length(),
1981 ::google::protobuf::internal::WireFormat::SERIALIZE);
1982 ::google::protobuf::internal::WireFormatLite::WriteString(
1983 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00001984 }
1985
1986 // repeated .google.protobuf.FieldDescriptorProto field = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001987 for (int i = 0; i < this->field_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001988 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001989 2, this->field(i), output);
temporal40ee5512008-07-10 02:12:20 +00001990 }
1991
1992 // repeated .google.protobuf.DescriptorProto nested_type = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001993 for (int i = 0; i < this->nested_type_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001994 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001995 3, this->nested_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001996 }
1997
1998 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001999 for (int i = 0; i < this->enum_type_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002000 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00002001 4, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00002002 }
2003
2004 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002005 for (int i = 0; i < this->extension_range_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002006 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00002007 5, this->extension_range(i), output);
temporal40ee5512008-07-10 02:12:20 +00002008 }
2009
2010 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002011 for (int i = 0; i < this->extension_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002012 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00002013 6, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00002014 }
2015
2016 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002017 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002018 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00002019 7, this->options(), output);
temporal40ee5512008-07-10 02:12:20 +00002020 }
2021
2022 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002023 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2024 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00002025 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00002026}
2027
2028::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray(
2029 ::google::protobuf::uint8* target) const {
2030 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002031 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002032 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2033 this->name().data(), this->name().length(),
2034 ::google::protobuf::internal::WireFormat::SERIALIZE);
2035 target =
2036 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2037 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002038 }
2039
2040 // repeated .google.protobuf.FieldDescriptorProto field = 2;
2041 for (int i = 0; i < this->field_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002042 target = ::google::protobuf::internal::WireFormatLite::
2043 WriteMessageNoVirtualToArray(
2044 2, this->field(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002045 }
2046
2047 // repeated .google.protobuf.DescriptorProto nested_type = 3;
2048 for (int i = 0; i < this->nested_type_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002049 target = ::google::protobuf::internal::WireFormatLite::
2050 WriteMessageNoVirtualToArray(
2051 3, this->nested_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002052 }
2053
2054 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
2055 for (int i = 0; i < this->enum_type_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002056 target = ::google::protobuf::internal::WireFormatLite::
2057 WriteMessageNoVirtualToArray(
2058 4, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002059 }
2060
2061 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
2062 for (int i = 0; i < this->extension_range_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002063 target = ::google::protobuf::internal::WireFormatLite::
2064 WriteMessageNoVirtualToArray(
2065 5, this->extension_range(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002066 }
2067
2068 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
2069 for (int i = 0; i < this->extension_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002070 target = ::google::protobuf::internal::WireFormatLite::
2071 WriteMessageNoVirtualToArray(
2072 6, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002073 }
2074
2075 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002076 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002077 target = ::google::protobuf::internal::WireFormatLite::
2078 WriteMessageNoVirtualToArray(
2079 7, this->options(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002080 }
2081
2082 if (!unknown_fields().empty()) {
2083 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2084 unknown_fields(), target);
2085 }
2086 return target;
temporal40ee5512008-07-10 02:12:20 +00002087}
2088
2089int DescriptorProto::ByteSize() const {
2090 int total_size = 0;
2091
2092 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2093 // optional string name = 1;
2094 if (has_name()) {
2095 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002096 ::google::protobuf::internal::WireFormatLite::StringSize(
2097 this->name());
temporal40ee5512008-07-10 02:12:20 +00002098 }
2099
2100 // optional .google.protobuf.MessageOptions options = 7;
2101 if (has_options()) {
2102 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002103 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00002104 this->options());
2105 }
2106
2107 }
2108 // repeated .google.protobuf.FieldDescriptorProto field = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002109 total_size += 1 * this->field_size();
2110 for (int i = 0; i < this->field_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002111 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00002112 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00002113 this->field(i));
2114 }
2115
2116 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002117 total_size += 1 * this->extension_size();
2118 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002119 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00002120 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00002121 this->extension(i));
2122 }
2123
2124 // repeated .google.protobuf.DescriptorProto nested_type = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002125 total_size += 1 * this->nested_type_size();
2126 for (int i = 0; i < this->nested_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002127 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00002128 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00002129 this->nested_type(i));
2130 }
2131
2132 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002133 total_size += 1 * this->enum_type_size();
2134 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002135 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00002136 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00002137 this->enum_type(i));
2138 }
2139
2140 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002141 total_size += 1 * this->extension_range_size();
2142 for (int i = 0; i < this->extension_range_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002143 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00002144 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00002145 this->extension_range(i));
2146 }
2147
2148 if (!unknown_fields().empty()) {
2149 total_size +=
2150 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2151 unknown_fields());
2152 }
kenton@google.comfccb1462009-12-18 02:11:36 +00002153 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00002154 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00002155 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00002156 return total_size;
2157}
2158
2159void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
2160 GOOGLE_CHECK_NE(&from, this);
2161 const DescriptorProto* source =
2162 ::google::protobuf::internal::dynamic_cast_if_available<const DescriptorProto*>(
2163 &from);
2164 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002165 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002166 } else {
2167 MergeFrom(*source);
2168 }
2169}
2170
2171void DescriptorProto::MergeFrom(const DescriptorProto& from) {
2172 GOOGLE_CHECK_NE(&from, this);
2173 field_.MergeFrom(from.field_);
2174 extension_.MergeFrom(from.extension_);
2175 nested_type_.MergeFrom(from.nested_type_);
2176 enum_type_.MergeFrom(from.enum_type_);
2177 extension_range_.MergeFrom(from.extension_range_);
2178 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002179 if (from.has_name()) {
temporal40ee5512008-07-10 02:12:20 +00002180 set_name(from.name());
2181 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002182 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00002183 mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options());
2184 }
2185 }
2186 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2187}
2188
2189void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
2190 if (&from == this) return;
2191 Clear();
2192 MergeFrom(from);
2193}
2194
2195void DescriptorProto::CopyFrom(const DescriptorProto& from) {
2196 if (&from == this) return;
2197 Clear();
2198 MergeFrom(from);
2199}
2200
2201bool DescriptorProto::IsInitialized() const {
2202
kenton@google.com24bf56f2008-09-24 20:31:01 +00002203 for (int i = 0; i < field_size(); i++) {
2204 if (!this->field(i).IsInitialized()) return false;
2205 }
2206 for (int i = 0; i < extension_size(); i++) {
2207 if (!this->extension(i).IsInitialized()) return false;
2208 }
2209 for (int i = 0; i < nested_type_size(); i++) {
2210 if (!this->nested_type(i).IsInitialized()) return false;
2211 }
2212 for (int i = 0; i < enum_type_size(); i++) {
2213 if (!this->enum_type(i).IsInitialized()) return false;
2214 }
2215 if (has_options()) {
2216 if (!this->options().IsInitialized()) return false;
2217 }
temporal40ee5512008-07-10 02:12:20 +00002218 return true;
2219}
2220
kenton@google.comceb561d2009-06-25 19:05:36 +00002221void DescriptorProto::Swap(DescriptorProto* other) {
2222 if (other != this) {
2223 std::swap(name_, other->name_);
2224 field_.Swap(&other->field_);
2225 extension_.Swap(&other->extension_);
2226 nested_type_.Swap(&other->nested_type_);
2227 enum_type_.Swap(&other->enum_type_);
2228 extension_range_.Swap(&other->extension_range_);
2229 std::swap(options_, other->options_);
2230 std::swap(_has_bits_[0], other->_has_bits_[0]);
2231 _unknown_fields_.Swap(&other->_unknown_fields_);
2232 std::swap(_cached_size_, other->_cached_size_);
2233 }
2234}
2235
kenton@google.com80b1d622009-07-29 01:13:20 +00002236::google::protobuf::Metadata DescriptorProto::GetMetadata() const {
2237 protobuf_AssignDescriptorsOnce();
2238 ::google::protobuf::Metadata metadata;
2239 metadata.descriptor = DescriptorProto_descriptor_;
2240 metadata.reflection = DescriptorProto_reflection_;
2241 return metadata;
temporal40ee5512008-07-10 02:12:20 +00002242}
2243
temporal40ee5512008-07-10 02:12:20 +00002244
2245// ===================================================================
2246
2247const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002248 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002249 return FieldDescriptorProto_Type_descriptor_;
2250}
2251bool FieldDescriptorProto_Type_IsValid(int value) {
2252 switch(value) {
2253 case 1:
2254 case 2:
2255 case 3:
2256 case 4:
2257 case 5:
2258 case 6:
2259 case 7:
2260 case 8:
2261 case 9:
2262 case 10:
2263 case 11:
2264 case 12:
2265 case 13:
2266 case 14:
2267 case 15:
2268 case 16:
2269 case 17:
2270 case 18:
2271 return true;
2272 default:
2273 return false;
2274 }
2275}
2276
2277#ifndef _MSC_VER
2278const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
2279const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
2280const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64;
2281const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64;
2282const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32;
2283const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64;
2284const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32;
2285const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL;
2286const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING;
2287const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP;
2288const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE;
2289const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES;
2290const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32;
2291const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM;
2292const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32;
2293const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64;
2294const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32;
2295const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64;
2296const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
2297const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00002298const int FieldDescriptorProto::Type_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00002299#endif // _MSC_VER
2300const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002301 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002302 return FieldDescriptorProto_Label_descriptor_;
2303}
2304bool FieldDescriptorProto_Label_IsValid(int value) {
2305 switch(value) {
2306 case 1:
2307 case 2:
2308 case 3:
2309 return true;
2310 default:
2311 return false;
2312 }
2313}
2314
2315#ifndef _MSC_VER
2316const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
2317const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
2318const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED;
2319const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN;
2320const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00002321const int FieldDescriptorProto::Label_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00002322#endif // _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002323#ifndef _MSC_VER
2324const int FieldDescriptorProto::kNameFieldNumber;
2325const int FieldDescriptorProto::kNumberFieldNumber;
2326const int FieldDescriptorProto::kLabelFieldNumber;
2327const int FieldDescriptorProto::kTypeFieldNumber;
2328const int FieldDescriptorProto::kTypeNameFieldNumber;
2329const int FieldDescriptorProto::kExtendeeFieldNumber;
2330const int FieldDescriptorProto::kDefaultValueFieldNumber;
2331const int FieldDescriptorProto::kOptionsFieldNumber;
2332#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00002333
kenton@google.com573989f2009-10-30 22:02:17 +00002334FieldDescriptorProto::FieldDescriptorProto()
kenton@google.comfccb1462009-12-18 02:11:36 +00002335 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002336 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00002337}
2338
kenton@google.com80b1d622009-07-29 01:13:20 +00002339void FieldDescriptorProto::InitAsDefaultInstance() {
2340 options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002341}
2342
kenton@google.com573989f2009-10-30 22:02:17 +00002343FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00002344 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002345 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00002346 MergeFrom(from);
2347}
2348
kenton@google.comd37d46d2009-04-25 02:53:47 +00002349void FieldDescriptorProto::SharedCtor() {
2350 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002351 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002352 number_ = 0;
2353 label_ = 1;
2354 type_ = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002355 type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
2356 extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
2357 default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002358 options_ = NULL;
2359 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2360}
2361
temporal40ee5512008-07-10 02:12:20 +00002362FieldDescriptorProto::~FieldDescriptorProto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002363 SharedDtor();
2364}
2365
2366void FieldDescriptorProto::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002367 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002368 delete name_;
2369 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002370 if (type_name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002371 delete type_name_;
2372 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002373 if (extendee_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002374 delete extendee_;
2375 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002376 if (default_value_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002377 delete default_value_;
2378 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00002379 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002380 delete options_;
2381 }
2382}
2383
kenton@google.comfccb1462009-12-18 02:11:36 +00002384void FieldDescriptorProto::SetCachedSize(int size) const {
2385 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2386 _cached_size_ = size;
2387 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2388}
temporal40ee5512008-07-10 02:12:20 +00002389const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002390 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002391 return FieldDescriptorProto_descriptor_;
2392}
2393
kenton@google.com24bf56f2008-09-24 20:31:01 +00002394const FieldDescriptorProto& FieldDescriptorProto::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002395 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00002396}
2397
2398FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL;
2399
temporal40ee5512008-07-10 02:12:20 +00002400FieldDescriptorProto* FieldDescriptorProto::New() const {
2401 return new FieldDescriptorProto;
2402}
2403
2404void FieldDescriptorProto::Clear() {
2405 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002406 if (has_name()) {
2407 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002408 name_->clear();
2409 }
2410 }
2411 number_ = 0;
2412 label_ = 1;
2413 type_ = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002414 if (has_type_name()) {
2415 if (type_name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002416 type_name_->clear();
2417 }
2418 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002419 if (has_extendee()) {
2420 if (extendee_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002421 extendee_->clear();
2422 }
2423 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002424 if (has_default_value()) {
2425 if (default_value_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002426 default_value_->clear();
2427 }
2428 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002429 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00002430 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
2431 }
2432 }
2433 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2434 mutable_unknown_fields()->Clear();
2435}
2436
2437bool FieldDescriptorProto::MergePartialFromCodedStream(
2438 ::google::protobuf::io::CodedInputStream* input) {
2439#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2440 ::google::protobuf::uint32 tag;
2441 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002442 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00002443 // optional string name = 1;
2444 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002445 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002446 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002447 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2448 input, this->mutable_name()));
2449 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2450 this->name().data(), this->name().length(),
2451 ::google::protobuf::internal::WireFormat::PARSE);
2452 } else {
temporal40ee5512008-07-10 02:12:20 +00002453 goto handle_uninterpreted;
2454 }
temporal40ee5512008-07-10 02:12:20 +00002455 if (input->ExpectTag(18)) goto parse_extendee;
2456 break;
2457 }
2458
2459 // optional string extendee = 2;
2460 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002461 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002462 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002463 parse_extendee:
2464 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2465 input, this->mutable_extendee()));
2466 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2467 this->extendee().data(), this->extendee().length(),
2468 ::google::protobuf::internal::WireFormat::PARSE);
2469 } else {
temporal40ee5512008-07-10 02:12:20 +00002470 goto handle_uninterpreted;
2471 }
temporal40ee5512008-07-10 02:12:20 +00002472 if (input->ExpectTag(24)) goto parse_number;
2473 break;
2474 }
2475
2476 // optional int32 number = 3;
2477 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002478 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002479 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002480 parse_number:
2481 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2482 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2483 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00002484 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00002485 } else {
temporal40ee5512008-07-10 02:12:20 +00002486 goto handle_uninterpreted;
2487 }
temporal40ee5512008-07-10 02:12:20 +00002488 if (input->ExpectTag(32)) goto parse_label;
2489 break;
2490 }
2491
2492 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
2493 case 4: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002494 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002495 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002496 parse_label:
2497 int value;
2498 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2499 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
2500 input, &value)));
2501 if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) {
2502 set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value));
2503 } else {
2504 mutable_unknown_fields()->AddVarint(4, value);
2505 }
temporal40ee5512008-07-10 02:12:20 +00002506 } else {
kenton@google.comfccb1462009-12-18 02:11:36 +00002507 goto handle_uninterpreted;
temporal40ee5512008-07-10 02:12:20 +00002508 }
2509 if (input->ExpectTag(40)) goto parse_type;
2510 break;
2511 }
2512
2513 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
2514 case 5: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002515 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002516 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002517 parse_type:
2518 int value;
2519 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2520 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
2521 input, &value)));
2522 if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) {
2523 set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value));
2524 } else {
2525 mutable_unknown_fields()->AddVarint(5, value);
2526 }
temporal40ee5512008-07-10 02:12:20 +00002527 } else {
kenton@google.comfccb1462009-12-18 02:11:36 +00002528 goto handle_uninterpreted;
temporal40ee5512008-07-10 02:12:20 +00002529 }
2530 if (input->ExpectTag(50)) goto parse_type_name;
2531 break;
2532 }
2533
2534 // optional string type_name = 6;
2535 case 6: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002536 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002537 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002538 parse_type_name:
2539 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2540 input, this->mutable_type_name()));
2541 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2542 this->type_name().data(), this->type_name().length(),
2543 ::google::protobuf::internal::WireFormat::PARSE);
2544 } else {
temporal40ee5512008-07-10 02:12:20 +00002545 goto handle_uninterpreted;
2546 }
temporal40ee5512008-07-10 02:12:20 +00002547 if (input->ExpectTag(58)) goto parse_default_value;
2548 break;
2549 }
2550
2551 // optional string default_value = 7;
2552 case 7: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002553 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002554 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002555 parse_default_value:
2556 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2557 input, this->mutable_default_value()));
2558 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2559 this->default_value().data(), this->default_value().length(),
2560 ::google::protobuf::internal::WireFormat::PARSE);
2561 } else {
temporal40ee5512008-07-10 02:12:20 +00002562 goto handle_uninterpreted;
2563 }
temporal40ee5512008-07-10 02:12:20 +00002564 if (input->ExpectTag(66)) goto parse_options;
2565 break;
2566 }
2567
2568 // optional .google.protobuf.FieldOptions options = 8;
2569 case 8: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002570 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002571 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002572 parse_options:
2573 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2574 input, mutable_options()));
2575 } else {
temporal40ee5512008-07-10 02:12:20 +00002576 goto handle_uninterpreted;
2577 }
temporal40ee5512008-07-10 02:12:20 +00002578 if (input->ExpectAtEnd()) return true;
2579 break;
2580 }
2581
2582 default: {
2583 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00002584 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2585 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00002586 return true;
2587 }
2588 DO_(::google::protobuf::internal::WireFormat::SkipField(
2589 input, tag, mutable_unknown_fields()));
2590 break;
2591 }
2592 }
2593 }
2594 return true;
2595#undef DO_
2596}
2597
kenton@google.comd37d46d2009-04-25 02:53:47 +00002598void FieldDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00002599 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00002600 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002601 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002602 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2603 this->name().data(), this->name().length(),
2604 ::google::protobuf::internal::WireFormat::SERIALIZE);
2605 ::google::protobuf::internal::WireFormatLite::WriteString(
2606 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00002607 }
2608
2609 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002610 if (has_extendee()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002611 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2612 this->extendee().data(), this->extendee().length(),
2613 ::google::protobuf::internal::WireFormat::SERIALIZE);
2614 ::google::protobuf::internal::WireFormatLite::WriteString(
2615 2, this->extendee(), output);
temporal40ee5512008-07-10 02:12:20 +00002616 }
2617
2618 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002619 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002620 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00002621 }
2622
2623 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002624 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002625 ::google::protobuf::internal::WireFormatLite::WriteEnum(
2626 4, this->label(), output);
temporal40ee5512008-07-10 02:12:20 +00002627 }
2628
2629 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002630 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002631 ::google::protobuf::internal::WireFormatLite::WriteEnum(
2632 5, this->type(), output);
temporal40ee5512008-07-10 02:12:20 +00002633 }
2634
2635 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002636 if (has_type_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002637 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2638 this->type_name().data(), this->type_name().length(),
2639 ::google::protobuf::internal::WireFormat::SERIALIZE);
2640 ::google::protobuf::internal::WireFormatLite::WriteString(
2641 6, this->type_name(), output);
temporal40ee5512008-07-10 02:12:20 +00002642 }
2643
2644 // optional string default_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002645 if (has_default_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002646 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2647 this->default_value().data(), this->default_value().length(),
2648 ::google::protobuf::internal::WireFormat::SERIALIZE);
2649 ::google::protobuf::internal::WireFormatLite::WriteString(
2650 7, this->default_value(), output);
temporal40ee5512008-07-10 02:12:20 +00002651 }
2652
2653 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002654 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002655 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00002656 8, this->options(), output);
temporal40ee5512008-07-10 02:12:20 +00002657 }
2658
2659 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002660 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2661 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00002662 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00002663}
2664
2665::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray(
2666 ::google::protobuf::uint8* target) const {
2667 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002668 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002669 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2670 this->name().data(), this->name().length(),
2671 ::google::protobuf::internal::WireFormat::SERIALIZE);
2672 target =
2673 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2674 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002675 }
2676
2677 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002678 if (has_extendee()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002679 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2680 this->extendee().data(), this->extendee().length(),
2681 ::google::protobuf::internal::WireFormat::SERIALIZE);
2682 target =
2683 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2684 2, this->extendee(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002685 }
2686
2687 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002688 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002689 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002690 }
2691
2692 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002693 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002694 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2695 4, this->label(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002696 }
2697
2698 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002699 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002700 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2701 5, this->type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002702 }
2703
2704 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002705 if (has_type_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002706 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2707 this->type_name().data(), this->type_name().length(),
2708 ::google::protobuf::internal::WireFormat::SERIALIZE);
2709 target =
2710 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2711 6, this->type_name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002712 }
2713
2714 // optional string default_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002715 if (has_default_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002716 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2717 this->default_value().data(), this->default_value().length(),
2718 ::google::protobuf::internal::WireFormat::SERIALIZE);
2719 target =
2720 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2721 7, this->default_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002722 }
2723
2724 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002725 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002726 target = ::google::protobuf::internal::WireFormatLite::
2727 WriteMessageNoVirtualToArray(
2728 8, this->options(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002729 }
2730
2731 if (!unknown_fields().empty()) {
2732 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2733 unknown_fields(), target);
2734 }
2735 return target;
temporal40ee5512008-07-10 02:12:20 +00002736}
2737
2738int FieldDescriptorProto::ByteSize() const {
2739 int total_size = 0;
2740
2741 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2742 // optional string name = 1;
2743 if (has_name()) {
2744 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002745 ::google::protobuf::internal::WireFormatLite::StringSize(
2746 this->name());
temporal40ee5512008-07-10 02:12:20 +00002747 }
2748
2749 // optional int32 number = 3;
2750 if (has_number()) {
2751 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002752 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00002753 this->number());
2754 }
2755
2756 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
2757 if (has_label()) {
2758 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002759 ::google::protobuf::internal::WireFormatLite::EnumSize(this->label());
temporal40ee5512008-07-10 02:12:20 +00002760 }
2761
2762 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
2763 if (has_type()) {
2764 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002765 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
temporal40ee5512008-07-10 02:12:20 +00002766 }
2767
2768 // optional string type_name = 6;
2769 if (has_type_name()) {
2770 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002771 ::google::protobuf::internal::WireFormatLite::StringSize(
2772 this->type_name());
temporal40ee5512008-07-10 02:12:20 +00002773 }
2774
2775 // optional string extendee = 2;
2776 if (has_extendee()) {
2777 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002778 ::google::protobuf::internal::WireFormatLite::StringSize(
2779 this->extendee());
temporal40ee5512008-07-10 02:12:20 +00002780 }
2781
2782 // optional string default_value = 7;
2783 if (has_default_value()) {
2784 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002785 ::google::protobuf::internal::WireFormatLite::StringSize(
2786 this->default_value());
temporal40ee5512008-07-10 02:12:20 +00002787 }
2788
2789 // optional .google.protobuf.FieldOptions options = 8;
2790 if (has_options()) {
2791 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002792 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00002793 this->options());
2794 }
2795
2796 }
2797 if (!unknown_fields().empty()) {
2798 total_size +=
2799 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2800 unknown_fields());
2801 }
kenton@google.comfccb1462009-12-18 02:11:36 +00002802 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00002803 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00002804 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00002805 return total_size;
2806}
2807
2808void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
2809 GOOGLE_CHECK_NE(&from, this);
2810 const FieldDescriptorProto* source =
2811 ::google::protobuf::internal::dynamic_cast_if_available<const FieldDescriptorProto*>(
2812 &from);
2813 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002814 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002815 } else {
2816 MergeFrom(*source);
2817 }
2818}
2819
2820void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
2821 GOOGLE_CHECK_NE(&from, this);
2822 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002823 if (from.has_name()) {
temporal40ee5512008-07-10 02:12:20 +00002824 set_name(from.name());
2825 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002826 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00002827 set_number(from.number());
2828 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002829 if (from.has_label()) {
temporal40ee5512008-07-10 02:12:20 +00002830 set_label(from.label());
2831 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002832 if (from.has_type()) {
temporal40ee5512008-07-10 02:12:20 +00002833 set_type(from.type());
2834 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002835 if (from.has_type_name()) {
temporal40ee5512008-07-10 02:12:20 +00002836 set_type_name(from.type_name());
2837 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002838 if (from.has_extendee()) {
temporal40ee5512008-07-10 02:12:20 +00002839 set_extendee(from.extendee());
2840 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002841 if (from.has_default_value()) {
temporal40ee5512008-07-10 02:12:20 +00002842 set_default_value(from.default_value());
2843 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002844 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00002845 mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options());
2846 }
2847 }
2848 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2849}
2850
2851void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
2852 if (&from == this) return;
2853 Clear();
2854 MergeFrom(from);
2855}
2856
2857void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
2858 if (&from == this) return;
2859 Clear();
2860 MergeFrom(from);
2861}
2862
kenton@google.comceb561d2009-06-25 19:05:36 +00002863bool FieldDescriptorProto::IsInitialized() const {
2864
2865 if (has_options()) {
2866 if (!this->options().IsInitialized()) return false;
2867 }
2868 return true;
2869}
2870
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002871void FieldDescriptorProto::Swap(FieldDescriptorProto* other) {
2872 if (other != this) {
2873 std::swap(name_, other->name_);
2874 std::swap(number_, other->number_);
2875 std::swap(label_, other->label_);
2876 std::swap(type_, other->type_);
2877 std::swap(type_name_, other->type_name_);
2878 std::swap(extendee_, other->extendee_);
2879 std::swap(default_value_, other->default_value_);
2880 std::swap(options_, other->options_);
2881 std::swap(_has_bits_[0], other->_has_bits_[0]);
2882 _unknown_fields_.Swap(&other->_unknown_fields_);
2883 std::swap(_cached_size_, other->_cached_size_);
2884 }
2885}
2886
kenton@google.com80b1d622009-07-29 01:13:20 +00002887::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const {
2888 protobuf_AssignDescriptorsOnce();
2889 ::google::protobuf::Metadata metadata;
2890 metadata.descriptor = FieldDescriptorProto_descriptor_;
2891 metadata.reflection = FieldDescriptorProto_reflection_;
2892 return metadata;
temporal40ee5512008-07-10 02:12:20 +00002893}
2894
temporal40ee5512008-07-10 02:12:20 +00002895
2896// ===================================================================
2897
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002898#ifndef _MSC_VER
2899const int EnumDescriptorProto::kNameFieldNumber;
2900const int EnumDescriptorProto::kValueFieldNumber;
2901const int EnumDescriptorProto::kOptionsFieldNumber;
2902#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00002903
kenton@google.com573989f2009-10-30 22:02:17 +00002904EnumDescriptorProto::EnumDescriptorProto()
kenton@google.comfccb1462009-12-18 02:11:36 +00002905 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002906 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00002907}
2908
kenton@google.com80b1d622009-07-29 01:13:20 +00002909void EnumDescriptorProto::InitAsDefaultInstance() {
2910 options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002911}
2912
kenton@google.com573989f2009-10-30 22:02:17 +00002913EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00002914 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002915 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00002916 MergeFrom(from);
2917}
2918
kenton@google.comd37d46d2009-04-25 02:53:47 +00002919void EnumDescriptorProto::SharedCtor() {
2920 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002921 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002922 options_ = NULL;
2923 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2924}
2925
temporal40ee5512008-07-10 02:12:20 +00002926EnumDescriptorProto::~EnumDescriptorProto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002927 SharedDtor();
2928}
2929
2930void EnumDescriptorProto::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002931 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002932 delete name_;
2933 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00002934 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002935 delete options_;
2936 }
2937}
2938
kenton@google.comfccb1462009-12-18 02:11:36 +00002939void EnumDescriptorProto::SetCachedSize(int size) const {
2940 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2941 _cached_size_ = size;
2942 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2943}
temporal40ee5512008-07-10 02:12:20 +00002944const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002945 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002946 return EnumDescriptorProto_descriptor_;
2947}
2948
kenton@google.com24bf56f2008-09-24 20:31:01 +00002949const EnumDescriptorProto& EnumDescriptorProto::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002950 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00002951}
2952
2953EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL;
2954
temporal40ee5512008-07-10 02:12:20 +00002955EnumDescriptorProto* EnumDescriptorProto::New() const {
2956 return new EnumDescriptorProto;
2957}
2958
2959void EnumDescriptorProto::Clear() {
2960 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002961 if (has_name()) {
2962 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00002963 name_->clear();
2964 }
2965 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002966 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00002967 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
2968 }
2969 }
2970 value_.Clear();
2971 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2972 mutable_unknown_fields()->Clear();
2973}
2974
2975bool EnumDescriptorProto::MergePartialFromCodedStream(
2976 ::google::protobuf::io::CodedInputStream* input) {
2977#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2978 ::google::protobuf::uint32 tag;
2979 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002980 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00002981 // optional string name = 1;
2982 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002983 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002984 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002985 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2986 input, this->mutable_name()));
2987 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2988 this->name().data(), this->name().length(),
2989 ::google::protobuf::internal::WireFormat::PARSE);
2990 } else {
temporal40ee5512008-07-10 02:12:20 +00002991 goto handle_uninterpreted;
2992 }
temporal40ee5512008-07-10 02:12:20 +00002993 if (input->ExpectTag(18)) goto parse_value;
2994 break;
2995 }
2996
2997 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
2998 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00002999 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003000 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003001 parse_value:
3002 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3003 input, add_value()));
3004 } else {
temporal40ee5512008-07-10 02:12:20 +00003005 goto handle_uninterpreted;
3006 }
temporal40ee5512008-07-10 02:12:20 +00003007 if (input->ExpectTag(18)) goto parse_value;
3008 if (input->ExpectTag(26)) goto parse_options;
3009 break;
3010 }
3011
3012 // optional .google.protobuf.EnumOptions options = 3;
3013 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003014 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003015 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003016 parse_options:
3017 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3018 input, mutable_options()));
3019 } else {
temporal40ee5512008-07-10 02:12:20 +00003020 goto handle_uninterpreted;
3021 }
temporal40ee5512008-07-10 02:12:20 +00003022 if (input->ExpectAtEnd()) return true;
3023 break;
3024 }
3025
3026 default: {
3027 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00003028 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
3029 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00003030 return true;
3031 }
3032 DO_(::google::protobuf::internal::WireFormat::SkipField(
3033 input, tag, mutable_unknown_fields()));
3034 break;
3035 }
3036 }
3037 }
3038 return true;
3039#undef DO_
3040}
3041
kenton@google.comd37d46d2009-04-25 02:53:47 +00003042void EnumDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00003043 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00003044 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003045 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003046 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3047 this->name().data(), this->name().length(),
3048 ::google::protobuf::internal::WireFormat::SERIALIZE);
3049 ::google::protobuf::internal::WireFormatLite::WriteString(
3050 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00003051 }
3052
3053 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003054 for (int i = 0; i < this->value_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003055 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003056 2, this->value(i), output);
temporal40ee5512008-07-10 02:12:20 +00003057 }
3058
3059 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003060 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003061 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003062 3, this->options(), output);
temporal40ee5512008-07-10 02:12:20 +00003063 }
3064
3065 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003066 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3067 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00003068 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00003069}
3070
3071::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray(
3072 ::google::protobuf::uint8* target) const {
3073 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003074 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003075 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3076 this->name().data(), this->name().length(),
3077 ::google::protobuf::internal::WireFormat::SERIALIZE);
3078 target =
3079 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3080 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003081 }
3082
3083 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
3084 for (int i = 0; i < this->value_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003085 target = ::google::protobuf::internal::WireFormatLite::
3086 WriteMessageNoVirtualToArray(
3087 2, this->value(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003088 }
3089
3090 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003091 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003092 target = ::google::protobuf::internal::WireFormatLite::
3093 WriteMessageNoVirtualToArray(
3094 3, this->options(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003095 }
3096
3097 if (!unknown_fields().empty()) {
3098 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3099 unknown_fields(), target);
3100 }
3101 return target;
temporal40ee5512008-07-10 02:12:20 +00003102}
3103
3104int EnumDescriptorProto::ByteSize() const {
3105 int total_size = 0;
3106
3107 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3108 // optional string name = 1;
3109 if (has_name()) {
3110 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003111 ::google::protobuf::internal::WireFormatLite::StringSize(
3112 this->name());
temporal40ee5512008-07-10 02:12:20 +00003113 }
3114
3115 // optional .google.protobuf.EnumOptions options = 3;
3116 if (has_options()) {
3117 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003118 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003119 this->options());
3120 }
3121
3122 }
3123 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003124 total_size += 1 * this->value_size();
3125 for (int i = 0; i < this->value_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003126 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003127 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003128 this->value(i));
3129 }
3130
3131 if (!unknown_fields().empty()) {
3132 total_size +=
3133 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3134 unknown_fields());
3135 }
kenton@google.comfccb1462009-12-18 02:11:36 +00003136 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00003137 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00003138 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00003139 return total_size;
3140}
3141
3142void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
3143 GOOGLE_CHECK_NE(&from, this);
3144 const EnumDescriptorProto* source =
3145 ::google::protobuf::internal::dynamic_cast_if_available<const EnumDescriptorProto*>(
3146 &from);
3147 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003148 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003149 } else {
3150 MergeFrom(*source);
3151 }
3152}
3153
3154void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
3155 GOOGLE_CHECK_NE(&from, this);
3156 value_.MergeFrom(from.value_);
3157 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003158 if (from.has_name()) {
temporal40ee5512008-07-10 02:12:20 +00003159 set_name(from.name());
3160 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003161 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003162 mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options());
3163 }
3164 }
3165 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3166}
3167
3168void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3169 if (&from == this) return;
3170 Clear();
3171 MergeFrom(from);
3172}
3173
3174void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
3175 if (&from == this) return;
3176 Clear();
3177 MergeFrom(from);
3178}
3179
3180bool EnumDescriptorProto::IsInitialized() const {
3181
kenton@google.com24bf56f2008-09-24 20:31:01 +00003182 for (int i = 0; i < value_size(); i++) {
3183 if (!this->value(i).IsInitialized()) return false;
3184 }
3185 if (has_options()) {
3186 if (!this->options().IsInitialized()) return false;
3187 }
temporal40ee5512008-07-10 02:12:20 +00003188 return true;
3189}
3190
kenton@google.comceb561d2009-06-25 19:05:36 +00003191void EnumDescriptorProto::Swap(EnumDescriptorProto* other) {
3192 if (other != this) {
3193 std::swap(name_, other->name_);
3194 value_.Swap(&other->value_);
3195 std::swap(options_, other->options_);
3196 std::swap(_has_bits_[0], other->_has_bits_[0]);
3197 _unknown_fields_.Swap(&other->_unknown_fields_);
3198 std::swap(_cached_size_, other->_cached_size_);
3199 }
3200}
3201
kenton@google.com80b1d622009-07-29 01:13:20 +00003202::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const {
3203 protobuf_AssignDescriptorsOnce();
3204 ::google::protobuf::Metadata metadata;
3205 metadata.descriptor = EnumDescriptorProto_descriptor_;
3206 metadata.reflection = EnumDescriptorProto_reflection_;
3207 return metadata;
temporal40ee5512008-07-10 02:12:20 +00003208}
3209
temporal40ee5512008-07-10 02:12:20 +00003210
3211// ===================================================================
3212
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00003213#ifndef _MSC_VER
3214const int EnumValueDescriptorProto::kNameFieldNumber;
3215const int EnumValueDescriptorProto::kNumberFieldNumber;
3216const int EnumValueDescriptorProto::kOptionsFieldNumber;
3217#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00003218
kenton@google.com573989f2009-10-30 22:02:17 +00003219EnumValueDescriptorProto::EnumValueDescriptorProto()
kenton@google.comfccb1462009-12-18 02:11:36 +00003220 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003221 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00003222}
3223
kenton@google.com80b1d622009-07-29 01:13:20 +00003224void EnumValueDescriptorProto::InitAsDefaultInstance() {
3225 options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00003226}
3227
kenton@google.com573989f2009-10-30 22:02:17 +00003228EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00003229 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003230 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00003231 MergeFrom(from);
3232}
3233
kenton@google.comd37d46d2009-04-25 02:53:47 +00003234void EnumValueDescriptorProto::SharedCtor() {
3235 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003236 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003237 number_ = 0;
3238 options_ = NULL;
3239 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3240}
3241
temporal40ee5512008-07-10 02:12:20 +00003242EnumValueDescriptorProto::~EnumValueDescriptorProto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003243 SharedDtor();
3244}
3245
3246void EnumValueDescriptorProto::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003247 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003248 delete name_;
3249 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003250 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003251 delete options_;
3252 }
3253}
3254
kenton@google.comfccb1462009-12-18 02:11:36 +00003255void EnumValueDescriptorProto::SetCachedSize(int size) const {
3256 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3257 _cached_size_ = size;
3258 GOOGLE_SAFE_CONCURRENT_WRITES_END();
3259}
temporal40ee5512008-07-10 02:12:20 +00003260const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003261 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00003262 return EnumValueDescriptorProto_descriptor_;
3263}
3264
kenton@google.com24bf56f2008-09-24 20:31:01 +00003265const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003266 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003267}
3268
3269EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL;
3270
temporal40ee5512008-07-10 02:12:20 +00003271EnumValueDescriptorProto* EnumValueDescriptorProto::New() const {
3272 return new EnumValueDescriptorProto;
3273}
3274
3275void EnumValueDescriptorProto::Clear() {
3276 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003277 if (has_name()) {
3278 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003279 name_->clear();
3280 }
3281 }
3282 number_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003283 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003284 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
3285 }
3286 }
3287 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3288 mutable_unknown_fields()->Clear();
3289}
3290
3291bool EnumValueDescriptorProto::MergePartialFromCodedStream(
3292 ::google::protobuf::io::CodedInputStream* input) {
3293#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3294 ::google::protobuf::uint32 tag;
3295 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003296 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00003297 // optional string name = 1;
3298 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003299 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003300 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003301 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3302 input, this->mutable_name()));
3303 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3304 this->name().data(), this->name().length(),
3305 ::google::protobuf::internal::WireFormat::PARSE);
3306 } else {
temporal40ee5512008-07-10 02:12:20 +00003307 goto handle_uninterpreted;
3308 }
temporal40ee5512008-07-10 02:12:20 +00003309 if (input->ExpectTag(16)) goto parse_number;
3310 break;
3311 }
3312
3313 // optional int32 number = 2;
3314 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003315 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003316 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003317 parse_number:
3318 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
3319 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
3320 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00003321 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00003322 } else {
temporal40ee5512008-07-10 02:12:20 +00003323 goto handle_uninterpreted;
3324 }
temporal40ee5512008-07-10 02:12:20 +00003325 if (input->ExpectTag(26)) goto parse_options;
3326 break;
3327 }
3328
3329 // optional .google.protobuf.EnumValueOptions options = 3;
3330 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003331 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003332 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003333 parse_options:
3334 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3335 input, mutable_options()));
3336 } else {
temporal40ee5512008-07-10 02:12:20 +00003337 goto handle_uninterpreted;
3338 }
temporal40ee5512008-07-10 02:12:20 +00003339 if (input->ExpectAtEnd()) return true;
3340 break;
3341 }
3342
3343 default: {
3344 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00003345 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
3346 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00003347 return true;
3348 }
3349 DO_(::google::protobuf::internal::WireFormat::SkipField(
3350 input, tag, mutable_unknown_fields()));
3351 break;
3352 }
3353 }
3354 }
3355 return true;
3356#undef DO_
3357}
3358
kenton@google.comd37d46d2009-04-25 02:53:47 +00003359void EnumValueDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00003360 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00003361 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003362 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003363 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3364 this->name().data(), this->name().length(),
3365 ::google::protobuf::internal::WireFormat::SERIALIZE);
3366 ::google::protobuf::internal::WireFormatLite::WriteString(
3367 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00003368 }
3369
3370 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003371 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003372 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00003373 }
3374
3375 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003376 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003377 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003378 3, this->options(), output);
temporal40ee5512008-07-10 02:12:20 +00003379 }
3380
3381 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003382 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3383 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00003384 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00003385}
3386
3387::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray(
3388 ::google::protobuf::uint8* target) const {
3389 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003390 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003391 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3392 this->name().data(), this->name().length(),
3393 ::google::protobuf::internal::WireFormat::SERIALIZE);
3394 target =
3395 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3396 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003397 }
3398
3399 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003400 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003401 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003402 }
3403
3404 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003405 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003406 target = ::google::protobuf::internal::WireFormatLite::
3407 WriteMessageNoVirtualToArray(
3408 3, this->options(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003409 }
3410
3411 if (!unknown_fields().empty()) {
3412 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3413 unknown_fields(), target);
3414 }
3415 return target;
temporal40ee5512008-07-10 02:12:20 +00003416}
3417
3418int EnumValueDescriptorProto::ByteSize() const {
3419 int total_size = 0;
3420
3421 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3422 // optional string name = 1;
3423 if (has_name()) {
3424 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003425 ::google::protobuf::internal::WireFormatLite::StringSize(
3426 this->name());
temporal40ee5512008-07-10 02:12:20 +00003427 }
3428
3429 // optional int32 number = 2;
3430 if (has_number()) {
3431 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003432 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00003433 this->number());
3434 }
3435
3436 // optional .google.protobuf.EnumValueOptions options = 3;
3437 if (has_options()) {
3438 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003439 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003440 this->options());
3441 }
3442
3443 }
3444 if (!unknown_fields().empty()) {
3445 total_size +=
3446 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3447 unknown_fields());
3448 }
kenton@google.comfccb1462009-12-18 02:11:36 +00003449 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00003450 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00003451 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00003452 return total_size;
3453}
3454
3455void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
3456 GOOGLE_CHECK_NE(&from, this);
3457 const EnumValueDescriptorProto* source =
3458 ::google::protobuf::internal::dynamic_cast_if_available<const EnumValueDescriptorProto*>(
3459 &from);
3460 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003461 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003462 } else {
3463 MergeFrom(*source);
3464 }
3465}
3466
3467void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
3468 GOOGLE_CHECK_NE(&from, this);
3469 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003470 if (from.has_name()) {
temporal40ee5512008-07-10 02:12:20 +00003471 set_name(from.name());
3472 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003473 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00003474 set_number(from.number());
3475 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003476 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003477 mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options());
3478 }
3479 }
3480 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3481}
3482
3483void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3484 if (&from == this) return;
3485 Clear();
3486 MergeFrom(from);
3487}
3488
3489void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
3490 if (&from == this) return;
3491 Clear();
3492 MergeFrom(from);
3493}
3494
kenton@google.comceb561d2009-06-25 19:05:36 +00003495bool EnumValueDescriptorProto::IsInitialized() const {
3496
3497 if (has_options()) {
3498 if (!this->options().IsInitialized()) return false;
3499 }
3500 return true;
3501}
3502
kenton@google.com26bd9ee2008-11-21 00:06:27 +00003503void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) {
3504 if (other != this) {
3505 std::swap(name_, other->name_);
3506 std::swap(number_, other->number_);
3507 std::swap(options_, other->options_);
3508 std::swap(_has_bits_[0], other->_has_bits_[0]);
3509 _unknown_fields_.Swap(&other->_unknown_fields_);
3510 std::swap(_cached_size_, other->_cached_size_);
3511 }
3512}
3513
kenton@google.com80b1d622009-07-29 01:13:20 +00003514::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const {
3515 protobuf_AssignDescriptorsOnce();
3516 ::google::protobuf::Metadata metadata;
3517 metadata.descriptor = EnumValueDescriptorProto_descriptor_;
3518 metadata.reflection = EnumValueDescriptorProto_reflection_;
3519 return metadata;
temporal40ee5512008-07-10 02:12:20 +00003520}
3521
temporal40ee5512008-07-10 02:12:20 +00003522
3523// ===================================================================
3524
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00003525#ifndef _MSC_VER
3526const int ServiceDescriptorProto::kNameFieldNumber;
3527const int ServiceDescriptorProto::kMethodFieldNumber;
3528const int ServiceDescriptorProto::kOptionsFieldNumber;
3529#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00003530
kenton@google.com573989f2009-10-30 22:02:17 +00003531ServiceDescriptorProto::ServiceDescriptorProto()
kenton@google.comfccb1462009-12-18 02:11:36 +00003532 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003533 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00003534}
3535
kenton@google.com80b1d622009-07-29 01:13:20 +00003536void ServiceDescriptorProto::InitAsDefaultInstance() {
3537 options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00003538}
3539
kenton@google.com573989f2009-10-30 22:02:17 +00003540ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00003541 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003542 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00003543 MergeFrom(from);
3544}
3545
kenton@google.comd37d46d2009-04-25 02:53:47 +00003546void ServiceDescriptorProto::SharedCtor() {
3547 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003548 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003549 options_ = NULL;
3550 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3551}
3552
temporal40ee5512008-07-10 02:12:20 +00003553ServiceDescriptorProto::~ServiceDescriptorProto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003554 SharedDtor();
3555}
3556
3557void ServiceDescriptorProto::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003558 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003559 delete name_;
3560 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003561 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003562 delete options_;
3563 }
3564}
3565
kenton@google.comfccb1462009-12-18 02:11:36 +00003566void ServiceDescriptorProto::SetCachedSize(int size) const {
3567 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3568 _cached_size_ = size;
3569 GOOGLE_SAFE_CONCURRENT_WRITES_END();
3570}
temporal40ee5512008-07-10 02:12:20 +00003571const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003572 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00003573 return ServiceDescriptorProto_descriptor_;
3574}
3575
kenton@google.com24bf56f2008-09-24 20:31:01 +00003576const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003577 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003578}
3579
3580ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL;
3581
temporal40ee5512008-07-10 02:12:20 +00003582ServiceDescriptorProto* ServiceDescriptorProto::New() const {
3583 return new ServiceDescriptorProto;
3584}
3585
3586void ServiceDescriptorProto::Clear() {
3587 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003588 if (has_name()) {
3589 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003590 name_->clear();
3591 }
3592 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003593 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003594 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
3595 }
3596 }
3597 method_.Clear();
3598 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3599 mutable_unknown_fields()->Clear();
3600}
3601
3602bool ServiceDescriptorProto::MergePartialFromCodedStream(
3603 ::google::protobuf::io::CodedInputStream* input) {
3604#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3605 ::google::protobuf::uint32 tag;
3606 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003607 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00003608 // optional string name = 1;
3609 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003610 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003611 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003612 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3613 input, this->mutable_name()));
3614 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3615 this->name().data(), this->name().length(),
3616 ::google::protobuf::internal::WireFormat::PARSE);
3617 } else {
temporal40ee5512008-07-10 02:12:20 +00003618 goto handle_uninterpreted;
3619 }
temporal40ee5512008-07-10 02:12:20 +00003620 if (input->ExpectTag(18)) goto parse_method;
3621 break;
3622 }
3623
3624 // repeated .google.protobuf.MethodDescriptorProto method = 2;
3625 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003626 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003627 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003628 parse_method:
3629 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3630 input, add_method()));
3631 } else {
temporal40ee5512008-07-10 02:12:20 +00003632 goto handle_uninterpreted;
3633 }
temporal40ee5512008-07-10 02:12:20 +00003634 if (input->ExpectTag(18)) goto parse_method;
3635 if (input->ExpectTag(26)) goto parse_options;
3636 break;
3637 }
3638
3639 // optional .google.protobuf.ServiceOptions options = 3;
3640 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003641 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003642 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003643 parse_options:
3644 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3645 input, mutable_options()));
3646 } else {
temporal40ee5512008-07-10 02:12:20 +00003647 goto handle_uninterpreted;
3648 }
temporal40ee5512008-07-10 02:12:20 +00003649 if (input->ExpectAtEnd()) return true;
3650 break;
3651 }
3652
3653 default: {
3654 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00003655 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
3656 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00003657 return true;
3658 }
3659 DO_(::google::protobuf::internal::WireFormat::SkipField(
3660 input, tag, mutable_unknown_fields()));
3661 break;
3662 }
3663 }
3664 }
3665 return true;
3666#undef DO_
3667}
3668
kenton@google.comd37d46d2009-04-25 02:53:47 +00003669void ServiceDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00003670 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00003671 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003672 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003673 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3674 this->name().data(), this->name().length(),
3675 ::google::protobuf::internal::WireFormat::SERIALIZE);
3676 ::google::protobuf::internal::WireFormatLite::WriteString(
3677 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00003678 }
3679
3680 // repeated .google.protobuf.MethodDescriptorProto method = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003681 for (int i = 0; i < this->method_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003682 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003683 2, this->method(i), output);
temporal40ee5512008-07-10 02:12:20 +00003684 }
3685
3686 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003687 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003688 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003689 3, this->options(), output);
temporal40ee5512008-07-10 02:12:20 +00003690 }
3691
3692 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003693 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3694 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00003695 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00003696}
3697
3698::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray(
3699 ::google::protobuf::uint8* target) const {
3700 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003701 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003702 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3703 this->name().data(), this->name().length(),
3704 ::google::protobuf::internal::WireFormat::SERIALIZE);
3705 target =
3706 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3707 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003708 }
3709
3710 // repeated .google.protobuf.MethodDescriptorProto method = 2;
3711 for (int i = 0; i < this->method_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003712 target = ::google::protobuf::internal::WireFormatLite::
3713 WriteMessageNoVirtualToArray(
3714 2, this->method(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003715 }
3716
3717 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003718 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003719 target = ::google::protobuf::internal::WireFormatLite::
3720 WriteMessageNoVirtualToArray(
3721 3, this->options(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003722 }
3723
3724 if (!unknown_fields().empty()) {
3725 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3726 unknown_fields(), target);
3727 }
3728 return target;
temporal40ee5512008-07-10 02:12:20 +00003729}
3730
3731int ServiceDescriptorProto::ByteSize() const {
3732 int total_size = 0;
3733
3734 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3735 // optional string name = 1;
3736 if (has_name()) {
3737 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003738 ::google::protobuf::internal::WireFormatLite::StringSize(
3739 this->name());
temporal40ee5512008-07-10 02:12:20 +00003740 }
3741
3742 // optional .google.protobuf.ServiceOptions options = 3;
3743 if (has_options()) {
3744 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003745 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003746 this->options());
3747 }
3748
3749 }
3750 // repeated .google.protobuf.MethodDescriptorProto method = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003751 total_size += 1 * this->method_size();
3752 for (int i = 0; i < this->method_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003753 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003754 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003755 this->method(i));
3756 }
3757
3758 if (!unknown_fields().empty()) {
3759 total_size +=
3760 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3761 unknown_fields());
3762 }
kenton@google.comfccb1462009-12-18 02:11:36 +00003763 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00003764 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00003765 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00003766 return total_size;
3767}
3768
3769void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
3770 GOOGLE_CHECK_NE(&from, this);
3771 const ServiceDescriptorProto* source =
3772 ::google::protobuf::internal::dynamic_cast_if_available<const ServiceDescriptorProto*>(
3773 &from);
3774 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003775 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003776 } else {
3777 MergeFrom(*source);
3778 }
3779}
3780
3781void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
3782 GOOGLE_CHECK_NE(&from, this);
3783 method_.MergeFrom(from.method_);
3784 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003785 if (from.has_name()) {
temporal40ee5512008-07-10 02:12:20 +00003786 set_name(from.name());
3787 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003788 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003789 mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options());
3790 }
3791 }
3792 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3793}
3794
3795void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3796 if (&from == this) return;
3797 Clear();
3798 MergeFrom(from);
3799}
3800
3801void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
3802 if (&from == this) return;
3803 Clear();
3804 MergeFrom(from);
3805}
3806
3807bool ServiceDescriptorProto::IsInitialized() const {
3808
kenton@google.com24bf56f2008-09-24 20:31:01 +00003809 for (int i = 0; i < method_size(); i++) {
3810 if (!this->method(i).IsInitialized()) return false;
3811 }
3812 if (has_options()) {
3813 if (!this->options().IsInitialized()) return false;
3814 }
temporal40ee5512008-07-10 02:12:20 +00003815 return true;
3816}
3817
kenton@google.comceb561d2009-06-25 19:05:36 +00003818void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) {
3819 if (other != this) {
3820 std::swap(name_, other->name_);
3821 method_.Swap(&other->method_);
3822 std::swap(options_, other->options_);
3823 std::swap(_has_bits_[0], other->_has_bits_[0]);
3824 _unknown_fields_.Swap(&other->_unknown_fields_);
3825 std::swap(_cached_size_, other->_cached_size_);
3826 }
3827}
3828
kenton@google.com80b1d622009-07-29 01:13:20 +00003829::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const {
3830 protobuf_AssignDescriptorsOnce();
3831 ::google::protobuf::Metadata metadata;
3832 metadata.descriptor = ServiceDescriptorProto_descriptor_;
3833 metadata.reflection = ServiceDescriptorProto_reflection_;
3834 return metadata;
temporal40ee5512008-07-10 02:12:20 +00003835}
3836
temporal40ee5512008-07-10 02:12:20 +00003837
3838// ===================================================================
3839
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00003840#ifndef _MSC_VER
3841const int MethodDescriptorProto::kNameFieldNumber;
3842const int MethodDescriptorProto::kInputTypeFieldNumber;
3843const int MethodDescriptorProto::kOutputTypeFieldNumber;
3844const int MethodDescriptorProto::kOptionsFieldNumber;
3845#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00003846
kenton@google.com573989f2009-10-30 22:02:17 +00003847MethodDescriptorProto::MethodDescriptorProto()
kenton@google.comfccb1462009-12-18 02:11:36 +00003848 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003849 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00003850}
3851
kenton@google.com80b1d622009-07-29 01:13:20 +00003852void MethodDescriptorProto::InitAsDefaultInstance() {
3853 options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00003854}
3855
kenton@google.com573989f2009-10-30 22:02:17 +00003856MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00003857 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003858 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00003859 MergeFrom(from);
3860}
3861
kenton@google.comd37d46d2009-04-25 02:53:47 +00003862void MethodDescriptorProto::SharedCtor() {
3863 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003864 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
3865 input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
3866 output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003867 options_ = NULL;
3868 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3869}
3870
temporal40ee5512008-07-10 02:12:20 +00003871MethodDescriptorProto::~MethodDescriptorProto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003872 SharedDtor();
3873}
3874
3875void MethodDescriptorProto::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003876 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003877 delete name_;
3878 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003879 if (input_type_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003880 delete input_type_;
3881 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003882 if (output_type_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003883 delete output_type_;
3884 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003885 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003886 delete options_;
3887 }
3888}
3889
kenton@google.comfccb1462009-12-18 02:11:36 +00003890void MethodDescriptorProto::SetCachedSize(int size) const {
3891 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3892 _cached_size_ = size;
3893 GOOGLE_SAFE_CONCURRENT_WRITES_END();
3894}
temporal40ee5512008-07-10 02:12:20 +00003895const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003896 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00003897 return MethodDescriptorProto_descriptor_;
3898}
3899
kenton@google.com24bf56f2008-09-24 20:31:01 +00003900const MethodDescriptorProto& MethodDescriptorProto::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003901 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003902}
3903
3904MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL;
3905
temporal40ee5512008-07-10 02:12:20 +00003906MethodDescriptorProto* MethodDescriptorProto::New() const {
3907 return new MethodDescriptorProto;
3908}
3909
3910void MethodDescriptorProto::Clear() {
3911 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003912 if (has_name()) {
3913 if (name_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003914 name_->clear();
3915 }
3916 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003917 if (has_input_type()) {
3918 if (input_type_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003919 input_type_->clear();
3920 }
3921 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003922 if (has_output_type()) {
3923 if (output_type_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00003924 output_type_->clear();
3925 }
3926 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003927 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003928 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
3929 }
3930 }
3931 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3932 mutable_unknown_fields()->Clear();
3933}
3934
3935bool MethodDescriptorProto::MergePartialFromCodedStream(
3936 ::google::protobuf::io::CodedInputStream* input) {
3937#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3938 ::google::protobuf::uint32 tag;
3939 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003940 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00003941 // optional string name = 1;
3942 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003943 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003944 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003945 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3946 input, this->mutable_name()));
3947 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3948 this->name().data(), this->name().length(),
3949 ::google::protobuf::internal::WireFormat::PARSE);
3950 } else {
temporal40ee5512008-07-10 02:12:20 +00003951 goto handle_uninterpreted;
3952 }
temporal40ee5512008-07-10 02:12:20 +00003953 if (input->ExpectTag(18)) goto parse_input_type;
3954 break;
3955 }
3956
3957 // optional string input_type = 2;
3958 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003959 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003960 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003961 parse_input_type:
3962 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3963 input, this->mutable_input_type()));
3964 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3965 this->input_type().data(), this->input_type().length(),
3966 ::google::protobuf::internal::WireFormat::PARSE);
3967 } else {
temporal40ee5512008-07-10 02:12:20 +00003968 goto handle_uninterpreted;
3969 }
temporal40ee5512008-07-10 02:12:20 +00003970 if (input->ExpectTag(26)) goto parse_output_type;
3971 break;
3972 }
3973
3974 // optional string output_type = 3;
3975 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003976 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003977 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003978 parse_output_type:
3979 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3980 input, this->mutable_output_type()));
3981 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
3982 this->output_type().data(), this->output_type().length(),
3983 ::google::protobuf::internal::WireFormat::PARSE);
3984 } else {
temporal40ee5512008-07-10 02:12:20 +00003985 goto handle_uninterpreted;
3986 }
temporal40ee5512008-07-10 02:12:20 +00003987 if (input->ExpectTag(34)) goto parse_options;
3988 break;
3989 }
3990
3991 // optional .google.protobuf.MethodOptions options = 4;
3992 case 4: {
kenton@google.comfccb1462009-12-18 02:11:36 +00003993 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003994 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003995 parse_options:
3996 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3997 input, mutable_options()));
3998 } else {
temporal40ee5512008-07-10 02:12:20 +00003999 goto handle_uninterpreted;
4000 }
temporal40ee5512008-07-10 02:12:20 +00004001 if (input->ExpectAtEnd()) return true;
4002 break;
4003 }
4004
4005 default: {
4006 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00004007 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
4008 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00004009 return true;
4010 }
4011 DO_(::google::protobuf::internal::WireFormat::SkipField(
4012 input, tag, mutable_unknown_fields()));
4013 break;
4014 }
4015 }
4016 }
4017 return true;
4018#undef DO_
4019}
4020
kenton@google.comd37d46d2009-04-25 02:53:47 +00004021void MethodDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00004022 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00004023 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004024 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004025 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4026 this->name().data(), this->name().length(),
4027 ::google::protobuf::internal::WireFormat::SERIALIZE);
4028 ::google::protobuf::internal::WireFormatLite::WriteString(
4029 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00004030 }
4031
4032 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004033 if (has_input_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004034 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4035 this->input_type().data(), this->input_type().length(),
4036 ::google::protobuf::internal::WireFormat::SERIALIZE);
4037 ::google::protobuf::internal::WireFormatLite::WriteString(
4038 2, this->input_type(), output);
temporal40ee5512008-07-10 02:12:20 +00004039 }
4040
4041 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004042 if (has_output_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004043 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4044 this->output_type().data(), this->output_type().length(),
4045 ::google::protobuf::internal::WireFormat::SERIALIZE);
4046 ::google::protobuf::internal::WireFormatLite::WriteString(
4047 3, this->output_type(), output);
temporal40ee5512008-07-10 02:12:20 +00004048 }
4049
4050 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004051 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004052 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00004053 4, this->options(), output);
temporal40ee5512008-07-10 02:12:20 +00004054 }
4055
4056 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004057 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4058 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00004059 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00004060}
4061
4062::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray(
4063 ::google::protobuf::uint8* target) const {
4064 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004065 if (has_name()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004066 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4067 this->name().data(), this->name().length(),
4068 ::google::protobuf::internal::WireFormat::SERIALIZE);
4069 target =
4070 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4071 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004072 }
4073
4074 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004075 if (has_input_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004076 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4077 this->input_type().data(), this->input_type().length(),
4078 ::google::protobuf::internal::WireFormat::SERIALIZE);
4079 target =
4080 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4081 2, this->input_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004082 }
4083
4084 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004085 if (has_output_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004086 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4087 this->output_type().data(), this->output_type().length(),
4088 ::google::protobuf::internal::WireFormat::SERIALIZE);
4089 target =
4090 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4091 3, this->output_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004092 }
4093
4094 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004095 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004096 target = ::google::protobuf::internal::WireFormatLite::
4097 WriteMessageNoVirtualToArray(
4098 4, this->options(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004099 }
4100
4101 if (!unknown_fields().empty()) {
4102 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
4103 unknown_fields(), target);
4104 }
4105 return target;
temporal40ee5512008-07-10 02:12:20 +00004106}
4107
4108int MethodDescriptorProto::ByteSize() const {
4109 int total_size = 0;
4110
4111 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
4112 // optional string name = 1;
4113 if (has_name()) {
4114 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004115 ::google::protobuf::internal::WireFormatLite::StringSize(
4116 this->name());
temporal40ee5512008-07-10 02:12:20 +00004117 }
4118
4119 // optional string input_type = 2;
4120 if (has_input_type()) {
4121 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004122 ::google::protobuf::internal::WireFormatLite::StringSize(
4123 this->input_type());
temporal40ee5512008-07-10 02:12:20 +00004124 }
4125
4126 // optional string output_type = 3;
4127 if (has_output_type()) {
4128 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004129 ::google::protobuf::internal::WireFormatLite::StringSize(
4130 this->output_type());
temporal40ee5512008-07-10 02:12:20 +00004131 }
4132
4133 // optional .google.protobuf.MethodOptions options = 4;
4134 if (has_options()) {
4135 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004136 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00004137 this->options());
4138 }
4139
4140 }
4141 if (!unknown_fields().empty()) {
4142 total_size +=
4143 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4144 unknown_fields());
4145 }
kenton@google.comfccb1462009-12-18 02:11:36 +00004146 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00004147 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00004148 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00004149 return total_size;
4150}
4151
4152void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
4153 GOOGLE_CHECK_NE(&from, this);
4154 const MethodDescriptorProto* source =
4155 ::google::protobuf::internal::dynamic_cast_if_available<const MethodDescriptorProto*>(
4156 &from);
4157 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00004158 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00004159 } else {
4160 MergeFrom(*source);
4161 }
4162}
4163
4164void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
4165 GOOGLE_CHECK_NE(&from, this);
4166 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004167 if (from.has_name()) {
temporal40ee5512008-07-10 02:12:20 +00004168 set_name(from.name());
4169 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004170 if (from.has_input_type()) {
temporal40ee5512008-07-10 02:12:20 +00004171 set_input_type(from.input_type());
4172 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004173 if (from.has_output_type()) {
temporal40ee5512008-07-10 02:12:20 +00004174 set_output_type(from.output_type());
4175 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004176 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00004177 mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options());
4178 }
4179 }
4180 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4181}
4182
4183void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
4184 if (&from == this) return;
4185 Clear();
4186 MergeFrom(from);
4187}
4188
4189void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
4190 if (&from == this) return;
4191 Clear();
4192 MergeFrom(from);
4193}
4194
kenton@google.comceb561d2009-06-25 19:05:36 +00004195bool MethodDescriptorProto::IsInitialized() const {
4196
4197 if (has_options()) {
4198 if (!this->options().IsInitialized()) return false;
4199 }
4200 return true;
4201}
4202
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004203void MethodDescriptorProto::Swap(MethodDescriptorProto* other) {
4204 if (other != this) {
4205 std::swap(name_, other->name_);
4206 std::swap(input_type_, other->input_type_);
4207 std::swap(output_type_, other->output_type_);
4208 std::swap(options_, other->options_);
4209 std::swap(_has_bits_[0], other->_has_bits_[0]);
4210 _unknown_fields_.Swap(&other->_unknown_fields_);
4211 std::swap(_cached_size_, other->_cached_size_);
4212 }
4213}
4214
kenton@google.com80b1d622009-07-29 01:13:20 +00004215::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const {
4216 protobuf_AssignDescriptorsOnce();
4217 ::google::protobuf::Metadata metadata;
4218 metadata.descriptor = MethodDescriptorProto_descriptor_;
4219 metadata.reflection = MethodDescriptorProto_reflection_;
4220 return metadata;
temporal40ee5512008-07-10 02:12:20 +00004221}
4222
temporal40ee5512008-07-10 02:12:20 +00004223
4224// ===================================================================
4225
4226const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004227 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004228 return FileOptions_OptimizeMode_descriptor_;
4229}
4230bool FileOptions_OptimizeMode_IsValid(int value) {
4231 switch(value) {
4232 case 1:
4233 case 2:
kenton@google.com80b1d622009-07-29 01:13:20 +00004234 case 3:
temporal40ee5512008-07-10 02:12:20 +00004235 return true;
4236 default:
4237 return false;
4238 }
4239}
4240
4241#ifndef _MSC_VER
4242const FileOptions_OptimizeMode FileOptions::SPEED;
4243const FileOptions_OptimizeMode FileOptions::CODE_SIZE;
kenton@google.com80b1d622009-07-29 01:13:20 +00004244const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME;
temporal40ee5512008-07-10 02:12:20 +00004245const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN;
4246const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00004247const int FileOptions::OptimizeMode_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00004248#endif // _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004249#ifndef _MSC_VER
4250const int FileOptions::kJavaPackageFieldNumber;
4251const int FileOptions::kJavaOuterClassnameFieldNumber;
4252const int FileOptions::kJavaMultipleFilesFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004253const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004254const int FileOptions::kOptimizeForFieldNumber;
kenton@google.comfccb1462009-12-18 02:11:36 +00004255const int FileOptions::kCcGenericServicesFieldNumber;
4256const int FileOptions::kJavaGenericServicesFieldNumber;
4257const int FileOptions::kPyGenericServicesFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004258const int FileOptions::kUninterpretedOptionFieldNumber;
4259#endif // !_MSC_VER
kenton@google.com24bf56f2008-09-24 20:31:01 +00004260
kenton@google.com573989f2009-10-30 22:02:17 +00004261FileOptions::FileOptions()
kenton@google.comfccb1462009-12-18 02:11:36 +00004262 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004263 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00004264}
4265
kenton@google.com80b1d622009-07-29 01:13:20 +00004266void FileOptions::InitAsDefaultInstance() {
4267}
kenton@google.com24bf56f2008-09-24 20:31:01 +00004268
kenton@google.com573989f2009-10-30 22:02:17 +00004269FileOptions::FileOptions(const FileOptions& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00004270 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004271 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00004272 MergeFrom(from);
4273}
4274
kenton@google.comd37d46d2009-04-25 02:53:47 +00004275void FileOptions::SharedCtor() {
4276 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004277 java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
4278 java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004279 java_multiple_files_ = false;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004280 java_generate_equals_and_hash_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00004281 optimize_for_ = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004282 cc_generic_services_ = false;
4283 java_generic_services_ = false;
4284 py_generic_services_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00004285 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4286}
4287
temporal40ee5512008-07-10 02:12:20 +00004288FileOptions::~FileOptions() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004289 SharedDtor();
4290}
4291
4292void FileOptions::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004293 if (java_package_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00004294 delete java_package_;
4295 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004296 if (java_outer_classname_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00004297 delete java_outer_classname_;
4298 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004299 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004300 }
4301}
4302
kenton@google.comfccb1462009-12-18 02:11:36 +00004303void FileOptions::SetCachedSize(int size) const {
4304 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4305 _cached_size_ = size;
4306 GOOGLE_SAFE_CONCURRENT_WRITES_END();
4307}
temporal40ee5512008-07-10 02:12:20 +00004308const ::google::protobuf::Descriptor* FileOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004309 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004310 return FileOptions_descriptor_;
4311}
4312
kenton@google.com24bf56f2008-09-24 20:31:01 +00004313const FileOptions& FileOptions::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004314 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00004315}
4316
4317FileOptions* FileOptions::default_instance_ = NULL;
4318
temporal40ee5512008-07-10 02:12:20 +00004319FileOptions* FileOptions::New() const {
4320 return new FileOptions;
4321}
4322
4323void FileOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004324 _extensions_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004325 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004326 if (has_java_package()) {
4327 if (java_package_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00004328 java_package_->clear();
4329 }
4330 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004331 if (has_java_outer_classname()) {
4332 if (java_outer_classname_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00004333 java_outer_classname_->clear();
4334 }
4335 }
4336 java_multiple_files_ = false;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004337 java_generate_equals_and_hash_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00004338 optimize_for_ = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004339 cc_generic_services_ = false;
4340 java_generic_services_ = false;
4341 py_generic_services_ = false;
temporal40ee5512008-07-10 02:12:20 +00004342 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004343 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004344 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4345 mutable_unknown_fields()->Clear();
4346}
4347
4348bool FileOptions::MergePartialFromCodedStream(
4349 ::google::protobuf::io::CodedInputStream* input) {
4350#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4351 ::google::protobuf::uint32 tag;
4352 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004353 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00004354 // optional string java_package = 1;
4355 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004356 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004357 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004358 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4359 input, this->mutable_java_package()));
4360 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4361 this->java_package().data(), this->java_package().length(),
4362 ::google::protobuf::internal::WireFormat::PARSE);
4363 } else {
temporal40ee5512008-07-10 02:12:20 +00004364 goto handle_uninterpreted;
4365 }
temporal40ee5512008-07-10 02:12:20 +00004366 if (input->ExpectTag(66)) goto parse_java_outer_classname;
4367 break;
4368 }
4369
4370 // optional string java_outer_classname = 8;
4371 case 8: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004372 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004373 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004374 parse_java_outer_classname:
4375 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4376 input, this->mutable_java_outer_classname()));
4377 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4378 this->java_outer_classname().data(), this->java_outer_classname().length(),
4379 ::google::protobuf::internal::WireFormat::PARSE);
4380 } else {
temporal40ee5512008-07-10 02:12:20 +00004381 goto handle_uninterpreted;
4382 }
temporal40ee5512008-07-10 02:12:20 +00004383 if (input->ExpectTag(72)) goto parse_optimize_for;
4384 break;
4385 }
4386
kenton@google.comd37d46d2009-04-25 02:53:47 +00004387 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00004388 case 9: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004389 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004390 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004391 parse_optimize_for:
4392 int value;
4393 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4394 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4395 input, &value)));
4396 if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) {
4397 set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value));
4398 } else {
4399 mutable_unknown_fields()->AddVarint(9, value);
4400 }
temporal40ee5512008-07-10 02:12:20 +00004401 } else {
kenton@google.comfccb1462009-12-18 02:11:36 +00004402 goto handle_uninterpreted;
temporal40ee5512008-07-10 02:12:20 +00004403 }
4404 if (input->ExpectTag(80)) goto parse_java_multiple_files;
4405 break;
4406 }
4407
4408 // optional bool java_multiple_files = 10 [default = false];
4409 case 10: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004410 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004411 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004412 parse_java_multiple_files:
4413 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4414 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
4415 input, &java_multiple_files_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004416 set_has_java_multiple_files();
kenton@google.comfccb1462009-12-18 02:11:36 +00004417 } else {
temporal40ee5512008-07-10 02:12:20 +00004418 goto handle_uninterpreted;
4419 }
kenton@google.comfccb1462009-12-18 02:11:36 +00004420 if (input->ExpectTag(128)) goto parse_cc_generic_services;
4421 break;
4422 }
4423
liujisi@google.com33165fe2010-11-02 13:14:58 +00004424 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00004425 case 16: {
4426 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
4427 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
4428 parse_cc_generic_services:
4429 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4430 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
4431 input, &cc_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004432 set_has_cc_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00004433 } else {
4434 goto handle_uninterpreted;
4435 }
4436 if (input->ExpectTag(136)) goto parse_java_generic_services;
4437 break;
4438 }
4439
liujisi@google.com33165fe2010-11-02 13:14:58 +00004440 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00004441 case 17: {
4442 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
4443 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
4444 parse_java_generic_services:
4445 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4446 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
4447 input, &java_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004448 set_has_java_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00004449 } else {
4450 goto handle_uninterpreted;
4451 }
4452 if (input->ExpectTag(144)) goto parse_py_generic_services;
4453 break;
4454 }
4455
liujisi@google.com33165fe2010-11-02 13:14:58 +00004456 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00004457 case 18: {
4458 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
4459 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
4460 parse_py_generic_services:
4461 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4462 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
4463 input, &py_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004464 set_has_py_generic_services();
4465 } else {
4466 goto handle_uninterpreted;
4467 }
4468 if (input->ExpectTag(160)) goto parse_java_generate_equals_and_hash;
4469 break;
4470 }
4471
4472 // optional bool java_generate_equals_and_hash = 20 [default = false];
4473 case 20: {
4474 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
4475 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
4476 parse_java_generate_equals_and_hash:
4477 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4478 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
4479 input, &java_generate_equals_and_hash_)));
4480 set_has_java_generate_equals_and_hash();
kenton@google.comfccb1462009-12-18 02:11:36 +00004481 } else {
4482 goto handle_uninterpreted;
4483 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004484 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
4485 break;
4486 }
4487
4488 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4489 case 999: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004490 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004491 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004492 parse_uninterpreted_option:
4493 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
4494 input, add_uninterpreted_option()));
4495 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004496 goto handle_uninterpreted;
4497 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004498 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
temporal40ee5512008-07-10 02:12:20 +00004499 if (input->ExpectAtEnd()) return true;
4500 break;
4501 }
4502
4503 default: {
4504 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00004505 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
4506 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00004507 return true;
4508 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004509 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004510 DO_(_extensions_.ParseField(tag, input, default_instance_,
4511 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00004512 continue;
4513 }
temporal40ee5512008-07-10 02:12:20 +00004514 DO_(::google::protobuf::internal::WireFormat::SkipField(
4515 input, tag, mutable_unknown_fields()));
4516 break;
4517 }
4518 }
4519 }
4520 return true;
4521#undef DO_
4522}
4523
kenton@google.comd37d46d2009-04-25 02:53:47 +00004524void FileOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00004525 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00004526 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004527 if (has_java_package()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004528 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4529 this->java_package().data(), this->java_package().length(),
4530 ::google::protobuf::internal::WireFormat::SERIALIZE);
4531 ::google::protobuf::internal::WireFormatLite::WriteString(
4532 1, this->java_package(), output);
temporal40ee5512008-07-10 02:12:20 +00004533 }
4534
4535 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004536 if (has_java_outer_classname()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004537 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4538 this->java_outer_classname().data(), this->java_outer_classname().length(),
4539 ::google::protobuf::internal::WireFormat::SERIALIZE);
4540 ::google::protobuf::internal::WireFormatLite::WriteString(
4541 8, this->java_outer_classname(), output);
temporal40ee5512008-07-10 02:12:20 +00004542 }
4543
kenton@google.comd37d46d2009-04-25 02:53:47 +00004544 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00004545 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004546 ::google::protobuf::internal::WireFormatLite::WriteEnum(
4547 9, this->optimize_for(), output);
temporal40ee5512008-07-10 02:12:20 +00004548 }
4549
4550 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00004551 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004552 ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output);
temporal40ee5512008-07-10 02:12:20 +00004553 }
4554
liujisi@google.com33165fe2010-11-02 13:14:58 +00004555 // optional bool cc_generic_services = 16 [default = false];
4556 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004557 ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output);
4558 }
4559
liujisi@google.com33165fe2010-11-02 13:14:58 +00004560 // optional bool java_generic_services = 17 [default = false];
4561 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004562 ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output);
4563 }
4564
liujisi@google.com33165fe2010-11-02 13:14:58 +00004565 // optional bool py_generic_services = 18 [default = false];
4566 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004567 ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output);
4568 }
4569
liujisi@google.com33165fe2010-11-02 13:14:58 +00004570 // optional bool java_generate_equals_and_hash = 20 [default = false];
4571 if (has_java_generate_equals_and_hash()) {
4572 ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output);
4573 }
4574
kenton@google.com24bf56f2008-09-24 20:31:01 +00004575 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004576 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004577 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00004578 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004579 }
4580
4581 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004582 _extensions_.SerializeWithCachedSizes(
4583 1000, 536870912, output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004584
temporal40ee5512008-07-10 02:12:20 +00004585 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004586 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4587 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00004588 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00004589}
4590
4591::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray(
4592 ::google::protobuf::uint8* target) const {
4593 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004594 if (has_java_package()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004595 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4596 this->java_package().data(), this->java_package().length(),
4597 ::google::protobuf::internal::WireFormat::SERIALIZE);
4598 target =
4599 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4600 1, this->java_package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004601 }
4602
4603 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004604 if (has_java_outer_classname()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004605 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
4606 this->java_outer_classname().data(), this->java_outer_classname().length(),
4607 ::google::protobuf::internal::WireFormat::SERIALIZE);
4608 target =
4609 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4610 8, this->java_outer_classname(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004611 }
4612
4613 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00004614 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004615 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4616 9, this->optimize_for(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004617 }
4618
4619 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00004620 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004621 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004622 }
4623
liujisi@google.com33165fe2010-11-02 13:14:58 +00004624 // optional bool cc_generic_services = 16 [default = false];
4625 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004626 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target);
4627 }
4628
liujisi@google.com33165fe2010-11-02 13:14:58 +00004629 // optional bool java_generic_services = 17 [default = false];
4630 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004631 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target);
4632 }
4633
liujisi@google.com33165fe2010-11-02 13:14:58 +00004634 // optional bool py_generic_services = 18 [default = false];
4635 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004636 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target);
4637 }
4638
liujisi@google.com33165fe2010-11-02 13:14:58 +00004639 // optional bool java_generate_equals_and_hash = 20 [default = false];
4640 if (has_java_generate_equals_and_hash()) {
4641 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target);
4642 }
4643
kenton@google.comd37d46d2009-04-25 02:53:47 +00004644 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4645 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004646 target = ::google::protobuf::internal::WireFormatLite::
4647 WriteMessageNoVirtualToArray(
4648 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004649 }
4650
4651 // Extension range [1000, 536870912)
4652 target = _extensions_.SerializeWithCachedSizesToArray(
4653 1000, 536870912, target);
4654
4655 if (!unknown_fields().empty()) {
4656 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
4657 unknown_fields(), target);
4658 }
4659 return target;
temporal40ee5512008-07-10 02:12:20 +00004660}
4661
4662int FileOptions::ByteSize() const {
4663 int total_size = 0;
4664
4665 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
4666 // optional string java_package = 1;
4667 if (has_java_package()) {
4668 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004669 ::google::protobuf::internal::WireFormatLite::StringSize(
4670 this->java_package());
temporal40ee5512008-07-10 02:12:20 +00004671 }
4672
4673 // optional string java_outer_classname = 8;
4674 if (has_java_outer_classname()) {
4675 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004676 ::google::protobuf::internal::WireFormatLite::StringSize(
4677 this->java_outer_classname());
temporal40ee5512008-07-10 02:12:20 +00004678 }
4679
4680 // optional bool java_multiple_files = 10 [default = false];
4681 if (has_java_multiple_files()) {
4682 total_size += 1 + 1;
4683 }
4684
liujisi@google.com33165fe2010-11-02 13:14:58 +00004685 // optional bool java_generate_equals_and_hash = 20 [default = false];
4686 if (has_java_generate_equals_and_hash()) {
4687 total_size += 2 + 1;
4688 }
4689
kenton@google.comd37d46d2009-04-25 02:53:47 +00004690 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00004691 if (has_optimize_for()) {
4692 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004693 ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for());
temporal40ee5512008-07-10 02:12:20 +00004694 }
4695
liujisi@google.com33165fe2010-11-02 13:14:58 +00004696 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00004697 if (has_cc_generic_services()) {
4698 total_size += 2 + 1;
4699 }
4700
liujisi@google.com33165fe2010-11-02 13:14:58 +00004701 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00004702 if (has_java_generic_services()) {
4703 total_size += 2 + 1;
4704 }
4705
liujisi@google.com33165fe2010-11-02 13:14:58 +00004706 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00004707 if (has_py_generic_services()) {
4708 total_size += 2 + 1;
4709 }
4710
temporal40ee5512008-07-10 02:12:20 +00004711 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004712 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004713 total_size += 2 * this->uninterpreted_option_size();
4714 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004715 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00004716 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00004717 this->uninterpreted_option(i));
4718 }
4719
kenton@google.comd37d46d2009-04-25 02:53:47 +00004720 total_size += _extensions_.ByteSize();
kenton@google.com24bf56f2008-09-24 20:31:01 +00004721
temporal40ee5512008-07-10 02:12:20 +00004722 if (!unknown_fields().empty()) {
4723 total_size +=
4724 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4725 unknown_fields());
4726 }
kenton@google.comfccb1462009-12-18 02:11:36 +00004727 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00004728 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00004729 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00004730 return total_size;
4731}
4732
4733void FileOptions::MergeFrom(const ::google::protobuf::Message& from) {
4734 GOOGLE_CHECK_NE(&from, this);
4735 const FileOptions* source =
4736 ::google::protobuf::internal::dynamic_cast_if_available<const FileOptions*>(
4737 &from);
4738 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00004739 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00004740 } else {
4741 MergeFrom(*source);
4742 }
4743}
4744
4745void FileOptions::MergeFrom(const FileOptions& from) {
4746 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004747 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00004748 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004749 if (from.has_java_package()) {
temporal40ee5512008-07-10 02:12:20 +00004750 set_java_package(from.java_package());
4751 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004752 if (from.has_java_outer_classname()) {
temporal40ee5512008-07-10 02:12:20 +00004753 set_java_outer_classname(from.java_outer_classname());
4754 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004755 if (from.has_java_multiple_files()) {
temporal40ee5512008-07-10 02:12:20 +00004756 set_java_multiple_files(from.java_multiple_files());
4757 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004758 if (from.has_java_generate_equals_and_hash()) {
4759 set_java_generate_equals_and_hash(from.java_generate_equals_and_hash());
4760 }
4761 if (from.has_optimize_for()) {
temporal40ee5512008-07-10 02:12:20 +00004762 set_optimize_for(from.optimize_for());
4763 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004764 if (from.has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004765 set_cc_generic_services(from.cc_generic_services());
4766 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004767 if (from.has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004768 set_java_generic_services(from.java_generic_services());
4769 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004770 if (from.has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004771 set_py_generic_services(from.py_generic_services());
4772 }
temporal40ee5512008-07-10 02:12:20 +00004773 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004774 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00004775 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4776}
4777
4778void FileOptions::CopyFrom(const ::google::protobuf::Message& from) {
4779 if (&from == this) return;
4780 Clear();
4781 MergeFrom(from);
4782}
4783
4784void FileOptions::CopyFrom(const FileOptions& from) {
4785 if (&from == this) return;
4786 Clear();
4787 MergeFrom(from);
4788}
4789
kenton@google.comceb561d2009-06-25 19:05:36 +00004790bool FileOptions::IsInitialized() const {
4791
4792 for (int i = 0; i < uninterpreted_option_size(); i++) {
4793 if (!this->uninterpreted_option(i).IsInitialized()) return false;
4794 }
4795
4796 if (!_extensions_.IsInitialized()) return false; return true;
4797}
4798
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004799void FileOptions::Swap(FileOptions* other) {
4800 if (other != this) {
4801 std::swap(java_package_, other->java_package_);
4802 std::swap(java_outer_classname_, other->java_outer_classname_);
4803 std::swap(java_multiple_files_, other->java_multiple_files_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00004804 std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_);
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004805 std::swap(optimize_for_, other->optimize_for_);
kenton@google.comfccb1462009-12-18 02:11:36 +00004806 std::swap(cc_generic_services_, other->cc_generic_services_);
4807 std::swap(java_generic_services_, other->java_generic_services_);
4808 std::swap(py_generic_services_, other->py_generic_services_);
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004809 uninterpreted_option_.Swap(&other->uninterpreted_option_);
4810 std::swap(_has_bits_[0], other->_has_bits_[0]);
4811 _unknown_fields_.Swap(&other->_unknown_fields_);
4812 std::swap(_cached_size_, other->_cached_size_);
4813 _extensions_.Swap(&other->_extensions_);
4814 }
4815}
4816
kenton@google.com80b1d622009-07-29 01:13:20 +00004817::google::protobuf::Metadata FileOptions::GetMetadata() const {
4818 protobuf_AssignDescriptorsOnce();
4819 ::google::protobuf::Metadata metadata;
4820 metadata.descriptor = FileOptions_descriptor_;
4821 metadata.reflection = FileOptions_reflection_;
4822 return metadata;
temporal40ee5512008-07-10 02:12:20 +00004823}
4824
temporal40ee5512008-07-10 02:12:20 +00004825
4826// ===================================================================
4827
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004828#ifndef _MSC_VER
4829const int MessageOptions::kMessageSetWireFormatFieldNumber;
kenton@google.com80b1d622009-07-29 01:13:20 +00004830const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004831const int MessageOptions::kUninterpretedOptionFieldNumber;
4832#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00004833
kenton@google.com573989f2009-10-30 22:02:17 +00004834MessageOptions::MessageOptions()
kenton@google.comfccb1462009-12-18 02:11:36 +00004835 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004836 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00004837}
4838
kenton@google.com80b1d622009-07-29 01:13:20 +00004839void MessageOptions::InitAsDefaultInstance() {
4840}
kenton@google.com24bf56f2008-09-24 20:31:01 +00004841
kenton@google.com573989f2009-10-30 22:02:17 +00004842MessageOptions::MessageOptions(const MessageOptions& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00004843 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004844 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00004845 MergeFrom(from);
4846}
4847
kenton@google.comd37d46d2009-04-25 02:53:47 +00004848void MessageOptions::SharedCtor() {
4849 _cached_size_ = 0;
4850 message_set_wire_format_ = false;
kenton@google.com80b1d622009-07-29 01:13:20 +00004851 no_standard_descriptor_accessor_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00004852 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4853}
4854
temporal40ee5512008-07-10 02:12:20 +00004855MessageOptions::~MessageOptions() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004856 SharedDtor();
4857}
4858
4859void MessageOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004860 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004861 }
4862}
4863
kenton@google.comfccb1462009-12-18 02:11:36 +00004864void MessageOptions::SetCachedSize(int size) const {
4865 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4866 _cached_size_ = size;
4867 GOOGLE_SAFE_CONCURRENT_WRITES_END();
4868}
temporal40ee5512008-07-10 02:12:20 +00004869const ::google::protobuf::Descriptor* MessageOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004870 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004871 return MessageOptions_descriptor_;
4872}
4873
kenton@google.com24bf56f2008-09-24 20:31:01 +00004874const MessageOptions& MessageOptions::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004875 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00004876}
4877
4878MessageOptions* MessageOptions::default_instance_ = NULL;
4879
temporal40ee5512008-07-10 02:12:20 +00004880MessageOptions* MessageOptions::New() const {
4881 return new MessageOptions;
4882}
4883
4884void MessageOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004885 _extensions_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004886 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
4887 message_set_wire_format_ = false;
kenton@google.com80b1d622009-07-29 01:13:20 +00004888 no_standard_descriptor_accessor_ = false;
temporal40ee5512008-07-10 02:12:20 +00004889 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004890 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004891 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4892 mutable_unknown_fields()->Clear();
4893}
4894
4895bool MessageOptions::MergePartialFromCodedStream(
4896 ::google::protobuf::io::CodedInputStream* input) {
4897#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4898 ::google::protobuf::uint32 tag;
4899 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004900 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00004901 // optional bool message_set_wire_format = 1 [default = false];
4902 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004903 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004904 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004905 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4906 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
4907 input, &message_set_wire_format_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004908 set_has_message_set_wire_format();
kenton@google.comfccb1462009-12-18 02:11:36 +00004909 } else {
temporal40ee5512008-07-10 02:12:20 +00004910 goto handle_uninterpreted;
4911 }
kenton@google.com80b1d622009-07-29 01:13:20 +00004912 if (input->ExpectTag(16)) goto parse_no_standard_descriptor_accessor;
4913 break;
4914 }
4915
4916 // optional bool no_standard_descriptor_accessor = 2 [default = false];
4917 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004918 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004919 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004920 parse_no_standard_descriptor_accessor:
4921 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4922 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
4923 input, &no_standard_descriptor_accessor_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004924 set_has_no_standard_descriptor_accessor();
kenton@google.comfccb1462009-12-18 02:11:36 +00004925 } else {
kenton@google.com80b1d622009-07-29 01:13:20 +00004926 goto handle_uninterpreted;
4927 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004928 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
4929 break;
4930 }
4931
4932 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4933 case 999: {
kenton@google.comfccb1462009-12-18 02:11:36 +00004934 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004935 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004936 parse_uninterpreted_option:
4937 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
4938 input, add_uninterpreted_option()));
4939 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004940 goto handle_uninterpreted;
4941 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004942 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
temporal40ee5512008-07-10 02:12:20 +00004943 if (input->ExpectAtEnd()) return true;
4944 break;
4945 }
4946
4947 default: {
4948 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00004949 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
4950 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00004951 return true;
4952 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004953 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004954 DO_(_extensions_.ParseField(tag, input, default_instance_,
4955 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00004956 continue;
4957 }
temporal40ee5512008-07-10 02:12:20 +00004958 DO_(::google::protobuf::internal::WireFormat::SkipField(
4959 input, tag, mutable_unknown_fields()));
4960 break;
4961 }
4962 }
4963 }
4964 return true;
4965#undef DO_
4966}
4967
kenton@google.comd37d46d2009-04-25 02:53:47 +00004968void MessageOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00004969 ::google::protobuf::io::CodedOutputStream* output) const {
temporal40ee5512008-07-10 02:12:20 +00004970 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00004971 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004972 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output);
4973 }
4974
4975 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00004976 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004977 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output);
temporal40ee5512008-07-10 02:12:20 +00004978 }
4979
kenton@google.com24bf56f2008-09-24 20:31:01 +00004980 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004981 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004982 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00004983 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004984 }
4985
4986 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004987 _extensions_.SerializeWithCachedSizes(
4988 1000, 536870912, output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004989
temporal40ee5512008-07-10 02:12:20 +00004990 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004991 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4992 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00004993 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00004994}
4995
4996::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray(
4997 ::google::protobuf::uint8* target) const {
4998 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00004999 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005000 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target);
5001 }
5002
5003 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00005004 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005005 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005006 }
5007
5008 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5009 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005010 target = ::google::protobuf::internal::WireFormatLite::
5011 WriteMessageNoVirtualToArray(
5012 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005013 }
5014
5015 // Extension range [1000, 536870912)
5016 target = _extensions_.SerializeWithCachedSizesToArray(
5017 1000, 536870912, target);
5018
5019 if (!unknown_fields().empty()) {
5020 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5021 unknown_fields(), target);
5022 }
5023 return target;
temporal40ee5512008-07-10 02:12:20 +00005024}
5025
5026int MessageOptions::ByteSize() const {
5027 int total_size = 0;
5028
5029 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
5030 // optional bool message_set_wire_format = 1 [default = false];
5031 if (has_message_set_wire_format()) {
5032 total_size += 1 + 1;
5033 }
5034
kenton@google.com80b1d622009-07-29 01:13:20 +00005035 // optional bool no_standard_descriptor_accessor = 2 [default = false];
5036 if (has_no_standard_descriptor_accessor()) {
5037 total_size += 1 + 1;
5038 }
5039
temporal40ee5512008-07-10 02:12:20 +00005040 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005041 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005042 total_size += 2 * this->uninterpreted_option_size();
5043 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005044 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00005045 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00005046 this->uninterpreted_option(i));
5047 }
5048
kenton@google.comd37d46d2009-04-25 02:53:47 +00005049 total_size += _extensions_.ByteSize();
kenton@google.com24bf56f2008-09-24 20:31:01 +00005050
temporal40ee5512008-07-10 02:12:20 +00005051 if (!unknown_fields().empty()) {
5052 total_size +=
5053 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5054 unknown_fields());
5055 }
kenton@google.comfccb1462009-12-18 02:11:36 +00005056 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00005057 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00005058 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00005059 return total_size;
5060}
5061
5062void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) {
5063 GOOGLE_CHECK_NE(&from, this);
5064 const MessageOptions* source =
5065 ::google::protobuf::internal::dynamic_cast_if_available<const MessageOptions*>(
5066 &from);
5067 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00005068 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00005069 } else {
5070 MergeFrom(*source);
5071 }
5072}
5073
5074void MessageOptions::MergeFrom(const MessageOptions& from) {
5075 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005076 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00005077 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005078 if (from.has_message_set_wire_format()) {
temporal40ee5512008-07-10 02:12:20 +00005079 set_message_set_wire_format(from.message_set_wire_format());
5080 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005081 if (from.has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005082 set_no_standard_descriptor_accessor(from.no_standard_descriptor_accessor());
5083 }
temporal40ee5512008-07-10 02:12:20 +00005084 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005085 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00005086 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5087}
5088
5089void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) {
5090 if (&from == this) return;
5091 Clear();
5092 MergeFrom(from);
5093}
5094
5095void MessageOptions::CopyFrom(const MessageOptions& from) {
5096 if (&from == this) return;
5097 Clear();
5098 MergeFrom(from);
5099}
5100
kenton@google.comceb561d2009-06-25 19:05:36 +00005101bool MessageOptions::IsInitialized() const {
5102
5103 for (int i = 0; i < uninterpreted_option_size(); i++) {
5104 if (!this->uninterpreted_option(i).IsInitialized()) return false;
5105 }
5106
5107 if (!_extensions_.IsInitialized()) return false; return true;
5108}
5109
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005110void MessageOptions::Swap(MessageOptions* other) {
5111 if (other != this) {
5112 std::swap(message_set_wire_format_, other->message_set_wire_format_);
kenton@google.com80b1d622009-07-29 01:13:20 +00005113 std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_);
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005114 uninterpreted_option_.Swap(&other->uninterpreted_option_);
5115 std::swap(_has_bits_[0], other->_has_bits_[0]);
5116 _unknown_fields_.Swap(&other->_unknown_fields_);
5117 std::swap(_cached_size_, other->_cached_size_);
5118 _extensions_.Swap(&other->_extensions_);
5119 }
5120}
5121
kenton@google.com80b1d622009-07-29 01:13:20 +00005122::google::protobuf::Metadata MessageOptions::GetMetadata() const {
5123 protobuf_AssignDescriptorsOnce();
5124 ::google::protobuf::Metadata metadata;
5125 metadata.descriptor = MessageOptions_descriptor_;
5126 metadata.reflection = MessageOptions_reflection_;
5127 return metadata;
temporal40ee5512008-07-10 02:12:20 +00005128}
5129
temporal40ee5512008-07-10 02:12:20 +00005130
5131// ===================================================================
5132
5133const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005134 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005135 return FieldOptions_CType_descriptor_;
5136}
5137bool FieldOptions_CType_IsValid(int value) {
5138 switch(value) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005139 case 0:
temporal40ee5512008-07-10 02:12:20 +00005140 case 1:
5141 case 2:
5142 return true;
5143 default:
5144 return false;
5145 }
5146}
5147
5148#ifndef _MSC_VER
kenton@google.comfccb1462009-12-18 02:11:36 +00005149const FieldOptions_CType FieldOptions::STRING;
temporal40ee5512008-07-10 02:12:20 +00005150const FieldOptions_CType FieldOptions::CORD;
5151const FieldOptions_CType FieldOptions::STRING_PIECE;
5152const FieldOptions_CType FieldOptions::CType_MIN;
5153const FieldOptions_CType FieldOptions::CType_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00005154const int FieldOptions::CType_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00005155#endif // _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005156#ifndef _MSC_VER
5157const int FieldOptions::kCtypeFieldNumber;
5158const int FieldOptions::kPackedFieldNumber;
kenton@google.comd37d46d2009-04-25 02:53:47 +00005159const int FieldOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005160const int FieldOptions::kExperimentalMapKeyFieldNumber;
5161const int FieldOptions::kUninterpretedOptionFieldNumber;
5162#endif // !_MSC_VER
kenton@google.com24bf56f2008-09-24 20:31:01 +00005163
kenton@google.com573989f2009-10-30 22:02:17 +00005164FieldOptions::FieldOptions()
kenton@google.comfccb1462009-12-18 02:11:36 +00005165 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005166 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005167}
5168
kenton@google.com80b1d622009-07-29 01:13:20 +00005169void FieldOptions::InitAsDefaultInstance() {
5170}
kenton@google.com24bf56f2008-09-24 20:31:01 +00005171
kenton@google.com573989f2009-10-30 22:02:17 +00005172FieldOptions::FieldOptions(const FieldOptions& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00005173 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005174 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005175 MergeFrom(from);
5176}
5177
kenton@google.comd37d46d2009-04-25 02:53:47 +00005178void FieldOptions::SharedCtor() {
5179 _cached_size_ = 0;
kenton@google.comfccb1462009-12-18 02:11:36 +00005180 ctype_ = 0;
kenton@google.comd37d46d2009-04-25 02:53:47 +00005181 packed_ = false;
5182 deprecated_ = false;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005183 experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005184 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5185}
5186
temporal40ee5512008-07-10 02:12:20 +00005187FieldOptions::~FieldOptions() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005188 SharedDtor();
5189}
5190
5191void FieldOptions::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005192 if (experimental_map_key_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00005193 delete experimental_map_key_;
5194 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005195 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00005196 }
5197}
5198
kenton@google.comfccb1462009-12-18 02:11:36 +00005199void FieldOptions::SetCachedSize(int size) const {
5200 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5201 _cached_size_ = size;
5202 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5203}
temporal40ee5512008-07-10 02:12:20 +00005204const ::google::protobuf::Descriptor* FieldOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005205 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005206 return FieldOptions_descriptor_;
5207}
5208
kenton@google.com24bf56f2008-09-24 20:31:01 +00005209const FieldOptions& FieldOptions::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005210 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005211}
5212
5213FieldOptions* FieldOptions::default_instance_ = NULL;
5214
temporal40ee5512008-07-10 02:12:20 +00005215FieldOptions* FieldOptions::New() const {
5216 return new FieldOptions;
5217}
5218
5219void FieldOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005220 _extensions_.Clear();
temporal40ee5512008-07-10 02:12:20 +00005221 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005222 ctype_ = 0;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005223 packed_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00005224 deprecated_ = false;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005225 if (has_experimental_map_key()) {
5226 if (experimental_map_key_ != &::google::protobuf::internal::kEmptyString) {
temporal40ee5512008-07-10 02:12:20 +00005227 experimental_map_key_->clear();
5228 }
5229 }
5230 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005231 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00005232 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5233 mutable_unknown_fields()->Clear();
5234}
5235
5236bool FieldOptions::MergePartialFromCodedStream(
5237 ::google::protobuf::io::CodedInputStream* input) {
5238#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
5239 ::google::protobuf::uint32 tag;
5240 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005241 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005242 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +00005243 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00005244 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005245 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005246 int value;
5247 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
5248 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
5249 input, &value)));
5250 if (::google::protobuf::FieldOptions_CType_IsValid(value)) {
5251 set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value));
5252 } else {
5253 mutable_unknown_fields()->AddVarint(1, value);
5254 }
temporal40ee5512008-07-10 02:12:20 +00005255 } else {
kenton@google.comfccb1462009-12-18 02:11:36 +00005256 goto handle_uninterpreted;
temporal40ee5512008-07-10 02:12:20 +00005257 }
kenton@google.com2d6daa72009-01-22 01:27:00 +00005258 if (input->ExpectTag(16)) goto parse_packed;
5259 break;
5260 }
5261
5262 // optional bool packed = 2;
5263 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00005264 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005265 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005266 parse_packed:
5267 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
5268 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
5269 input, &packed_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00005270 set_has_packed();
kenton@google.comfccb1462009-12-18 02:11:36 +00005271 } else {
kenton@google.com2d6daa72009-01-22 01:27:00 +00005272 goto handle_uninterpreted;
5273 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00005274 if (input->ExpectTag(24)) goto parse_deprecated;
5275 break;
5276 }
5277
5278 // optional bool deprecated = 3 [default = false];
5279 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00005280 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005281 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005282 parse_deprecated:
5283 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
5284 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
5285 input, &deprecated_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00005286 set_has_deprecated();
kenton@google.comfccb1462009-12-18 02:11:36 +00005287 } else {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005288 goto handle_uninterpreted;
5289 }
temporal40ee5512008-07-10 02:12:20 +00005290 if (input->ExpectTag(74)) goto parse_experimental_map_key;
5291 break;
5292 }
5293
5294 // optional string experimental_map_key = 9;
5295 case 9: {
kenton@google.comfccb1462009-12-18 02:11:36 +00005296 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005297 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005298 parse_experimental_map_key:
5299 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5300 input, this->mutable_experimental_map_key()));
5301 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
5302 this->experimental_map_key().data(), this->experimental_map_key().length(),
5303 ::google::protobuf::internal::WireFormat::PARSE);
5304 } else {
temporal40ee5512008-07-10 02:12:20 +00005305 goto handle_uninterpreted;
5306 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005307 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
5308 break;
5309 }
5310
5311 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5312 case 999: {
kenton@google.comfccb1462009-12-18 02:11:36 +00005313 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005314 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005315 parse_uninterpreted_option:
5316 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
5317 input, add_uninterpreted_option()));
5318 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005319 goto handle_uninterpreted;
5320 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005321 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
temporal40ee5512008-07-10 02:12:20 +00005322 if (input->ExpectAtEnd()) return true;
5323 break;
5324 }
5325
5326 default: {
5327 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00005328 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
5329 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
temporal40ee5512008-07-10 02:12:20 +00005330 return true;
5331 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005332 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005333 DO_(_extensions_.ParseField(tag, input, default_instance_,
5334 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00005335 continue;
5336 }
temporal40ee5512008-07-10 02:12:20 +00005337 DO_(::google::protobuf::internal::WireFormat::SkipField(
5338 input, tag, mutable_unknown_fields()));
5339 break;
5340 }
5341 }
5342 }
5343 return true;
5344#undef DO_
5345}
5346
kenton@google.comd37d46d2009-04-25 02:53:47 +00005347void FieldOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00005348 ::google::protobuf::io::CodedOutputStream* output) const {
kenton@google.comfccb1462009-12-18 02:11:36 +00005349 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +00005350 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005351 ::google::protobuf::internal::WireFormatLite::WriteEnum(
5352 1, this->ctype(), output);
temporal40ee5512008-07-10 02:12:20 +00005353 }
5354
kenton@google.com2d6daa72009-01-22 01:27:00 +00005355 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005356 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005357 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005358 }
5359
5360 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00005361 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005362 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
kenton@google.com2d6daa72009-01-22 01:27:00 +00005363 }
5364
5365 // optional string experimental_map_key = 9;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005366 if (has_experimental_map_key()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005367 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
5368 this->experimental_map_key().data(), this->experimental_map_key().length(),
5369 ::google::protobuf::internal::WireFormat::SERIALIZE);
5370 ::google::protobuf::internal::WireFormatLite::WriteString(
5371 9, this->experimental_map_key(), output);
temporal40ee5512008-07-10 02:12:20 +00005372 }
5373
kenton@google.com24bf56f2008-09-24 20:31:01 +00005374 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005375 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005376 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00005377 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005378 }
5379
5380 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005381 _extensions_.SerializeWithCachedSizes(
5382 1000, 536870912, output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005383
temporal40ee5512008-07-10 02:12:20 +00005384 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005385 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5386 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00005387 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00005388}
5389
5390::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray(
5391 ::google::protobuf::uint8* target) const {
kenton@google.comfccb1462009-12-18 02:11:36 +00005392 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +00005393 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005394 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
5395 1, this->ctype(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005396 }
5397
5398 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005399 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005400 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005401 }
5402
5403 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00005404 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005405 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005406 }
5407
5408 // optional string experimental_map_key = 9;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005409 if (has_experimental_map_key()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005410 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
5411 this->experimental_map_key().data(), this->experimental_map_key().length(),
5412 ::google::protobuf::internal::WireFormat::SERIALIZE);
5413 target =
5414 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5415 9, this->experimental_map_key(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005416 }
5417
5418 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5419 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005420 target = ::google::protobuf::internal::WireFormatLite::
5421 WriteMessageNoVirtualToArray(
5422 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005423 }
5424
5425 // Extension range [1000, 536870912)
5426 target = _extensions_.SerializeWithCachedSizesToArray(
5427 1000, 536870912, target);
5428
5429 if (!unknown_fields().empty()) {
5430 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5431 unknown_fields(), target);
5432 }
5433 return target;
temporal40ee5512008-07-10 02:12:20 +00005434}
5435
5436int FieldOptions::ByteSize() const {
5437 int total_size = 0;
5438
5439 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005440 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +00005441 if (has_ctype()) {
5442 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005443 ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype());
temporal40ee5512008-07-10 02:12:20 +00005444 }
5445
kenton@google.com2d6daa72009-01-22 01:27:00 +00005446 // optional bool packed = 2;
5447 if (has_packed()) {
5448 total_size += 1 + 1;
5449 }
5450
kenton@google.comd37d46d2009-04-25 02:53:47 +00005451 // optional bool deprecated = 3 [default = false];
5452 if (has_deprecated()) {
5453 total_size += 1 + 1;
5454 }
5455
temporal40ee5512008-07-10 02:12:20 +00005456 // optional string experimental_map_key = 9;
5457 if (has_experimental_map_key()) {
5458 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005459 ::google::protobuf::internal::WireFormatLite::StringSize(
5460 this->experimental_map_key());
temporal40ee5512008-07-10 02:12:20 +00005461 }
5462
5463 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005464 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005465 total_size += 2 * this->uninterpreted_option_size();
5466 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005467 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00005468 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00005469 this->uninterpreted_option(i));
5470 }
5471
kenton@google.comd37d46d2009-04-25 02:53:47 +00005472 total_size += _extensions_.ByteSize();
kenton@google.com24bf56f2008-09-24 20:31:01 +00005473
temporal40ee5512008-07-10 02:12:20 +00005474 if (!unknown_fields().empty()) {
5475 total_size +=
5476 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5477 unknown_fields());
5478 }
kenton@google.comfccb1462009-12-18 02:11:36 +00005479 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00005480 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00005481 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00005482 return total_size;
5483}
5484
5485void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) {
5486 GOOGLE_CHECK_NE(&from, this);
5487 const FieldOptions* source =
5488 ::google::protobuf::internal::dynamic_cast_if_available<const FieldOptions*>(
5489 &from);
5490 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00005491 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00005492 } else {
5493 MergeFrom(*source);
5494 }
5495}
5496
5497void FieldOptions::MergeFrom(const FieldOptions& from) {
5498 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005499 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00005500 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005501 if (from.has_ctype()) {
temporal40ee5512008-07-10 02:12:20 +00005502 set_ctype(from.ctype());
5503 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005504 if (from.has_packed()) {
kenton@google.com2d6daa72009-01-22 01:27:00 +00005505 set_packed(from.packed());
5506 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005507 if (from.has_deprecated()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005508 set_deprecated(from.deprecated());
5509 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005510 if (from.has_experimental_map_key()) {
temporal40ee5512008-07-10 02:12:20 +00005511 set_experimental_map_key(from.experimental_map_key());
5512 }
5513 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005514 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00005515 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5516}
5517
5518void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) {
5519 if (&from == this) return;
5520 Clear();
5521 MergeFrom(from);
5522}
5523
5524void FieldOptions::CopyFrom(const FieldOptions& from) {
5525 if (&from == this) return;
5526 Clear();
5527 MergeFrom(from);
5528}
5529
kenton@google.comceb561d2009-06-25 19:05:36 +00005530bool FieldOptions::IsInitialized() const {
5531
5532 for (int i = 0; i < uninterpreted_option_size(); i++) {
5533 if (!this->uninterpreted_option(i).IsInitialized()) return false;
5534 }
5535
5536 if (!_extensions_.IsInitialized()) return false; return true;
5537}
5538
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005539void FieldOptions::Swap(FieldOptions* other) {
5540 if (other != this) {
5541 std::swap(ctype_, other->ctype_);
kenton@google.com2d6daa72009-01-22 01:27:00 +00005542 std::swap(packed_, other->packed_);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005543 std::swap(deprecated_, other->deprecated_);
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005544 std::swap(experimental_map_key_, other->experimental_map_key_);
5545 uninterpreted_option_.Swap(&other->uninterpreted_option_);
5546 std::swap(_has_bits_[0], other->_has_bits_[0]);
5547 _unknown_fields_.Swap(&other->_unknown_fields_);
5548 std::swap(_cached_size_, other->_cached_size_);
5549 _extensions_.Swap(&other->_extensions_);
5550 }
5551}
5552
kenton@google.com80b1d622009-07-29 01:13:20 +00005553::google::protobuf::Metadata FieldOptions::GetMetadata() const {
5554 protobuf_AssignDescriptorsOnce();
5555 ::google::protobuf::Metadata metadata;
5556 metadata.descriptor = FieldOptions_descriptor_;
5557 metadata.reflection = FieldOptions_reflection_;
5558 return metadata;
temporal40ee5512008-07-10 02:12:20 +00005559}
5560
temporal40ee5512008-07-10 02:12:20 +00005561
5562// ===================================================================
5563
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005564#ifndef _MSC_VER
5565const int EnumOptions::kUninterpretedOptionFieldNumber;
5566#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00005567
kenton@google.com573989f2009-10-30 22:02:17 +00005568EnumOptions::EnumOptions()
kenton@google.comfccb1462009-12-18 02:11:36 +00005569 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005570 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005571}
5572
kenton@google.com80b1d622009-07-29 01:13:20 +00005573void EnumOptions::InitAsDefaultInstance() {
5574}
kenton@google.com24bf56f2008-09-24 20:31:01 +00005575
kenton@google.com573989f2009-10-30 22:02:17 +00005576EnumOptions::EnumOptions(const EnumOptions& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00005577 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005578 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005579 MergeFrom(from);
5580}
5581
kenton@google.comd37d46d2009-04-25 02:53:47 +00005582void EnumOptions::SharedCtor() {
5583 _cached_size_ = 0;
5584 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5585}
5586
temporal40ee5512008-07-10 02:12:20 +00005587EnumOptions::~EnumOptions() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005588 SharedDtor();
5589}
5590
5591void EnumOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005592 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00005593 }
5594}
5595
kenton@google.comfccb1462009-12-18 02:11:36 +00005596void EnumOptions::SetCachedSize(int size) const {
5597 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5598 _cached_size_ = size;
5599 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5600}
temporal40ee5512008-07-10 02:12:20 +00005601const ::google::protobuf::Descriptor* EnumOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005602 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005603 return EnumOptions_descriptor_;
5604}
5605
kenton@google.com24bf56f2008-09-24 20:31:01 +00005606const EnumOptions& EnumOptions::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005607 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005608}
5609
5610EnumOptions* EnumOptions::default_instance_ = NULL;
5611
temporal40ee5512008-07-10 02:12:20 +00005612EnumOptions* EnumOptions::New() const {
5613 return new EnumOptions;
5614}
5615
5616void EnumOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005617 _extensions_.Clear();
5618 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00005619 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5620 mutable_unknown_fields()->Clear();
5621}
5622
5623bool EnumOptions::MergePartialFromCodedStream(
5624 ::google::protobuf::io::CodedInputStream* input) {
5625#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
5626 ::google::protobuf::uint32 tag;
5627 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005628 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005629 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5630 case 999: {
kenton@google.comfccb1462009-12-18 02:11:36 +00005631 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005632 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005633 parse_uninterpreted_option:
5634 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
5635 input, add_uninterpreted_option()));
5636 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005637 goto handle_uninterpreted;
5638 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005639 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
5640 if (input->ExpectAtEnd()) return true;
5641 break;
5642 }
5643
5644 default: {
5645 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00005646 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
5647 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005648 return true;
5649 }
5650 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005651 DO_(_extensions_.ParseField(tag, input, default_instance_,
5652 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00005653 continue;
5654 }
5655 DO_(::google::protobuf::internal::WireFormat::SkipField(
5656 input, tag, mutable_unknown_fields()));
5657 break;
5658 }
temporal40ee5512008-07-10 02:12:20 +00005659 }
temporal40ee5512008-07-10 02:12:20 +00005660 }
5661 return true;
5662#undef DO_
5663}
5664
kenton@google.comd37d46d2009-04-25 02:53:47 +00005665void EnumOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00005666 ::google::protobuf::io::CodedOutputStream* output) const {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005667 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005668 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005669 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00005670 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005671 }
5672
5673 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005674 _extensions_.SerializeWithCachedSizes(
5675 1000, 536870912, output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005676
temporal40ee5512008-07-10 02:12:20 +00005677 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005678 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5679 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00005680 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00005681}
5682
5683::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray(
5684 ::google::protobuf::uint8* target) const {
5685 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5686 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005687 target = ::google::protobuf::internal::WireFormatLite::
5688 WriteMessageNoVirtualToArray(
5689 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005690 }
5691
5692 // Extension range [1000, 536870912)
5693 target = _extensions_.SerializeWithCachedSizesToArray(
5694 1000, 536870912, target);
5695
5696 if (!unknown_fields().empty()) {
5697 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5698 unknown_fields(), target);
5699 }
5700 return target;
temporal40ee5512008-07-10 02:12:20 +00005701}
5702
5703int EnumOptions::ByteSize() const {
5704 int total_size = 0;
5705
kenton@google.com24bf56f2008-09-24 20:31:01 +00005706 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005707 total_size += 2 * this->uninterpreted_option_size();
5708 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005709 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00005710 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00005711 this->uninterpreted_option(i));
5712 }
5713
kenton@google.comd37d46d2009-04-25 02:53:47 +00005714 total_size += _extensions_.ByteSize();
kenton@google.com24bf56f2008-09-24 20:31:01 +00005715
temporal40ee5512008-07-10 02:12:20 +00005716 if (!unknown_fields().empty()) {
5717 total_size +=
5718 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5719 unknown_fields());
5720 }
kenton@google.comfccb1462009-12-18 02:11:36 +00005721 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00005722 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00005723 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00005724 return total_size;
5725}
5726
5727void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) {
5728 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005729 const EnumOptions* source =
5730 ::google::protobuf::internal::dynamic_cast_if_available<const EnumOptions*>(
5731 &from);
5732 if (source == NULL) {
5733 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5734 } else {
5735 MergeFrom(*source);
5736 }
temporal40ee5512008-07-10 02:12:20 +00005737}
5738
5739void EnumOptions::MergeFrom(const EnumOptions& from) {
5740 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005741 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
5742 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00005743 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5744}
5745
5746void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) {
5747 if (&from == this) return;
5748 Clear();
5749 MergeFrom(from);
5750}
5751
5752void EnumOptions::CopyFrom(const EnumOptions& from) {
5753 if (&from == this) return;
5754 Clear();
5755 MergeFrom(from);
5756}
5757
kenton@google.comceb561d2009-06-25 19:05:36 +00005758bool EnumOptions::IsInitialized() const {
5759
5760 for (int i = 0; i < uninterpreted_option_size(); i++) {
5761 if (!this->uninterpreted_option(i).IsInitialized()) return false;
5762 }
5763
5764 if (!_extensions_.IsInitialized()) return false; return true;
5765}
5766
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005767void EnumOptions::Swap(EnumOptions* other) {
5768 if (other != this) {
5769 uninterpreted_option_.Swap(&other->uninterpreted_option_);
5770 std::swap(_has_bits_[0], other->_has_bits_[0]);
5771 _unknown_fields_.Swap(&other->_unknown_fields_);
5772 std::swap(_cached_size_, other->_cached_size_);
5773 _extensions_.Swap(&other->_extensions_);
5774 }
5775}
5776
kenton@google.com80b1d622009-07-29 01:13:20 +00005777::google::protobuf::Metadata EnumOptions::GetMetadata() const {
5778 protobuf_AssignDescriptorsOnce();
5779 ::google::protobuf::Metadata metadata;
5780 metadata.descriptor = EnumOptions_descriptor_;
5781 metadata.reflection = EnumOptions_reflection_;
5782 return metadata;
temporal40ee5512008-07-10 02:12:20 +00005783}
5784
temporal40ee5512008-07-10 02:12:20 +00005785
5786// ===================================================================
5787
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005788#ifndef _MSC_VER
5789const int EnumValueOptions::kUninterpretedOptionFieldNumber;
5790#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00005791
kenton@google.com573989f2009-10-30 22:02:17 +00005792EnumValueOptions::EnumValueOptions()
kenton@google.comfccb1462009-12-18 02:11:36 +00005793 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005794 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005795}
5796
kenton@google.com80b1d622009-07-29 01:13:20 +00005797void EnumValueOptions::InitAsDefaultInstance() {
5798}
kenton@google.com24bf56f2008-09-24 20:31:01 +00005799
kenton@google.com573989f2009-10-30 22:02:17 +00005800EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00005801 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005802 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005803 MergeFrom(from);
5804}
5805
kenton@google.comd37d46d2009-04-25 02:53:47 +00005806void EnumValueOptions::SharedCtor() {
5807 _cached_size_ = 0;
5808 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5809}
5810
temporal40ee5512008-07-10 02:12:20 +00005811EnumValueOptions::~EnumValueOptions() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005812 SharedDtor();
5813}
5814
5815void EnumValueOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005816 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00005817 }
5818}
5819
kenton@google.comfccb1462009-12-18 02:11:36 +00005820void EnumValueOptions::SetCachedSize(int size) const {
5821 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5822 _cached_size_ = size;
5823 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5824}
temporal40ee5512008-07-10 02:12:20 +00005825const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005826 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005827 return EnumValueOptions_descriptor_;
5828}
5829
kenton@google.com24bf56f2008-09-24 20:31:01 +00005830const EnumValueOptions& EnumValueOptions::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005831 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005832}
5833
5834EnumValueOptions* EnumValueOptions::default_instance_ = NULL;
5835
temporal40ee5512008-07-10 02:12:20 +00005836EnumValueOptions* EnumValueOptions::New() const {
5837 return new EnumValueOptions;
5838}
5839
5840void EnumValueOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005841 _extensions_.Clear();
5842 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00005843 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5844 mutable_unknown_fields()->Clear();
5845}
5846
5847bool EnumValueOptions::MergePartialFromCodedStream(
5848 ::google::protobuf::io::CodedInputStream* input) {
5849#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
5850 ::google::protobuf::uint32 tag;
5851 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005852 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005853 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5854 case 999: {
kenton@google.comfccb1462009-12-18 02:11:36 +00005855 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005856 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005857 parse_uninterpreted_option:
5858 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
5859 input, add_uninterpreted_option()));
5860 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005861 goto handle_uninterpreted;
5862 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00005863 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
5864 if (input->ExpectAtEnd()) return true;
5865 break;
5866 }
5867
5868 default: {
5869 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00005870 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
5871 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005872 return true;
5873 }
5874 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005875 DO_(_extensions_.ParseField(tag, input, default_instance_,
5876 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00005877 continue;
5878 }
5879 DO_(::google::protobuf::internal::WireFormat::SkipField(
5880 input, tag, mutable_unknown_fields()));
5881 break;
5882 }
temporal40ee5512008-07-10 02:12:20 +00005883 }
temporal40ee5512008-07-10 02:12:20 +00005884 }
5885 return true;
5886#undef DO_
5887}
5888
kenton@google.comd37d46d2009-04-25 02:53:47 +00005889void EnumValueOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00005890 ::google::protobuf::io::CodedOutputStream* output) const {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005891 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005892 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005893 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00005894 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005895 }
5896
5897 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005898 _extensions_.SerializeWithCachedSizes(
5899 1000, 536870912, output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005900
temporal40ee5512008-07-10 02:12:20 +00005901 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005902 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5903 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00005904 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00005905}
5906
5907::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray(
5908 ::google::protobuf::uint8* target) const {
5909 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5910 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005911 target = ::google::protobuf::internal::WireFormatLite::
5912 WriteMessageNoVirtualToArray(
5913 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005914 }
5915
5916 // Extension range [1000, 536870912)
5917 target = _extensions_.SerializeWithCachedSizesToArray(
5918 1000, 536870912, target);
5919
5920 if (!unknown_fields().empty()) {
5921 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5922 unknown_fields(), target);
5923 }
5924 return target;
temporal40ee5512008-07-10 02:12:20 +00005925}
5926
5927int EnumValueOptions::ByteSize() const {
5928 int total_size = 0;
5929
kenton@google.com24bf56f2008-09-24 20:31:01 +00005930 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005931 total_size += 2 * this->uninterpreted_option_size();
5932 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005933 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00005934 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00005935 this->uninterpreted_option(i));
5936 }
5937
kenton@google.comd37d46d2009-04-25 02:53:47 +00005938 total_size += _extensions_.ByteSize();
kenton@google.com24bf56f2008-09-24 20:31:01 +00005939
temporal40ee5512008-07-10 02:12:20 +00005940 if (!unknown_fields().empty()) {
5941 total_size +=
5942 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5943 unknown_fields());
5944 }
kenton@google.comfccb1462009-12-18 02:11:36 +00005945 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00005946 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00005947 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00005948 return total_size;
5949}
5950
5951void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) {
5952 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005953 const EnumValueOptions* source =
5954 ::google::protobuf::internal::dynamic_cast_if_available<const EnumValueOptions*>(
5955 &from);
5956 if (source == NULL) {
5957 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5958 } else {
5959 MergeFrom(*source);
5960 }
temporal40ee5512008-07-10 02:12:20 +00005961}
5962
5963void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
5964 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005965 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
5966 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00005967 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5968}
5969
5970void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) {
5971 if (&from == this) return;
5972 Clear();
5973 MergeFrom(from);
5974}
5975
5976void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
5977 if (&from == this) return;
5978 Clear();
5979 MergeFrom(from);
5980}
5981
kenton@google.comceb561d2009-06-25 19:05:36 +00005982bool EnumValueOptions::IsInitialized() const {
5983
5984 for (int i = 0; i < uninterpreted_option_size(); i++) {
5985 if (!this->uninterpreted_option(i).IsInitialized()) return false;
5986 }
5987
5988 if (!_extensions_.IsInitialized()) return false; return true;
5989}
5990
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005991void EnumValueOptions::Swap(EnumValueOptions* other) {
5992 if (other != this) {
5993 uninterpreted_option_.Swap(&other->uninterpreted_option_);
5994 std::swap(_has_bits_[0], other->_has_bits_[0]);
5995 _unknown_fields_.Swap(&other->_unknown_fields_);
5996 std::swap(_cached_size_, other->_cached_size_);
5997 _extensions_.Swap(&other->_extensions_);
5998 }
5999}
6000
kenton@google.com80b1d622009-07-29 01:13:20 +00006001::google::protobuf::Metadata EnumValueOptions::GetMetadata() const {
6002 protobuf_AssignDescriptorsOnce();
6003 ::google::protobuf::Metadata metadata;
6004 metadata.descriptor = EnumValueOptions_descriptor_;
6005 metadata.reflection = EnumValueOptions_reflection_;
6006 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006007}
6008
temporal40ee5512008-07-10 02:12:20 +00006009
6010// ===================================================================
6011
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006012#ifndef _MSC_VER
6013const int ServiceOptions::kUninterpretedOptionFieldNumber;
6014#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00006015
kenton@google.com573989f2009-10-30 22:02:17 +00006016ServiceOptions::ServiceOptions()
kenton@google.comfccb1462009-12-18 02:11:36 +00006017 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006018 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006019}
6020
kenton@google.com80b1d622009-07-29 01:13:20 +00006021void ServiceOptions::InitAsDefaultInstance() {
6022}
kenton@google.com24bf56f2008-09-24 20:31:01 +00006023
kenton@google.com573989f2009-10-30 22:02:17 +00006024ServiceOptions::ServiceOptions(const ServiceOptions& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00006025 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006026 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006027 MergeFrom(from);
6028}
6029
kenton@google.comd37d46d2009-04-25 02:53:47 +00006030void ServiceOptions::SharedCtor() {
6031 _cached_size_ = 0;
6032 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6033}
6034
temporal40ee5512008-07-10 02:12:20 +00006035ServiceOptions::~ServiceOptions() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006036 SharedDtor();
6037}
6038
6039void ServiceOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006040 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006041 }
6042}
6043
kenton@google.comfccb1462009-12-18 02:11:36 +00006044void ServiceOptions::SetCachedSize(int size) const {
6045 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6046 _cached_size_ = size;
6047 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6048}
temporal40ee5512008-07-10 02:12:20 +00006049const ::google::protobuf::Descriptor* ServiceOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006050 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006051 return ServiceOptions_descriptor_;
6052}
6053
kenton@google.com24bf56f2008-09-24 20:31:01 +00006054const ServiceOptions& ServiceOptions::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006055 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006056}
6057
6058ServiceOptions* ServiceOptions::default_instance_ = NULL;
6059
temporal40ee5512008-07-10 02:12:20 +00006060ServiceOptions* ServiceOptions::New() const {
6061 return new ServiceOptions;
6062}
6063
6064void ServiceOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006065 _extensions_.Clear();
6066 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00006067 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6068 mutable_unknown_fields()->Clear();
6069}
6070
6071bool ServiceOptions::MergePartialFromCodedStream(
6072 ::google::protobuf::io::CodedInputStream* input) {
6073#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
6074 ::google::protobuf::uint32 tag;
6075 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006076 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006077 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6078 case 999: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006079 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006080 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006081 parse_uninterpreted_option:
6082 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6083 input, add_uninterpreted_option()));
6084 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006085 goto handle_uninterpreted;
6086 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006087 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
6088 if (input->ExpectAtEnd()) return true;
6089 break;
6090 }
6091
6092 default: {
6093 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00006094 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
6095 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006096 return true;
6097 }
6098 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006099 DO_(_extensions_.ParseField(tag, input, default_instance_,
6100 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00006101 continue;
6102 }
6103 DO_(::google::protobuf::internal::WireFormat::SkipField(
6104 input, tag, mutable_unknown_fields()));
6105 break;
6106 }
temporal40ee5512008-07-10 02:12:20 +00006107 }
temporal40ee5512008-07-10 02:12:20 +00006108 }
6109 return true;
6110#undef DO_
6111}
6112
kenton@google.comd37d46d2009-04-25 02:53:47 +00006113void ServiceOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006114 ::google::protobuf::io::CodedOutputStream* output) const {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006115 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006116 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006117 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00006118 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006119 }
6120
6121 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006122 _extensions_.SerializeWithCachedSizes(
6123 1000, 536870912, output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006124
temporal40ee5512008-07-10 02:12:20 +00006125 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006126 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6127 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006128 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00006129}
6130
6131::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray(
6132 ::google::protobuf::uint8* target) const {
6133 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6134 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006135 target = ::google::protobuf::internal::WireFormatLite::
6136 WriteMessageNoVirtualToArray(
6137 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006138 }
6139
6140 // Extension range [1000, 536870912)
6141 target = _extensions_.SerializeWithCachedSizesToArray(
6142 1000, 536870912, target);
6143
6144 if (!unknown_fields().empty()) {
6145 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6146 unknown_fields(), target);
6147 }
6148 return target;
temporal40ee5512008-07-10 02:12:20 +00006149}
6150
6151int ServiceOptions::ByteSize() const {
6152 int total_size = 0;
6153
kenton@google.com24bf56f2008-09-24 20:31:01 +00006154 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006155 total_size += 2 * this->uninterpreted_option_size();
6156 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006157 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00006158 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00006159 this->uninterpreted_option(i));
6160 }
6161
kenton@google.comd37d46d2009-04-25 02:53:47 +00006162 total_size += _extensions_.ByteSize();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006163
temporal40ee5512008-07-10 02:12:20 +00006164 if (!unknown_fields().empty()) {
6165 total_size +=
6166 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6167 unknown_fields());
6168 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006169 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006170 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006171 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006172 return total_size;
6173}
6174
6175void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) {
6176 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006177 const ServiceOptions* source =
6178 ::google::protobuf::internal::dynamic_cast_if_available<const ServiceOptions*>(
6179 &from);
6180 if (source == NULL) {
6181 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
6182 } else {
6183 MergeFrom(*source);
6184 }
temporal40ee5512008-07-10 02:12:20 +00006185}
6186
6187void ServiceOptions::MergeFrom(const ServiceOptions& from) {
6188 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006189 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
6190 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00006191 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6192}
6193
6194void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) {
6195 if (&from == this) return;
6196 Clear();
6197 MergeFrom(from);
6198}
6199
6200void ServiceOptions::CopyFrom(const ServiceOptions& from) {
6201 if (&from == this) return;
6202 Clear();
6203 MergeFrom(from);
6204}
6205
kenton@google.comceb561d2009-06-25 19:05:36 +00006206bool ServiceOptions::IsInitialized() const {
6207
6208 for (int i = 0; i < uninterpreted_option_size(); i++) {
6209 if (!this->uninterpreted_option(i).IsInitialized()) return false;
6210 }
6211
6212 if (!_extensions_.IsInitialized()) return false; return true;
6213}
6214
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006215void ServiceOptions::Swap(ServiceOptions* other) {
6216 if (other != this) {
6217 uninterpreted_option_.Swap(&other->uninterpreted_option_);
6218 std::swap(_has_bits_[0], other->_has_bits_[0]);
6219 _unknown_fields_.Swap(&other->_unknown_fields_);
6220 std::swap(_cached_size_, other->_cached_size_);
6221 _extensions_.Swap(&other->_extensions_);
6222 }
6223}
6224
kenton@google.com80b1d622009-07-29 01:13:20 +00006225::google::protobuf::Metadata ServiceOptions::GetMetadata() const {
6226 protobuf_AssignDescriptorsOnce();
6227 ::google::protobuf::Metadata metadata;
6228 metadata.descriptor = ServiceOptions_descriptor_;
6229 metadata.reflection = ServiceOptions_reflection_;
6230 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006231}
6232
temporal40ee5512008-07-10 02:12:20 +00006233
6234// ===================================================================
6235
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006236#ifndef _MSC_VER
6237const int MethodOptions::kUninterpretedOptionFieldNumber;
6238#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00006239
kenton@google.com573989f2009-10-30 22:02:17 +00006240MethodOptions::MethodOptions()
kenton@google.comfccb1462009-12-18 02:11:36 +00006241 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006242 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006243}
6244
kenton@google.com80b1d622009-07-29 01:13:20 +00006245void MethodOptions::InitAsDefaultInstance() {
6246}
kenton@google.com24bf56f2008-09-24 20:31:01 +00006247
kenton@google.com573989f2009-10-30 22:02:17 +00006248MethodOptions::MethodOptions(const MethodOptions& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00006249 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006250 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006251 MergeFrom(from);
6252}
6253
kenton@google.comd37d46d2009-04-25 02:53:47 +00006254void MethodOptions::SharedCtor() {
6255 _cached_size_ = 0;
6256 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6257}
6258
temporal40ee5512008-07-10 02:12:20 +00006259MethodOptions::~MethodOptions() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006260 SharedDtor();
6261}
6262
6263void MethodOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006264 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006265 }
6266}
6267
kenton@google.comfccb1462009-12-18 02:11:36 +00006268void MethodOptions::SetCachedSize(int size) const {
6269 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6270 _cached_size_ = size;
6271 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6272}
temporal40ee5512008-07-10 02:12:20 +00006273const ::google::protobuf::Descriptor* MethodOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006274 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006275 return MethodOptions_descriptor_;
6276}
6277
kenton@google.com24bf56f2008-09-24 20:31:01 +00006278const MethodOptions& MethodOptions::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006279 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006280}
6281
6282MethodOptions* MethodOptions::default_instance_ = NULL;
6283
temporal40ee5512008-07-10 02:12:20 +00006284MethodOptions* MethodOptions::New() const {
6285 return new MethodOptions;
6286}
6287
6288void MethodOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006289 _extensions_.Clear();
6290 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00006291 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6292 mutable_unknown_fields()->Clear();
6293}
6294
6295bool MethodOptions::MergePartialFromCodedStream(
6296 ::google::protobuf::io::CodedInputStream* input) {
6297#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
6298 ::google::protobuf::uint32 tag;
6299 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006300 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006301 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6302 case 999: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006303 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006304 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006305 parse_uninterpreted_option:
6306 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6307 input, add_uninterpreted_option()));
6308 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006309 goto handle_uninterpreted;
6310 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006311 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
6312 if (input->ExpectAtEnd()) return true;
6313 break;
6314 }
6315
6316 default: {
6317 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00006318 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
6319 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006320 return true;
6321 }
6322 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006323 DO_(_extensions_.ParseField(tag, input, default_instance_,
6324 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00006325 continue;
6326 }
6327 DO_(::google::protobuf::internal::WireFormat::SkipField(
6328 input, tag, mutable_unknown_fields()));
6329 break;
6330 }
temporal40ee5512008-07-10 02:12:20 +00006331 }
temporal40ee5512008-07-10 02:12:20 +00006332 }
6333 return true;
6334#undef DO_
6335}
6336
kenton@google.comd37d46d2009-04-25 02:53:47 +00006337void MethodOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006338 ::google::protobuf::io::CodedOutputStream* output) const {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006339 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006340 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006341 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00006342 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006343 }
6344
6345 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006346 _extensions_.SerializeWithCachedSizes(
6347 1000, 536870912, output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006348
temporal40ee5512008-07-10 02:12:20 +00006349 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006350 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6351 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006352 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00006353}
6354
6355::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray(
6356 ::google::protobuf::uint8* target) const {
6357 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6358 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006359 target = ::google::protobuf::internal::WireFormatLite::
6360 WriteMessageNoVirtualToArray(
6361 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006362 }
6363
6364 // Extension range [1000, 536870912)
6365 target = _extensions_.SerializeWithCachedSizesToArray(
6366 1000, 536870912, target);
6367
6368 if (!unknown_fields().empty()) {
6369 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6370 unknown_fields(), target);
6371 }
6372 return target;
temporal40ee5512008-07-10 02:12:20 +00006373}
6374
6375int MethodOptions::ByteSize() const {
6376 int total_size = 0;
6377
kenton@google.com24bf56f2008-09-24 20:31:01 +00006378 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006379 total_size += 2 * this->uninterpreted_option_size();
6380 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006381 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00006382 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00006383 this->uninterpreted_option(i));
6384 }
6385
kenton@google.comd37d46d2009-04-25 02:53:47 +00006386 total_size += _extensions_.ByteSize();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006387
temporal40ee5512008-07-10 02:12:20 +00006388 if (!unknown_fields().empty()) {
6389 total_size +=
6390 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6391 unknown_fields());
6392 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006393 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006394 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006395 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006396 return total_size;
6397}
6398
6399void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) {
6400 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006401 const MethodOptions* source =
6402 ::google::protobuf::internal::dynamic_cast_if_available<const MethodOptions*>(
6403 &from);
6404 if (source == NULL) {
6405 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
6406 } else {
6407 MergeFrom(*source);
6408 }
temporal40ee5512008-07-10 02:12:20 +00006409}
6410
6411void MethodOptions::MergeFrom(const MethodOptions& from) {
6412 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006413 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
6414 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00006415 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6416}
6417
6418void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) {
6419 if (&from == this) return;
6420 Clear();
6421 MergeFrom(from);
6422}
6423
6424void MethodOptions::CopyFrom(const MethodOptions& from) {
6425 if (&from == this) return;
6426 Clear();
6427 MergeFrom(from);
6428}
6429
kenton@google.comceb561d2009-06-25 19:05:36 +00006430bool MethodOptions::IsInitialized() const {
6431
6432 for (int i = 0; i < uninterpreted_option_size(); i++) {
6433 if (!this->uninterpreted_option(i).IsInitialized()) return false;
6434 }
6435
6436 if (!_extensions_.IsInitialized()) return false; return true;
6437}
6438
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006439void MethodOptions::Swap(MethodOptions* other) {
6440 if (other != this) {
6441 uninterpreted_option_.Swap(&other->uninterpreted_option_);
6442 std::swap(_has_bits_[0], other->_has_bits_[0]);
6443 _unknown_fields_.Swap(&other->_unknown_fields_);
6444 std::swap(_cached_size_, other->_cached_size_);
6445 _extensions_.Swap(&other->_extensions_);
6446 }
6447}
6448
kenton@google.com80b1d622009-07-29 01:13:20 +00006449::google::protobuf::Metadata MethodOptions::GetMetadata() const {
6450 protobuf_AssignDescriptorsOnce();
6451 ::google::protobuf::Metadata metadata;
6452 metadata.descriptor = MethodOptions_descriptor_;
6453 metadata.reflection = MethodOptions_reflection_;
6454 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006455}
6456
temporal40ee5512008-07-10 02:12:20 +00006457
kenton@google.com24bf56f2008-09-24 20:31:01 +00006458// ===================================================================
6459
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006460#ifndef _MSC_VER
6461const int UninterpretedOption_NamePart::kNamePartFieldNumber;
6462const int UninterpretedOption_NamePart::kIsExtensionFieldNumber;
6463#endif // !_MSC_VER
kenton@google.com24bf56f2008-09-24 20:31:01 +00006464
kenton@google.com573989f2009-10-30 22:02:17 +00006465UninterpretedOption_NamePart::UninterpretedOption_NamePart()
kenton@google.comfccb1462009-12-18 02:11:36 +00006466 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006467 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006468}
6469
kenton@google.com80b1d622009-07-29 01:13:20 +00006470void UninterpretedOption_NamePart::InitAsDefaultInstance() {
6471}
kenton@google.com24bf56f2008-09-24 20:31:01 +00006472
kenton@google.com573989f2009-10-30 22:02:17 +00006473UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00006474 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006475 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006476 MergeFrom(from);
6477}
6478
kenton@google.comd37d46d2009-04-25 02:53:47 +00006479void UninterpretedOption_NamePart::SharedCtor() {
6480 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006481 name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006482 is_extension_ = false;
6483 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6484}
6485
kenton@google.com24bf56f2008-09-24 20:31:01 +00006486UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006487 SharedDtor();
6488}
6489
6490void UninterpretedOption_NamePart::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006491 if (name_part_ != &::google::protobuf::internal::kEmptyString) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006492 delete name_part_;
6493 }
6494 if (this != default_instance_) {
6495 }
6496}
6497
kenton@google.comfccb1462009-12-18 02:11:36 +00006498void UninterpretedOption_NamePart::SetCachedSize(int size) const {
6499 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6500 _cached_size_ = size;
6501 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6502}
kenton@google.com24bf56f2008-09-24 20:31:01 +00006503const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006504 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006505 return UninterpretedOption_NamePart_descriptor_;
6506}
6507
6508const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006509 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006510}
6511
6512UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL;
6513
6514UninterpretedOption_NamePart* UninterpretedOption_NamePart::New() const {
6515 return new UninterpretedOption_NamePart;
6516}
6517
6518void UninterpretedOption_NamePart::Clear() {
6519 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006520 if (has_name_part()) {
6521 if (name_part_ != &::google::protobuf::internal::kEmptyString) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006522 name_part_->clear();
6523 }
6524 }
6525 is_extension_ = false;
6526 }
6527 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6528 mutable_unknown_fields()->Clear();
6529}
6530
6531bool UninterpretedOption_NamePart::MergePartialFromCodedStream(
6532 ::google::protobuf::io::CodedInputStream* input) {
6533#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
6534 ::google::protobuf::uint32 tag;
6535 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006536 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006537 // required string name_part = 1;
6538 case 1: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006539 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006540 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006541 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6542 input, this->mutable_name_part()));
6543 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
6544 this->name_part().data(), this->name_part().length(),
6545 ::google::protobuf::internal::WireFormat::PARSE);
6546 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006547 goto handle_uninterpreted;
6548 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006549 if (input->ExpectTag(16)) goto parse_is_extension;
6550 break;
6551 }
6552
6553 // required bool is_extension = 2;
6554 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006555 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006556 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006557 parse_is_extension:
6558 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6559 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
6560 input, &is_extension_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00006561 set_has_is_extension();
kenton@google.comfccb1462009-12-18 02:11:36 +00006562 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006563 goto handle_uninterpreted;
6564 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006565 if (input->ExpectAtEnd()) return true;
6566 break;
6567 }
6568
6569 default: {
6570 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00006571 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
6572 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006573 return true;
6574 }
6575 DO_(::google::protobuf::internal::WireFormat::SkipField(
6576 input, tag, mutable_unknown_fields()));
6577 break;
6578 }
6579 }
6580 }
6581 return true;
6582#undef DO_
6583}
6584
kenton@google.comd37d46d2009-04-25 02:53:47 +00006585void UninterpretedOption_NamePart::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +00006586 ::google::protobuf::io::CodedOutputStream* output) const {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006587 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006588 if (has_name_part()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006589 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
6590 this->name_part().data(), this->name_part().length(),
6591 ::google::protobuf::internal::WireFormat::SERIALIZE);
6592 ::google::protobuf::internal::WireFormatLite::WriteString(
6593 1, this->name_part(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006594 }
6595
6596 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006597 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006598 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006599 }
6600
6601 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006602 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6603 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006604 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00006605}
6606
6607::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray(
6608 ::google::protobuf::uint8* target) const {
6609 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006610 if (has_name_part()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006611 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
6612 this->name_part().data(), this->name_part().length(),
6613 ::google::protobuf::internal::WireFormat::SERIALIZE);
6614 target =
6615 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6616 1, this->name_part(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006617 }
6618
6619 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006620 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006621 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006622 }
6623
6624 if (!unknown_fields().empty()) {
6625 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6626 unknown_fields(), target);
6627 }
6628 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006629}
6630
6631int UninterpretedOption_NamePart::ByteSize() const {
6632 int total_size = 0;
6633
6634 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
6635 // required string name_part = 1;
6636 if (has_name_part()) {
6637 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006638 ::google::protobuf::internal::WireFormatLite::StringSize(
6639 this->name_part());
kenton@google.com24bf56f2008-09-24 20:31:01 +00006640 }
6641
6642 // required bool is_extension = 2;
6643 if (has_is_extension()) {
6644 total_size += 1 + 1;
6645 }
6646
6647 }
6648 if (!unknown_fields().empty()) {
6649 total_size +=
6650 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6651 unknown_fields());
6652 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006653 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006654 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006655 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006656 return total_size;
6657}
6658
6659void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) {
6660 GOOGLE_CHECK_NE(&from, this);
6661 const UninterpretedOption_NamePart* source =
6662 ::google::protobuf::internal::dynamic_cast_if_available<const UninterpretedOption_NamePart*>(
6663 &from);
6664 if (source == NULL) {
6665 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
6666 } else {
6667 MergeFrom(*source);
6668 }
6669}
6670
6671void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
6672 GOOGLE_CHECK_NE(&from, this);
6673 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006674 if (from.has_name_part()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006675 set_name_part(from.name_part());
6676 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006677 if (from.has_is_extension()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006678 set_is_extension(from.is_extension());
6679 }
6680 }
6681 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6682}
6683
6684void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) {
6685 if (&from == this) return;
6686 Clear();
6687 MergeFrom(from);
6688}
6689
6690void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) {
6691 if (&from == this) return;
6692 Clear();
6693 MergeFrom(from);
6694}
6695
kenton@google.comceb561d2009-06-25 19:05:36 +00006696bool UninterpretedOption_NamePart::IsInitialized() const {
6697 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
6698
6699 return true;
6700}
6701
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006702void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) {
6703 if (other != this) {
6704 std::swap(name_part_, other->name_part_);
6705 std::swap(is_extension_, other->is_extension_);
6706 std::swap(_has_bits_[0], other->_has_bits_[0]);
6707 _unknown_fields_.Swap(&other->_unknown_fields_);
6708 std::swap(_cached_size_, other->_cached_size_);
6709 }
6710}
6711
kenton@google.com80b1d622009-07-29 01:13:20 +00006712::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const {
6713 protobuf_AssignDescriptorsOnce();
6714 ::google::protobuf::Metadata metadata;
6715 metadata.descriptor = UninterpretedOption_NamePart_descriptor_;
6716 metadata.reflection = UninterpretedOption_NamePart_reflection_;
6717 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006718}
6719
kenton@google.com24bf56f2008-09-24 20:31:01 +00006720
6721// -------------------------------------------------------------------
6722
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006723#ifndef _MSC_VER
6724const int UninterpretedOption::kNameFieldNumber;
6725const int UninterpretedOption::kIdentifierValueFieldNumber;
6726const int UninterpretedOption::kPositiveIntValueFieldNumber;
6727const int UninterpretedOption::kNegativeIntValueFieldNumber;
6728const int UninterpretedOption::kDoubleValueFieldNumber;
6729const int UninterpretedOption::kStringValueFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006730const int UninterpretedOption::kAggregateValueFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006731#endif // !_MSC_VER
6732
kenton@google.com573989f2009-10-30 22:02:17 +00006733UninterpretedOption::UninterpretedOption()
kenton@google.comfccb1462009-12-18 02:11:36 +00006734 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006735 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006736}
6737
kenton@google.com80b1d622009-07-29 01:13:20 +00006738void UninterpretedOption::InitAsDefaultInstance() {
6739}
kenton@google.com24bf56f2008-09-24 20:31:01 +00006740
kenton@google.com573989f2009-10-30 22:02:17 +00006741UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
kenton@google.comfccb1462009-12-18 02:11:36 +00006742 : ::google::protobuf::Message() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006743 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006744 MergeFrom(from);
6745}
6746
kenton@google.comd37d46d2009-04-25 02:53:47 +00006747void UninterpretedOption::SharedCtor() {
6748 _cached_size_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006749 identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006750 positive_int_value_ = GOOGLE_ULONGLONG(0);
6751 negative_int_value_ = GOOGLE_LONGLONG(0);
6752 double_value_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006753 string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
6754 aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006755 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6756}
6757
kenton@google.com24bf56f2008-09-24 20:31:01 +00006758UninterpretedOption::~UninterpretedOption() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006759 SharedDtor();
6760}
6761
6762void UninterpretedOption::SharedDtor() {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006763 if (identifier_value_ != &::google::protobuf::internal::kEmptyString) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006764 delete identifier_value_;
6765 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006766 if (string_value_ != &::google::protobuf::internal::kEmptyString) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006767 delete string_value_;
6768 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006769 if (aggregate_value_ != &::google::protobuf::internal::kEmptyString) {
6770 delete aggregate_value_;
6771 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006772 if (this != default_instance_) {
6773 }
6774}
6775
kenton@google.comfccb1462009-12-18 02:11:36 +00006776void UninterpretedOption::SetCachedSize(int size) const {
6777 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6778 _cached_size_ = size;
6779 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6780}
kenton@google.com24bf56f2008-09-24 20:31:01 +00006781const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006782 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +00006783 return UninterpretedOption_descriptor_;
6784}
6785
6786const UninterpretedOption& UninterpretedOption::default_instance() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006787 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006788}
6789
6790UninterpretedOption* UninterpretedOption::default_instance_ = NULL;
6791
6792UninterpretedOption* UninterpretedOption::New() const {
6793 return new UninterpretedOption;
6794}
6795
6796void UninterpretedOption::Clear() {
6797 if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006798 if (has_identifier_value()) {
6799 if (identifier_value_ != &::google::protobuf::internal::kEmptyString) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006800 identifier_value_->clear();
6801 }
6802 }
6803 positive_int_value_ = GOOGLE_ULONGLONG(0);
6804 negative_int_value_ = GOOGLE_LONGLONG(0);
6805 double_value_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006806 if (has_string_value()) {
6807 if (string_value_ != &::google::protobuf::internal::kEmptyString) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006808 string_value_->clear();
6809 }
6810 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006811 if (has_aggregate_value()) {
6812 if (aggregate_value_ != &::google::protobuf::internal::kEmptyString) {
6813 aggregate_value_->clear();
6814 }
6815 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006816 }
6817 name_.Clear();
6818 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6819 mutable_unknown_fields()->Clear();
6820}
6821
6822bool UninterpretedOption::MergePartialFromCodedStream(
6823 ::google::protobuf::io::CodedInputStream* input) {
6824#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
6825 ::google::protobuf::uint32 tag;
6826 while ((tag = input->ReadTag()) != 0) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006827 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006828 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
6829 case 2: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006830 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006831 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006832 parse_name:
6833 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6834 input, add_name()));
6835 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006836 goto handle_uninterpreted;
6837 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006838 if (input->ExpectTag(18)) goto parse_name;
6839 if (input->ExpectTag(26)) goto parse_identifier_value;
6840 break;
6841 }
6842
6843 // optional string identifier_value = 3;
6844 case 3: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006845 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006846 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006847 parse_identifier_value:
6848 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6849 input, this->mutable_identifier_value()));
6850 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
6851 this->identifier_value().data(), this->identifier_value().length(),
6852 ::google::protobuf::internal::WireFormat::PARSE);
6853 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006854 goto handle_uninterpreted;
6855 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006856 if (input->ExpectTag(32)) goto parse_positive_int_value;
6857 break;
6858 }
6859
6860 // optional uint64 positive_int_value = 4;
6861 case 4: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006862 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006863 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006864 parse_positive_int_value:
6865 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6866 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
6867 input, &positive_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00006868 set_has_positive_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +00006869 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006870 goto handle_uninterpreted;
6871 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006872 if (input->ExpectTag(40)) goto parse_negative_int_value;
6873 break;
6874 }
6875
6876 // optional int64 negative_int_value = 5;
6877 case 5: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006878 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006879 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006880 parse_negative_int_value:
6881 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6882 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
6883 input, &negative_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00006884 set_has_negative_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +00006885 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006886 goto handle_uninterpreted;
6887 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006888 if (input->ExpectTag(49)) goto parse_double_value;
6889 break;
6890 }
6891
6892 // optional double double_value = 6;
6893 case 6: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006894 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006895 ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006896 parse_double_value:
6897 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6898 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
6899 input, &double_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00006900 set_has_double_value();
kenton@google.comfccb1462009-12-18 02:11:36 +00006901 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006902 goto handle_uninterpreted;
6903 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006904 if (input->ExpectTag(58)) goto parse_string_value;
6905 break;
6906 }
6907
6908 // optional bytes string_value = 7;
6909 case 7: {
kenton@google.comfccb1462009-12-18 02:11:36 +00006910 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006911 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006912 parse_string_value:
6913 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
6914 input, this->mutable_string_value()));
6915 } else {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006916 goto handle_uninterpreted;
6917 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006918 if (input->ExpectTag(66)) goto parse_aggregate_value;
6919 break;
6920 }
6921
6922 // optional string aggregate_value = 8;
6923 case 8: {
6924 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
6925 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
6926 parse_aggregate_value:
6927 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6928 input, this->mutable_aggregate_value()));
6929 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
6930 this->aggregate_value().data(), this->aggregate_value().length(),
6931 ::google::protobuf::internal::WireFormat::PARSE);
6932 } else {
6933 goto handle_uninterpreted;
6934 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00006935 if (input->ExpectAtEnd()) return true;
6936 break;
6937 }
6938
6939 default: {
6940 handle_uninterpreted:
kenton@google.com80b1d622009-07-29 01:13:20 +00006941 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
6942 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006943 return true;
6944 }
6945 DO_(::google::protobuf::internal::WireFormat::SkipField(
6946 input, tag, mutable_unknown_fields()));
6947 break;
6948 }
6949 }
6950 }
6951 return true;
6952#undef DO_
6953}
6954
kenton@google.comd37d46d2009-04-25 02:53:47 +00006955void UninterpretedOption::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +00006956 ::google::protobuf::io::CodedOutputStream* output) const {
kenton@google.com24bf56f2008-09-24 20:31:01 +00006957 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006958 for (int i = 0; i < this->name_size(); i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006959 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00006960 2, this->name(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006961 }
6962
6963 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006964 if (has_identifier_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006965 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
6966 this->identifier_value().data(), this->identifier_value().length(),
6967 ::google::protobuf::internal::WireFormat::SERIALIZE);
6968 ::google::protobuf::internal::WireFormatLite::WriteString(
6969 3, this->identifier_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006970 }
6971
6972 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006973 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006974 ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006975 }
6976
6977 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006978 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006979 ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006980 }
6981
6982 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006983 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006984 ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006985 }
6986
6987 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006988 if (has_string_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006989 ::google::protobuf::internal::WireFormatLite::WriteBytes(
6990 7, this->string_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00006991 }
6992
liujisi@google.com33165fe2010-11-02 13:14:58 +00006993 // optional string aggregate_value = 8;
6994 if (has_aggregate_value()) {
6995 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
6996 this->aggregate_value().data(), this->aggregate_value().length(),
6997 ::google::protobuf::internal::WireFormat::SERIALIZE);
6998 ::google::protobuf::internal::WireFormatLite::WriteString(
6999 8, this->aggregate_value(), output);
7000 }
7001
kenton@google.com24bf56f2008-09-24 20:31:01 +00007002 if (!unknown_fields().empty()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007003 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
7004 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00007005 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00007006}
7007
7008::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray(
7009 ::google::protobuf::uint8* target) const {
7010 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
7011 for (int i = 0; i < this->name_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007012 target = ::google::protobuf::internal::WireFormatLite::
7013 WriteMessageNoVirtualToArray(
7014 2, this->name(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007015 }
7016
7017 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007018 if (has_identifier_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007019 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
7020 this->identifier_value().data(), this->identifier_value().length(),
7021 ::google::protobuf::internal::WireFormat::SERIALIZE);
7022 target =
7023 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7024 3, this->identifier_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007025 }
7026
7027 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007028 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007029 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007030 }
7031
7032 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007033 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007034 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007035 }
7036
7037 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007038 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007039 target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007040 }
7041
7042 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007043 if (has_string_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007044 target =
7045 ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
7046 7, this->string_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007047 }
7048
liujisi@google.com33165fe2010-11-02 13:14:58 +00007049 // optional string aggregate_value = 8;
7050 if (has_aggregate_value()) {
7051 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
7052 this->aggregate_value().data(), this->aggregate_value().length(),
7053 ::google::protobuf::internal::WireFormat::SERIALIZE);
7054 target =
7055 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7056 8, this->aggregate_value(), target);
7057 }
7058
kenton@google.comd37d46d2009-04-25 02:53:47 +00007059 if (!unknown_fields().empty()) {
7060 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
7061 unknown_fields(), target);
7062 }
7063 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007064}
7065
7066int UninterpretedOption::ByteSize() const {
7067 int total_size = 0;
7068
7069 if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
7070 // optional string identifier_value = 3;
7071 if (has_identifier_value()) {
7072 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007073 ::google::protobuf::internal::WireFormatLite::StringSize(
7074 this->identifier_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +00007075 }
7076
7077 // optional uint64 positive_int_value = 4;
7078 if (has_positive_int_value()) {
7079 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007080 ::google::protobuf::internal::WireFormatLite::UInt64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +00007081 this->positive_int_value());
7082 }
7083
7084 // optional int64 negative_int_value = 5;
7085 if (has_negative_int_value()) {
7086 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007087 ::google::protobuf::internal::WireFormatLite::Int64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +00007088 this->negative_int_value());
7089 }
7090
7091 // optional double double_value = 6;
7092 if (has_double_value()) {
7093 total_size += 1 + 8;
7094 }
7095
7096 // optional bytes string_value = 7;
7097 if (has_string_value()) {
7098 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007099 ::google::protobuf::internal::WireFormatLite::BytesSize(
7100 this->string_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +00007101 }
7102
liujisi@google.com33165fe2010-11-02 13:14:58 +00007103 // optional string aggregate_value = 8;
7104 if (has_aggregate_value()) {
7105 total_size += 1 +
7106 ::google::protobuf::internal::WireFormatLite::StringSize(
7107 this->aggregate_value());
7108 }
7109
kenton@google.com24bf56f2008-09-24 20:31:01 +00007110 }
7111 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00007112 total_size += 1 * this->name_size();
7113 for (int i = 0; i < this->name_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007114 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00007115 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00007116 this->name(i));
7117 }
7118
7119 if (!unknown_fields().empty()) {
7120 total_size +=
7121 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
7122 unknown_fields());
7123 }
kenton@google.comfccb1462009-12-18 02:11:36 +00007124 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +00007125 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00007126 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +00007127 return total_size;
7128}
7129
7130void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) {
7131 GOOGLE_CHECK_NE(&from, this);
7132 const UninterpretedOption* source =
7133 ::google::protobuf::internal::dynamic_cast_if_available<const UninterpretedOption*>(
7134 &from);
7135 if (source == NULL) {
7136 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
7137 } else {
7138 MergeFrom(*source);
7139 }
7140}
7141
7142void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
7143 GOOGLE_CHECK_NE(&from, this);
7144 name_.MergeFrom(from.name_);
7145 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00007146 if (from.has_identifier_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007147 set_identifier_value(from.identifier_value());
7148 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007149 if (from.has_positive_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007150 set_positive_int_value(from.positive_int_value());
7151 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007152 if (from.has_negative_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007153 set_negative_int_value(from.negative_int_value());
7154 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007155 if (from.has_double_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007156 set_double_value(from.double_value());
7157 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007158 if (from.has_string_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007159 set_string_value(from.string_value());
7160 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007161 if (from.has_aggregate_value()) {
7162 set_aggregate_value(from.aggregate_value());
7163 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00007164 }
7165 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
7166}
7167
7168void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) {
7169 if (&from == this) return;
7170 Clear();
7171 MergeFrom(from);
7172}
7173
7174void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
7175 if (&from == this) return;
7176 Clear();
7177 MergeFrom(from);
7178}
7179
kenton@google.comceb561d2009-06-25 19:05:36 +00007180bool UninterpretedOption::IsInitialized() const {
7181
7182 for (int i = 0; i < name_size(); i++) {
7183 if (!this->name(i).IsInitialized()) return false;
7184 }
7185 return true;
7186}
7187
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007188void UninterpretedOption::Swap(UninterpretedOption* other) {
7189 if (other != this) {
7190 name_.Swap(&other->name_);
7191 std::swap(identifier_value_, other->identifier_value_);
7192 std::swap(positive_int_value_, other->positive_int_value_);
7193 std::swap(negative_int_value_, other->negative_int_value_);
7194 std::swap(double_value_, other->double_value_);
7195 std::swap(string_value_, other->string_value_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00007196 std::swap(aggregate_value_, other->aggregate_value_);
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007197 std::swap(_has_bits_[0], other->_has_bits_[0]);
7198 _unknown_fields_.Swap(&other->_unknown_fields_);
7199 std::swap(_cached_size_, other->_cached_size_);
7200 }
7201}
7202
kenton@google.com80b1d622009-07-29 01:13:20 +00007203::google::protobuf::Metadata UninterpretedOption::GetMetadata() const {
7204 protobuf_AssignDescriptorsOnce();
7205 ::google::protobuf::Metadata metadata;
7206 metadata.descriptor = UninterpretedOption_descriptor_;
7207 metadata.reflection = UninterpretedOption_reflection_;
7208 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007209}
7210
kenton@google.com24bf56f2008-09-24 20:31:01 +00007211
liujisi@google.com33165fe2010-11-02 13:14:58 +00007212// ===================================================================
7213
7214#ifndef _MSC_VER
7215const int SourceCodeInfo_Location::kPathFieldNumber;
7216const int SourceCodeInfo_Location::kSpanFieldNumber;
7217#endif // !_MSC_VER
7218
7219SourceCodeInfo_Location::SourceCodeInfo_Location()
7220 : ::google::protobuf::Message() {
7221 SharedCtor();
7222}
7223
7224void SourceCodeInfo_Location::InitAsDefaultInstance() {
7225}
7226
7227SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from)
7228 : ::google::protobuf::Message() {
7229 SharedCtor();
7230 MergeFrom(from);
7231}
7232
7233void SourceCodeInfo_Location::SharedCtor() {
7234 _cached_size_ = 0;
7235 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7236}
7237
7238SourceCodeInfo_Location::~SourceCodeInfo_Location() {
7239 SharedDtor();
7240}
7241
7242void SourceCodeInfo_Location::SharedDtor() {
7243 if (this != default_instance_) {
7244 }
7245}
7246
7247void SourceCodeInfo_Location::SetCachedSize(int size) const {
7248 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7249 _cached_size_ = size;
7250 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7251}
7252const ::google::protobuf::Descriptor* SourceCodeInfo_Location::descriptor() {
7253 protobuf_AssignDescriptorsOnce();
7254 return SourceCodeInfo_Location_descriptor_;
7255}
7256
7257const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() {
7258 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
7259}
7260
7261SourceCodeInfo_Location* SourceCodeInfo_Location::default_instance_ = NULL;
7262
7263SourceCodeInfo_Location* SourceCodeInfo_Location::New() const {
7264 return new SourceCodeInfo_Location;
7265}
7266
7267void SourceCodeInfo_Location::Clear() {
7268 path_.Clear();
7269 span_.Clear();
7270 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7271 mutable_unknown_fields()->Clear();
7272}
7273
7274bool SourceCodeInfo_Location::MergePartialFromCodedStream(
7275 ::google::protobuf::io::CodedInputStream* input) {
7276#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
7277 ::google::protobuf::uint32 tag;
7278 while ((tag = input->ReadTag()) != 0) {
7279 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
7280 // repeated int32 path = 1 [packed = true];
7281 case 1: {
7282 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
7283 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
7284 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
7285 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
7286 input, this->mutable_path())));
7287 } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
7288 == ::google::protobuf::internal::WireFormatLite::
7289 WIRETYPE_VARINT) {
7290 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
7291 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
7292 1, 10, input, this->mutable_path())));
7293 } else {
7294 goto handle_uninterpreted;
7295 }
7296 if (input->ExpectTag(18)) goto parse_span;
7297 break;
7298 }
7299
7300 // repeated int32 span = 2 [packed = true];
7301 case 2: {
7302 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
7303 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
7304 parse_span:
7305 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
7306 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
7307 input, this->mutable_span())));
7308 } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
7309 == ::google::protobuf::internal::WireFormatLite::
7310 WIRETYPE_VARINT) {
7311 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
7312 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
7313 1, 18, input, this->mutable_span())));
7314 } else {
7315 goto handle_uninterpreted;
7316 }
7317 if (input->ExpectAtEnd()) return true;
7318 break;
7319 }
7320
7321 default: {
7322 handle_uninterpreted:
7323 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
7324 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
7325 return true;
7326 }
7327 DO_(::google::protobuf::internal::WireFormat::SkipField(
7328 input, tag, mutable_unknown_fields()));
7329 break;
7330 }
7331 }
7332 }
7333 return true;
7334#undef DO_
7335}
7336
7337void SourceCodeInfo_Location::SerializeWithCachedSizes(
7338 ::google::protobuf::io::CodedOutputStream* output) const {
7339 // repeated int32 path = 1 [packed = true];
7340 if (this->path_size() > 0) {
7341 ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
7342 output->WriteVarint32(_path_cached_byte_size_);
7343 }
7344 for (int i = 0; i < this->path_size(); i++) {
7345 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
7346 this->path(i), output);
7347 }
7348
7349 // repeated int32 span = 2 [packed = true];
7350 if (this->span_size() > 0) {
7351 ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
7352 output->WriteVarint32(_span_cached_byte_size_);
7353 }
7354 for (int i = 0; i < this->span_size(); i++) {
7355 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
7356 this->span(i), output);
7357 }
7358
7359 if (!unknown_fields().empty()) {
7360 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
7361 unknown_fields(), output);
7362 }
7363}
7364
7365::google::protobuf::uint8* SourceCodeInfo_Location::SerializeWithCachedSizesToArray(
7366 ::google::protobuf::uint8* target) const {
7367 // repeated int32 path = 1 [packed = true];
7368 if (this->path_size() > 0) {
7369 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
7370 1,
7371 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
7372 target);
7373 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
7374 _path_cached_byte_size_, target);
7375 }
7376 for (int i = 0; i < this->path_size(); i++) {
7377 target = ::google::protobuf::internal::WireFormatLite::
7378 WriteInt32NoTagToArray(this->path(i), target);
7379 }
7380
7381 // repeated int32 span = 2 [packed = true];
7382 if (this->span_size() > 0) {
7383 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
7384 2,
7385 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
7386 target);
7387 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
7388 _span_cached_byte_size_, target);
7389 }
7390 for (int i = 0; i < this->span_size(); i++) {
7391 target = ::google::protobuf::internal::WireFormatLite::
7392 WriteInt32NoTagToArray(this->span(i), target);
7393 }
7394
7395 if (!unknown_fields().empty()) {
7396 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
7397 unknown_fields(), target);
7398 }
7399 return target;
7400}
7401
7402int SourceCodeInfo_Location::ByteSize() const {
7403 int total_size = 0;
7404
7405 // repeated int32 path = 1 [packed = true];
7406 {
7407 int data_size = 0;
7408 for (int i = 0; i < this->path_size(); i++) {
7409 data_size += ::google::protobuf::internal::WireFormatLite::
7410 Int32Size(this->path(i));
7411 }
7412 if (data_size > 0) {
7413 total_size += 1 +
7414 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
7415 }
7416 _path_cached_byte_size_ = data_size;
7417 total_size += data_size;
7418 }
7419
7420 // repeated int32 span = 2 [packed = true];
7421 {
7422 int data_size = 0;
7423 for (int i = 0; i < this->span_size(); i++) {
7424 data_size += ::google::protobuf::internal::WireFormatLite::
7425 Int32Size(this->span(i));
7426 }
7427 if (data_size > 0) {
7428 total_size += 1 +
7429 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
7430 }
7431 _span_cached_byte_size_ = data_size;
7432 total_size += data_size;
7433 }
7434
7435 if (!unknown_fields().empty()) {
7436 total_size +=
7437 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
7438 unknown_fields());
7439 }
7440 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7441 _cached_size_ = total_size;
7442 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7443 return total_size;
7444}
7445
7446void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) {
7447 GOOGLE_CHECK_NE(&from, this);
7448 const SourceCodeInfo_Location* source =
7449 ::google::protobuf::internal::dynamic_cast_if_available<const SourceCodeInfo_Location*>(
7450 &from);
7451 if (source == NULL) {
7452 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
7453 } else {
7454 MergeFrom(*source);
7455 }
7456}
7457
7458void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) {
7459 GOOGLE_CHECK_NE(&from, this);
7460 path_.MergeFrom(from.path_);
7461 span_.MergeFrom(from.span_);
7462 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
7463}
7464
7465void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) {
7466 if (&from == this) return;
7467 Clear();
7468 MergeFrom(from);
7469}
7470
7471void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) {
7472 if (&from == this) return;
7473 Clear();
7474 MergeFrom(from);
7475}
7476
7477bool SourceCodeInfo_Location::IsInitialized() const {
7478
7479 return true;
7480}
7481
7482void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) {
7483 if (other != this) {
7484 path_.Swap(&other->path_);
7485 span_.Swap(&other->span_);
7486 std::swap(_has_bits_[0], other->_has_bits_[0]);
7487 _unknown_fields_.Swap(&other->_unknown_fields_);
7488 std::swap(_cached_size_, other->_cached_size_);
7489 }
7490}
7491
7492::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const {
7493 protobuf_AssignDescriptorsOnce();
7494 ::google::protobuf::Metadata metadata;
7495 metadata.descriptor = SourceCodeInfo_Location_descriptor_;
7496 metadata.reflection = SourceCodeInfo_Location_reflection_;
7497 return metadata;
7498}
7499
7500
7501// -------------------------------------------------------------------
7502
7503#ifndef _MSC_VER
7504const int SourceCodeInfo::kLocationFieldNumber;
7505#endif // !_MSC_VER
7506
7507SourceCodeInfo::SourceCodeInfo()
7508 : ::google::protobuf::Message() {
7509 SharedCtor();
7510}
7511
7512void SourceCodeInfo::InitAsDefaultInstance() {
7513}
7514
7515SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
7516 : ::google::protobuf::Message() {
7517 SharedCtor();
7518 MergeFrom(from);
7519}
7520
7521void SourceCodeInfo::SharedCtor() {
7522 _cached_size_ = 0;
7523 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7524}
7525
7526SourceCodeInfo::~SourceCodeInfo() {
7527 SharedDtor();
7528}
7529
7530void SourceCodeInfo::SharedDtor() {
7531 if (this != default_instance_) {
7532 }
7533}
7534
7535void SourceCodeInfo::SetCachedSize(int size) const {
7536 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7537 _cached_size_ = size;
7538 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7539}
7540const ::google::protobuf::Descriptor* SourceCodeInfo::descriptor() {
7541 protobuf_AssignDescriptorsOnce();
7542 return SourceCodeInfo_descriptor_;
7543}
7544
7545const SourceCodeInfo& SourceCodeInfo::default_instance() {
7546 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_;
7547}
7548
7549SourceCodeInfo* SourceCodeInfo::default_instance_ = NULL;
7550
7551SourceCodeInfo* SourceCodeInfo::New() const {
7552 return new SourceCodeInfo;
7553}
7554
7555void SourceCodeInfo::Clear() {
7556 location_.Clear();
7557 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7558 mutable_unknown_fields()->Clear();
7559}
7560
7561bool SourceCodeInfo::MergePartialFromCodedStream(
7562 ::google::protobuf::io::CodedInputStream* input) {
7563#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
7564 ::google::protobuf::uint32 tag;
7565 while ((tag = input->ReadTag()) != 0) {
7566 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
7567 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
7568 case 1: {
7569 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
7570 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
7571 parse_location:
7572 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
7573 input, add_location()));
7574 } else {
7575 goto handle_uninterpreted;
7576 }
7577 if (input->ExpectTag(10)) goto parse_location;
7578 if (input->ExpectAtEnd()) return true;
7579 break;
7580 }
7581
7582 default: {
7583 handle_uninterpreted:
7584 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
7585 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
7586 return true;
7587 }
7588 DO_(::google::protobuf::internal::WireFormat::SkipField(
7589 input, tag, mutable_unknown_fields()));
7590 break;
7591 }
7592 }
7593 }
7594 return true;
7595#undef DO_
7596}
7597
7598void SourceCodeInfo::SerializeWithCachedSizes(
7599 ::google::protobuf::io::CodedOutputStream* output) const {
7600 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
7601 for (int i = 0; i < this->location_size(); i++) {
7602 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
7603 1, this->location(i), output);
7604 }
7605
7606 if (!unknown_fields().empty()) {
7607 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
7608 unknown_fields(), output);
7609 }
7610}
7611
7612::google::protobuf::uint8* SourceCodeInfo::SerializeWithCachedSizesToArray(
7613 ::google::protobuf::uint8* target) const {
7614 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
7615 for (int i = 0; i < this->location_size(); i++) {
7616 target = ::google::protobuf::internal::WireFormatLite::
7617 WriteMessageNoVirtualToArray(
7618 1, this->location(i), target);
7619 }
7620
7621 if (!unknown_fields().empty()) {
7622 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
7623 unknown_fields(), target);
7624 }
7625 return target;
7626}
7627
7628int SourceCodeInfo::ByteSize() const {
7629 int total_size = 0;
7630
7631 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
7632 total_size += 1 * this->location_size();
7633 for (int i = 0; i < this->location_size(); i++) {
7634 total_size +=
7635 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
7636 this->location(i));
7637 }
7638
7639 if (!unknown_fields().empty()) {
7640 total_size +=
7641 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
7642 unknown_fields());
7643 }
7644 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7645 _cached_size_ = total_size;
7646 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7647 return total_size;
7648}
7649
7650void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) {
7651 GOOGLE_CHECK_NE(&from, this);
7652 const SourceCodeInfo* source =
7653 ::google::protobuf::internal::dynamic_cast_if_available<const SourceCodeInfo*>(
7654 &from);
7655 if (source == NULL) {
7656 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
7657 } else {
7658 MergeFrom(*source);
7659 }
7660}
7661
7662void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
7663 GOOGLE_CHECK_NE(&from, this);
7664 location_.MergeFrom(from.location_);
7665 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
7666}
7667
7668void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) {
7669 if (&from == this) return;
7670 Clear();
7671 MergeFrom(from);
7672}
7673
7674void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) {
7675 if (&from == this) return;
7676 Clear();
7677 MergeFrom(from);
7678}
7679
7680bool SourceCodeInfo::IsInitialized() const {
7681
7682 return true;
7683}
7684
7685void SourceCodeInfo::Swap(SourceCodeInfo* other) {
7686 if (other != this) {
7687 location_.Swap(&other->location_);
7688 std::swap(_has_bits_[0], other->_has_bits_[0]);
7689 _unknown_fields_.Swap(&other->_unknown_fields_);
7690 std::swap(_cached_size_, other->_cached_size_);
7691 }
7692}
7693
7694::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const {
7695 protobuf_AssignDescriptorsOnce();
7696 ::google::protobuf::Metadata metadata;
7697 metadata.descriptor = SourceCodeInfo_descriptor_;
7698 metadata.reflection = SourceCodeInfo_reflection_;
7699 return metadata;
7700}
7701
7702
kenton@google.comfccb1462009-12-18 02:11:36 +00007703// @@protoc_insertion_point(namespace_scope)
7704
temporal40ee5512008-07-10 02:12:20 +00007705} // namespace protobuf
7706} // namespace google
kenton@google.comfccb1462009-12-18 02:11:36 +00007707
7708// @@protoc_insertion_point(global_scope)