blob: 16b4442474bb14b5dca31c81f0df6f397036ba35 [file] [log] [blame]
temporal40ee5512008-07-10 02:12:20 +00001// Generated by the protocol buffer compiler. DO NOT EDIT!
2
3#include "google/protobuf/descriptor.pb.h"
4#include <google/protobuf/descriptor.h>
5#include <google/protobuf/io/coded_stream.h>
6#include <google/protobuf/reflection_ops.h>
7#include <google/protobuf/wire_format_inl.h>
8
9namespace google {
10namespace protobuf {
11
12namespace {
13
temporal779f61c2008-08-13 03:15:00 +000014const ::google::protobuf::Descriptor* FileDescriptorSet_descriptor_ = NULL;
15const ::google::protobuf::internal::GeneratedMessageReflection*
16 FileDescriptorSet_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000017const ::google::protobuf::Descriptor* FileDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000018const ::google::protobuf::internal::GeneratedMessageReflection*
19 FileDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000020const ::google::protobuf::Descriptor* DescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000021const ::google::protobuf::internal::GeneratedMessageReflection*
22 DescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000023const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000024const ::google::protobuf::internal::GeneratedMessageReflection*
25 DescriptorProto_ExtensionRange_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000026const ::google::protobuf::Descriptor* FieldDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000027const ::google::protobuf::internal::GeneratedMessageReflection*
28 FieldDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000029const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor_ = NULL;
30const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor_ = NULL;
31const ::google::protobuf::Descriptor* EnumDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000032const ::google::protobuf::internal::GeneratedMessageReflection*
33 EnumDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000034const ::google::protobuf::Descriptor* EnumValueDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000035const ::google::protobuf::internal::GeneratedMessageReflection*
36 EnumValueDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000037const ::google::protobuf::Descriptor* ServiceDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000038const ::google::protobuf::internal::GeneratedMessageReflection*
39 ServiceDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000040const ::google::protobuf::Descriptor* MethodDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000041const ::google::protobuf::internal::GeneratedMessageReflection*
42 MethodDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000043const ::google::protobuf::Descriptor* FileOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000044const ::google::protobuf::internal::GeneratedMessageReflection*
45 FileOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000046const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor_ = NULL;
47const ::google::protobuf::Descriptor* MessageOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000048const ::google::protobuf::internal::GeneratedMessageReflection*
49 MessageOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000050const ::google::protobuf::Descriptor* FieldOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000051const ::google::protobuf::internal::GeneratedMessageReflection*
52 FieldOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000053const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor_ = NULL;
54const ::google::protobuf::Descriptor* EnumOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000055const ::google::protobuf::internal::GeneratedMessageReflection*
56 EnumOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000057const ::google::protobuf::Descriptor* EnumValueOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000058const ::google::protobuf::internal::GeneratedMessageReflection*
59 EnumValueOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000060const ::google::protobuf::Descriptor* ServiceOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000061const ::google::protobuf::internal::GeneratedMessageReflection*
62 ServiceOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000063const ::google::protobuf::Descriptor* MethodOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000064const ::google::protobuf::internal::GeneratedMessageReflection*
65 MethodOptions_reflection_ = NULL;
kenton@google.com24bf56f2008-09-24 20:31:01 +000066const ::google::protobuf::Descriptor* UninterpretedOption_descriptor_ = NULL;
67const ::google::protobuf::internal::GeneratedMessageReflection*
68 UninterpretedOption_reflection_ = NULL;
69const ::google::protobuf::Descriptor* UninterpretedOption_NamePart_descriptor_ = NULL;
70const ::google::protobuf::internal::GeneratedMessageReflection*
71 UninterpretedOption_NamePart_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000072
73} // namespace
74
75
kenton@google.com24bf56f2008-09-24 20:31:01 +000076void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors(const ::google::protobuf::FileDescriptor* file) {
77 FileDescriptorSet_descriptor_ = file->message_type(0);
78 FileDescriptorSet::default_instance_ = new FileDescriptorSet();
kenton@google.com3e91fcd2008-11-06 04:37:30 +000079 static const int FileDescriptorSet_offsets_[1] = {
80 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_),
81 };
kenton@google.com24bf56f2008-09-24 20:31:01 +000082 FileDescriptorSet_reflection_ =
83 new ::google::protobuf::internal::GeneratedMessageReflection(
84 FileDescriptorSet_descriptor_,
85 FileDescriptorSet::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +000086 FileDescriptorSet_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +000087 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]),
88 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _unknown_fields_),
89 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +000090 ::google::protobuf::DescriptorPool::generated_pool(),
91 sizeof(FileDescriptorSet));
kenton@google.com24bf56f2008-09-24 20:31:01 +000092 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
93 FileDescriptorSet_descriptor_, FileDescriptorSet::default_instance_);
94 FileDescriptorProto_descriptor_ = file->message_type(1);
95 FileDescriptorProto::default_instance_ = new FileDescriptorProto();
kenton@google.com3e91fcd2008-11-06 04:37:30 +000096 static const int FileDescriptorProto_offsets_[8] = {
97 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_),
98 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_),
99 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_),
100 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_),
101 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_),
102 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_),
103 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_),
104 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_),
105 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000106 FileDescriptorProto_reflection_ =
107 new ::google::protobuf::internal::GeneratedMessageReflection(
108 FileDescriptorProto_descriptor_,
109 FileDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000110 FileDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000111 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]),
112 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _unknown_fields_),
113 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000114 ::google::protobuf::DescriptorPool::generated_pool(),
115 sizeof(FileDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000116 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
117 FileDescriptorProto_descriptor_, FileDescriptorProto::default_instance_);
118 DescriptorProto_descriptor_ = file->message_type(2);
119 DescriptorProto::default_instance_ = new DescriptorProto();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000120 static const int DescriptorProto_offsets_[7] = {
121 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_),
122 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_),
123 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_),
124 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_),
125 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_),
126 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_),
127 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_),
128 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000129 DescriptorProto_reflection_ =
130 new ::google::protobuf::internal::GeneratedMessageReflection(
131 DescriptorProto_descriptor_,
132 DescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000133 DescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000134 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]),
135 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _unknown_fields_),
136 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000137 ::google::protobuf::DescriptorPool::generated_pool(),
138 sizeof(DescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000139 DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0);
140 DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000141 static const int DescriptorProto_ExtensionRange_offsets_[2] = {
142 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_),
143 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_),
144 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000145 DescriptorProto_ExtensionRange_reflection_ =
146 new ::google::protobuf::internal::GeneratedMessageReflection(
147 DescriptorProto_ExtensionRange_descriptor_,
148 DescriptorProto_ExtensionRange::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000149 DescriptorProto_ExtensionRange_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000150 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]),
151 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _unknown_fields_),
152 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000153 ::google::protobuf::DescriptorPool::generated_pool(),
154 sizeof(DescriptorProto_ExtensionRange));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000155 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
156 DescriptorProto_ExtensionRange_descriptor_, DescriptorProto_ExtensionRange::default_instance_);
157 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
158 DescriptorProto_descriptor_, DescriptorProto::default_instance_);
159 FieldDescriptorProto_descriptor_ = file->message_type(3);
160 FieldDescriptorProto::default_instance_ = new FieldDescriptorProto();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000161 static const int FieldDescriptorProto_offsets_[8] = {
162 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_),
163 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_),
164 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_),
165 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_),
166 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_),
167 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_),
168 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_),
169 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_),
170 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000171 FieldDescriptorProto_reflection_ =
172 new ::google::protobuf::internal::GeneratedMessageReflection(
173 FieldDescriptorProto_descriptor_,
174 FieldDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000175 FieldDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000176 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]),
177 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _unknown_fields_),
178 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000179 ::google::protobuf::DescriptorPool::generated_pool(),
180 sizeof(FieldDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000181 FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0);
182 FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1);
183 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
184 FieldDescriptorProto_descriptor_, FieldDescriptorProto::default_instance_);
185 EnumDescriptorProto_descriptor_ = file->message_type(4);
186 EnumDescriptorProto::default_instance_ = new EnumDescriptorProto();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000187 static const int EnumDescriptorProto_offsets_[3] = {
188 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_),
189 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_),
190 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_),
191 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000192 EnumDescriptorProto_reflection_ =
193 new ::google::protobuf::internal::GeneratedMessageReflection(
194 EnumDescriptorProto_descriptor_,
195 EnumDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000196 EnumDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000197 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]),
198 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _unknown_fields_),
199 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000200 ::google::protobuf::DescriptorPool::generated_pool(),
201 sizeof(EnumDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000202 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
203 EnumDescriptorProto_descriptor_, EnumDescriptorProto::default_instance_);
204 EnumValueDescriptorProto_descriptor_ = file->message_type(5);
205 EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000206 static const int EnumValueDescriptorProto_offsets_[3] = {
207 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_),
208 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_),
209 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_),
210 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000211 EnumValueDescriptorProto_reflection_ =
212 new ::google::protobuf::internal::GeneratedMessageReflection(
213 EnumValueDescriptorProto_descriptor_,
214 EnumValueDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000215 EnumValueDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000216 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]),
217 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _unknown_fields_),
218 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000219 ::google::protobuf::DescriptorPool::generated_pool(),
220 sizeof(EnumValueDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000221 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
222 EnumValueDescriptorProto_descriptor_, EnumValueDescriptorProto::default_instance_);
223 ServiceDescriptorProto_descriptor_ = file->message_type(6);
224 ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000225 static const int ServiceDescriptorProto_offsets_[3] = {
226 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_),
227 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_),
228 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_),
229 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000230 ServiceDescriptorProto_reflection_ =
231 new ::google::protobuf::internal::GeneratedMessageReflection(
232 ServiceDescriptorProto_descriptor_,
233 ServiceDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000234 ServiceDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000235 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]),
236 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _unknown_fields_),
237 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000238 ::google::protobuf::DescriptorPool::generated_pool(),
239 sizeof(ServiceDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000240 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
241 ServiceDescriptorProto_descriptor_, ServiceDescriptorProto::default_instance_);
242 MethodDescriptorProto_descriptor_ = file->message_type(7);
243 MethodDescriptorProto::default_instance_ = new MethodDescriptorProto();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000244 static const int MethodDescriptorProto_offsets_[4] = {
245 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_),
246 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_),
247 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_),
248 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_),
249 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000250 MethodDescriptorProto_reflection_ =
251 new ::google::protobuf::internal::GeneratedMessageReflection(
252 MethodDescriptorProto_descriptor_,
253 MethodDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000254 MethodDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000255 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]),
256 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _unknown_fields_),
257 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000258 ::google::protobuf::DescriptorPool::generated_pool(),
259 sizeof(MethodDescriptorProto));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000260 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
261 MethodDescriptorProto_descriptor_, MethodDescriptorProto::default_instance_);
262 FileOptions_descriptor_ = file->message_type(8);
263 FileOptions::default_instance_ = new FileOptions();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000264 static const int FileOptions_offsets_[5] = {
265 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_),
268 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_),
269 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_),
270 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000271 FileOptions_reflection_ =
272 new ::google::protobuf::internal::GeneratedMessageReflection(
273 FileOptions_descriptor_,
274 FileOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000275 FileOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000276 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]),
277 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _unknown_fields_),
278 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000279 ::google::protobuf::DescriptorPool::generated_pool(),
280 sizeof(FileOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000281 FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0);
282 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
283 FileOptions_descriptor_, FileOptions::default_instance_);
284 MessageOptions_descriptor_ = file->message_type(9);
285 MessageOptions::default_instance_ = new MessageOptions();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000286 static const int MessageOptions_offsets_[2] = {
287 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_),
288 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_),
289 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000290 MessageOptions_reflection_ =
291 new ::google::protobuf::internal::GeneratedMessageReflection(
292 MessageOptions_descriptor_,
293 MessageOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000294 MessageOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000295 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]),
296 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _unknown_fields_),
297 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000298 ::google::protobuf::DescriptorPool::generated_pool(),
299 sizeof(MessageOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000300 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
301 MessageOptions_descriptor_, MessageOptions::default_instance_);
302 FieldOptions_descriptor_ = file->message_type(10);
303 FieldOptions::default_instance_ = new FieldOptions();
kenton@google.com2d6daa72009-01-22 01:27:00 +0000304 static const int FieldOptions_offsets_[4] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000305 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_),
kenton@google.com2d6daa72009-01-22 01:27:00 +0000306 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000307 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, experimental_map_key_),
308 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_),
309 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000310 FieldOptions_reflection_ =
311 new ::google::protobuf::internal::GeneratedMessageReflection(
312 FieldOptions_descriptor_,
313 FieldOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000314 FieldOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000315 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]),
316 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _unknown_fields_),
317 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000318 ::google::protobuf::DescriptorPool::generated_pool(),
319 sizeof(FieldOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000320 FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0);
321 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
322 FieldOptions_descriptor_, FieldOptions::default_instance_);
323 EnumOptions_descriptor_ = file->message_type(11);
324 EnumOptions::default_instance_ = new EnumOptions();
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(),
337 sizeof(EnumOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000338 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
339 EnumOptions_descriptor_, EnumOptions::default_instance_);
340 EnumValueOptions_descriptor_ = file->message_type(12);
341 EnumValueOptions::default_instance_ = new EnumValueOptions();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000342 static const int EnumValueOptions_offsets_[1] = {
343 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_),
344 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000345 EnumValueOptions_reflection_ =
346 new ::google::protobuf::internal::GeneratedMessageReflection(
347 EnumValueOptions_descriptor_,
348 EnumValueOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000349 EnumValueOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000350 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]),
351 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _unknown_fields_),
352 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000353 ::google::protobuf::DescriptorPool::generated_pool(),
354 sizeof(EnumValueOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000355 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
356 EnumValueOptions_descriptor_, EnumValueOptions::default_instance_);
357 ServiceOptions_descriptor_ = file->message_type(13);
358 ServiceOptions::default_instance_ = new ServiceOptions();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000359 static const int ServiceOptions_offsets_[1] = {
360 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_),
361 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000362 ServiceOptions_reflection_ =
363 new ::google::protobuf::internal::GeneratedMessageReflection(
364 ServiceOptions_descriptor_,
365 ServiceOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000366 ServiceOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000367 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]),
368 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _unknown_fields_),
369 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000370 ::google::protobuf::DescriptorPool::generated_pool(),
371 sizeof(ServiceOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000372 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
373 ServiceOptions_descriptor_, ServiceOptions::default_instance_);
374 MethodOptions_descriptor_ = file->message_type(14);
375 MethodOptions::default_instance_ = new MethodOptions();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000376 static const int MethodOptions_offsets_[1] = {
377 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_),
378 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000379 MethodOptions_reflection_ =
380 new ::google::protobuf::internal::GeneratedMessageReflection(
381 MethodOptions_descriptor_,
382 MethodOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000383 MethodOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000384 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]),
385 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _unknown_fields_),
386 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_),
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000387 ::google::protobuf::DescriptorPool::generated_pool(),
388 sizeof(MethodOptions));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000389 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
390 MethodOptions_descriptor_, MethodOptions::default_instance_);
391 UninterpretedOption_descriptor_ = file->message_type(15);
392 UninterpretedOption::default_instance_ = new UninterpretedOption();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000393 static const int UninterpretedOption_offsets_[6] = {
394 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_),
395 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_),
396 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_),
397 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_),
398 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_),
399 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_),
400 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000401 UninterpretedOption_reflection_ =
402 new ::google::protobuf::internal::GeneratedMessageReflection(
403 UninterpretedOption_descriptor_,
404 UninterpretedOption::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000405 UninterpretedOption_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000406 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]),
407 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _unknown_fields_),
408 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000409 ::google::protobuf::DescriptorPool::generated_pool(),
410 sizeof(UninterpretedOption));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000411 UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0);
412 UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart();
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000413 static const int UninterpretedOption_NamePart_offsets_[2] = {
414 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_),
415 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_),
416 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000417 UninterpretedOption_NamePart_reflection_ =
418 new ::google::protobuf::internal::GeneratedMessageReflection(
419 UninterpretedOption_NamePart_descriptor_,
420 UninterpretedOption_NamePart::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000421 UninterpretedOption_NamePart_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000422 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]),
423 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _unknown_fields_),
424 -1,
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000425 ::google::protobuf::DescriptorPool::generated_pool(),
426 sizeof(UninterpretedOption_NamePart));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000427 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
428 UninterpretedOption_NamePart_descriptor_, UninterpretedOption_NamePart::default_instance_);
429 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
430 UninterpretedOption_descriptor_, UninterpretedOption::default_instance_);
431 FileDescriptorSet::default_instance_->InitAsDefaultInstance();
432 FileDescriptorProto::default_instance_->InitAsDefaultInstance();
433 DescriptorProto::default_instance_->InitAsDefaultInstance();
434 DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance();
435 FieldDescriptorProto::default_instance_->InitAsDefaultInstance();
436 EnumDescriptorProto::default_instance_->InitAsDefaultInstance();
437 EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance();
438 ServiceDescriptorProto::default_instance_->InitAsDefaultInstance();
439 MethodDescriptorProto::default_instance_->InitAsDefaultInstance();
440 FileOptions::default_instance_->InitAsDefaultInstance();
441 MessageOptions::default_instance_->InitAsDefaultInstance();
442 FieldOptions::default_instance_->InitAsDefaultInstance();
443 EnumOptions::default_instance_->InitAsDefaultInstance();
444 EnumValueOptions::default_instance_->InitAsDefaultInstance();
445 ServiceOptions::default_instance_->InitAsDefaultInstance();
446 MethodOptions::default_instance_->InitAsDefaultInstance();
447 UninterpretedOption::default_instance_->InitAsDefaultInstance();
448 UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance();
449}
450
temporal779f61c2008-08-13 03:15:00 +0000451void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto() {
temporal40ee5512008-07-10 02:12:20 +0000452 static bool already_here = false;
453 if (already_here) return;
454 already_here = true;
455 GOOGLE_PROTOBUF_VERIFY_VERSION;
456 ::google::protobuf::DescriptorPool* pool =
457 ::google::protobuf::DescriptorPool::internal_generated_pool();
458
kenton@google.com24bf56f2008-09-24 20:31:01 +0000459 pool->InternalBuildGeneratedFile(
temporal40ee5512008-07-10 02:12:20 +0000460 "\n google/protobuf/descriptor.proto\022\017goog"
temporal779f61c2008-08-13 03:15:00 +0000461 "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
462 "\030\001 \003(\0132$.google.protobuf.FileDescriptorP"
463 "roto\"\334\002\n\023FileDescriptorProto\022\014\n\004name\030\001 \001"
464 "(\t\022\017\n\007package\030\002 \001(\t\022\022\n\ndependency\030\003 \003(\t\022"
465 "6\n\014message_type\030\004 \003(\0132 .google.protobuf."
466 "DescriptorProto\0227\n\tenum_type\030\005 \003(\0132$.goo"
467 "gle.protobuf.EnumDescriptorProto\0228\n\007serv"
468 "ice\030\006 \003(\0132\'.google.protobuf.ServiceDescr"
469 "iptorProto\0228\n\textension\030\007 \003(\0132%.google.p"
470 "rotobuf.FieldDescriptorProto\022-\n\007options\030"
471 "\010 \001(\0132\034.google.protobuf.FileOptions\"\251\003\n\017"
472 "DescriptorProto\022\014\n\004name\030\001 \001(\t\0224\n\005field\030\002"
473 " \003(\0132%.google.protobuf.FieldDescriptorPr"
474 "oto\0228\n\textension\030\006 \003(\0132%.google.protobuf"
475 ".FieldDescriptorProto\0225\n\013nested_type\030\003 \003"
476 "(\0132 .google.protobuf.DescriptorProto\0227\n\t"
477 "enum_type\030\004 \003(\0132$.google.protobuf.EnumDe"
478 "scriptorProto\022H\n\017extension_range\030\005 \003(\0132/"
479 ".google.protobuf.DescriptorProto.Extensi"
480 "onRange\0220\n\007options\030\007 \001(\0132\037.google.protob"
481 "uf.MessageOptions\032,\n\016ExtensionRange\022\r\n\005s"
482 "tart\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\"\224\005\n\024FieldDescrip"
483 "torProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\003 \001(\005\022:"
484 "\n\005label\030\004 \001(\0162+.google.protobuf.FieldDes"
485 "criptorProto.Label\0228\n\004type\030\005 \001(\0162*.googl"
486 "e.protobuf.FieldDescriptorProto.Type\022\021\n\t"
487 "type_name\030\006 \001(\t\022\020\n\010extendee\030\002 \001(\t\022\025\n\rdef"
488 "ault_value\030\007 \001(\t\022.\n\007options\030\010 \001(\0132\035.goog"
489 "le.protobuf.FieldOptions\"\266\002\n\004Type\022\017\n\013TYP"
490 "E_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT64"
491 "\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014T"
492 "YPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE_"
493 "BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n\022"
494 "\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TYP"
495 "E_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXED"
496 "32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020\021"
497 "\022\017\n\013TYPE_SINT64\020\022\"C\n\005Label\022\022\n\016LABEL_OPTI"
498 "ONAL\020\001\022\022\n\016LABEL_REQUIRED\020\002\022\022\n\016LABEL_REPE"
499 "ATED\020\003\"\214\001\n\023EnumDescriptorProto\022\014\n\004name\030\001"
500 " \001(\t\0228\n\005value\030\002 \003(\0132).google.protobuf.En"
501 "umValueDescriptorProto\022-\n\007options\030\003 \001(\0132"
502 "\034.google.protobuf.EnumOptions\"l\n\030EnumVal"
503 "ueDescriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006numbe"
504 "r\030\002 \001(\005\0222\n\007options\030\003 \001(\0132!.google.protob"
505 "uf.EnumValueOptions\"\220\001\n\026ServiceDescripto"
506 "rProto\022\014\n\004name\030\001 \001(\t\0226\n\006method\030\002 \003(\0132&.g"
507 "oogle.protobuf.MethodDescriptorProto\0220\n\007"
508 "options\030\003 \001(\0132\037.google.protobuf.ServiceO"
509 "ptions\"\177\n\025MethodDescriptorProto\022\014\n\004name\030"
510 "\001 \001(\t\022\022\n\ninput_type\030\002 \001(\t\022\023\n\013output_type"
511 "\030\003 \001(\t\022/\n\007options\030\004 \001(\0132\036.google.protobu"
kenton@google.com24bf56f2008-09-24 20:31:01 +0000512 "f.MethodOptions\"\253\002\n\013FileOptions\022\024\n\014java_"
temporal779f61c2008-08-13 03:15:00 +0000513 "package\030\001 \001(\t\022\034\n\024java_outer_classname\030\010 "
514 "\001(\t\022\"\n\023java_multiple_files\030\n \001(\010:\005false\022"
515 "J\n\014optimize_for\030\t \001(\0162).google.protobuf."
kenton@google.com24bf56f2008-09-24 20:31:01 +0000516 "FileOptions.OptimizeMode:\tCODE_SIZE\022C\n\024u"
517 "ninterpreted_option\030\347\007 \003(\0132$.google.prot"
518 "obuf.UninterpretedOption\"(\n\014OptimizeMode"
519 "\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020\002*\t\010\350\007\020\200\200\200\200\002\"\210\001"
520 "\n\016MessageOptions\022&\n\027message_set_wire_for"
521 "mat\030\001 \001(\010:\005false\022C\n\024uninterpreted_option"
522 "\030\347\007 \003(\0132$.google.protobuf.UninterpretedO"
kenton@google.com2d6daa72009-01-22 01:27:00 +0000523 "ption*\t\010\350\007\020\200\200\200\200\002\"\345\001\n\014FieldOptions\0222\n\005cty"
kenton@google.com24bf56f2008-09-24 20:31:01 +0000524 "pe\030\001 \001(\0162#.google.protobuf.FieldOptions."
kenton@google.com2d6daa72009-01-22 01:27:00 +0000525 "CType\022\016\n\006packed\030\002 \001(\010\022\034\n\024experimental_ma"
526 "p_key\030\t \001(\t\022C\n\024uninterpreted_option\030\347\007 \003"
527 "(\0132$.google.protobuf.UninterpretedOption"
528 "\"#\n\005CType\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002*\t\010"
529 "\350\007\020\200\200\200\200\002\"]\n\013EnumOptions\022C\n\024uninterpreted"
530 "_option\030\347\007 \003(\0132$.google.protobuf.Uninter"
531 "pretedOption*\t\010\350\007\020\200\200\200\200\002\"b\n\020EnumValueOpti"
532 "ons\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goo"
533 "gle.protobuf.UninterpretedOption*\t\010\350\007\020\200\200"
534 "\200\200\002\"`\n\016ServiceOptions\022C\n\024uninterpreted_o"
535 "ption\030\347\007 \003(\0132$.google.protobuf.Uninterpr"
536 "etedOption*\t\010\350\007\020\200\200\200\200\002\"_\n\rMethodOptions\022C"
537 "\n\024uninterpreted_option\030\347\007 \003(\0132$.google.p"
538 "rotobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\205"
539 "\002\n\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-.g"
540 "oogle.protobuf.UninterpretedOption.NameP"
541 "art\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positiv"
542 "e_int_value\030\004 \001(\004\022\032\n\022negative_int_value\030"
543 "\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_va"
544 "lue\030\007 \001(\014\0323\n\010NamePart\022\021\n\tname_part\030\001 \002(\t"
545 "\022\024\n\014is_extension\030\002 \002(\010B)\n\023com.google.pro"
546 "tobufB\020DescriptorProtosH\001", 3465,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000547 &protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors);
temporal40ee5512008-07-10 02:12:20 +0000548}
549
550// Force BuildDescriptors() to be called at static initialization time.
551struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto {
552 StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() {
temporal779f61c2008-08-13 03:15:00 +0000553 protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +0000554 }
555} static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_;
556
557
558// ===================================================================
559
temporal779f61c2008-08-13 03:15:00 +0000560
temporal779f61c2008-08-13 03:15:00 +0000561FileDescriptorSet::FileDescriptorSet()
kenton@google.coma69deb62008-09-23 20:03:24 +0000562 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +0000563 _unknown_fields_(),
564 _cached_size_(0),
565 file_() {
temporal779f61c2008-08-13 03:15:00 +0000566 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal779f61c2008-08-13 03:15:00 +0000567}
568
kenton@google.com24bf56f2008-09-24 20:31:01 +0000569void FileDescriptorSet::InitAsDefaultInstance() {}
570
temporal779f61c2008-08-13 03:15:00 +0000571FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
kenton@google.coma69deb62008-09-23 20:03:24 +0000572 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +0000573 _unknown_fields_(),
574 _cached_size_(0),
575 file_() {
temporal779f61c2008-08-13 03:15:00 +0000576 ::memset(_has_bits_, 0, sizeof(_has_bits_));
577 MergeFrom(from);
578}
579
580FileDescriptorSet::~FileDescriptorSet() {
kenton@google.com24bf56f2008-09-24 20:31:01 +0000581 if (this != default_instance_) {
temporal779f61c2008-08-13 03:15:00 +0000582 }
583}
584
585const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() {
586 if (FileDescriptorSet_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
587 return FileDescriptorSet_descriptor_;
588}
589
kenton@google.com24bf56f2008-09-24 20:31:01 +0000590const FileDescriptorSet& FileDescriptorSet::default_instance() {
591 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
592 return *default_instance_;
593}
594
595FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL;
596
temporal779f61c2008-08-13 03:15:00 +0000597FileDescriptorSet* FileDescriptorSet::New() const {
598 return new FileDescriptorSet;
599}
600
601void FileDescriptorSet::Clear() {
602 file_.Clear();
603 ::memset(_has_bits_, 0, sizeof(_has_bits_));
604 mutable_unknown_fields()->Clear();
605}
606
607bool FileDescriptorSet::MergePartialFromCodedStream(
608 ::google::protobuf::io::CodedInputStream* input) {
609#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
610 ::google::protobuf::uint32 tag;
611 while ((tag = input->ReadTag()) != 0) {
612 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
613 // repeated .google.protobuf.FileDescriptorProto file = 1;
614 case 1: {
615 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
616 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
617 goto handle_uninterpreted;
618 }
619 parse_file:
620 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
621 input, add_file()));
622 if (input->ExpectTag(10)) goto parse_file;
623 if (input->ExpectAtEnd()) return true;
624 break;
625 }
626
627 default: {
628 handle_uninterpreted:
629 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
630 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
631 return true;
632 }
633 DO_(::google::protobuf::internal::WireFormat::SkipField(
634 input, tag, mutable_unknown_fields()));
635 break;
636 }
637 }
638 }
639 return true;
640#undef DO_
641}
642
643bool FileDescriptorSet::SerializeWithCachedSizes(
644 ::google::protobuf::io::CodedOutputStream* output) const {
645#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
646 // repeated .google.protobuf.FileDescriptorProto file = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000647 for (int i = 0; i < this->file_size(); i++) {
temporal779f61c2008-08-13 03:15:00 +0000648 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->file(i), output));
649 }
650
651 if (!unknown_fields().empty()) {
652 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
653 unknown_fields(), output));
654 }
655 return true;
656#undef DO_
657}
658
659int FileDescriptorSet::ByteSize() const {
660 int total_size = 0;
661
662 // repeated .google.protobuf.FileDescriptorProto file = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000663 total_size += 1 * this->file_size();
664 for (int i = 0; i < this->file_size(); i++) {
temporal779f61c2008-08-13 03:15:00 +0000665 total_size +=
666 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
667 this->file(i));
668 }
669
670 if (!unknown_fields().empty()) {
671 total_size +=
672 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
673 unknown_fields());
674 }
675 _cached_size_ = total_size;
676 return total_size;
677}
678
679void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) {
680 GOOGLE_CHECK_NE(&from, this);
681 const FileDescriptorSet* source =
682 ::google::protobuf::internal::dynamic_cast_if_available<const FileDescriptorSet*>(
683 &from);
684 if (source == NULL) {
685 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
686 } else {
687 MergeFrom(*source);
688 }
689}
690
691void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
692 GOOGLE_CHECK_NE(&from, this);
693 file_.MergeFrom(from.file_);
694 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
695}
696
697void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) {
698 if (&from == this) return;
699 Clear();
700 MergeFrom(from);
701}
702
703void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
704 if (&from == this) return;
705 Clear();
706 MergeFrom(from);
707}
708
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000709void FileDescriptorSet::Swap(FileDescriptorSet* other) {
710 if (other != this) {
711 file_.Swap(&other->file_);
712 std::swap(_has_bits_[0], other->_has_bits_[0]);
713 _unknown_fields_.Swap(&other->_unknown_fields_);
714 std::swap(_cached_size_, other->_cached_size_);
715 }
716}
717
temporal779f61c2008-08-13 03:15:00 +0000718bool FileDescriptorSet::IsInitialized() const {
719
kenton@google.com24bf56f2008-09-24 20:31:01 +0000720 for (int i = 0; i < file_size(); i++) {
721 if (!this->file(i).IsInitialized()) return false;
722 }
temporal779f61c2008-08-13 03:15:00 +0000723 return true;
724}
725
726const ::google::protobuf::Descriptor* FileDescriptorSet::GetDescriptor() const {
727 return descriptor();
728}
729
730const ::google::protobuf::Reflection* FileDescriptorSet::GetReflection() const {
731 if (FileDescriptorSet_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
732 return FileDescriptorSet_reflection_;
733}
734
735// ===================================================================
736
temporal40ee5512008-07-10 02:12:20 +0000737const ::std::string FileDescriptorProto::_default_name_;
738const ::std::string FileDescriptorProto::_default_package_;
739
740
741
742
743
744
temporal40ee5512008-07-10 02:12:20 +0000745FileDescriptorProto::FileDescriptorProto()
kenton@google.coma69deb62008-09-23 20:03:24 +0000746 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +0000747 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +0000748 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +0000749 name_(const_cast< ::std::string*>(&_default_name_)),
750 package_(const_cast< ::std::string*>(&_default_package_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +0000751 dependency_(),
752 message_type_(),
753 enum_type_(),
754 service_(),
755 extension_(),
temporal40ee5512008-07-10 02:12:20 +0000756 options_(NULL) {
757 ::memset(_has_bits_, 0, sizeof(_has_bits_));
kenton@google.com24bf56f2008-09-24 20:31:01 +0000758}
759
760void FileDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +0000761}
762
763FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
kenton@google.coma69deb62008-09-23 20:03:24 +0000764 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +0000765 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +0000766 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +0000767 name_(const_cast< ::std::string*>(&_default_name_)),
768 package_(const_cast< ::std::string*>(&_default_package_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +0000769 dependency_(),
770 message_type_(),
771 enum_type_(),
772 service_(),
773 extension_(),
temporal40ee5512008-07-10 02:12:20 +0000774 options_(NULL) {
775 ::memset(_has_bits_, 0, sizeof(_has_bits_));
776 MergeFrom(from);
777}
778
779FileDescriptorProto::~FileDescriptorProto() {
780 if (name_ != &_default_name_) {
781 delete name_;
782 }
783 if (package_ != &_default_package_) {
784 delete package_;
785 }
kenton@google.com24bf56f2008-09-24 20:31:01 +0000786 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +0000787 delete options_;
788 }
789}
790
791const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() {
temporal779f61c2008-08-13 03:15:00 +0000792 if (FileDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +0000793 return FileDescriptorProto_descriptor_;
794}
795
kenton@google.com24bf56f2008-09-24 20:31:01 +0000796const FileDescriptorProto& FileDescriptorProto::default_instance() {
797 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
798 return *default_instance_;
799}
800
801FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL;
802
temporal40ee5512008-07-10 02:12:20 +0000803FileDescriptorProto* FileDescriptorProto::New() const {
804 return new FileDescriptorProto;
805}
806
807void FileDescriptorProto::Clear() {
808 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
809 if (_has_bit(0)) {
810 if (name_ != &_default_name_) {
811 name_->clear();
812 }
813 }
814 if (_has_bit(1)) {
815 if (package_ != &_default_package_) {
816 package_->clear();
817 }
818 }
819 if (_has_bit(7)) {
820 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
821 }
822 }
823 dependency_.Clear();
824 message_type_.Clear();
825 enum_type_.Clear();
826 service_.Clear();
827 extension_.Clear();
828 ::memset(_has_bits_, 0, sizeof(_has_bits_));
829 mutable_unknown_fields()->Clear();
830}
831
832bool FileDescriptorProto::MergePartialFromCodedStream(
833 ::google::protobuf::io::CodedInputStream* input) {
834#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
835 ::google::protobuf::uint32 tag;
836 while ((tag = input->ReadTag()) != 0) {
837 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
838 // optional string name = 1;
839 case 1: {
840 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
841 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
842 goto handle_uninterpreted;
843 }
844 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name()));
845 if (input->ExpectTag(18)) goto parse_package;
846 break;
847 }
848
849 // optional string package = 2;
850 case 2: {
851 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
852 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
853 goto handle_uninterpreted;
854 }
855 parse_package:
856 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_package()));
857 if (input->ExpectTag(26)) goto parse_dependency;
858 break;
859 }
860
861 // repeated string dependency = 3;
862 case 3: {
863 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
864 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
865 goto handle_uninterpreted;
866 }
867 parse_dependency:
868 DO_(::google::protobuf::internal::WireFormat::ReadString(
869 input, add_dependency()));
870 if (input->ExpectTag(26)) goto parse_dependency;
871 if (input->ExpectTag(34)) goto parse_message_type;
872 break;
873 }
874
875 // repeated .google.protobuf.DescriptorProto message_type = 4;
876 case 4: {
877 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
878 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
879 goto handle_uninterpreted;
880 }
881 parse_message_type:
882 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
883 input, add_message_type()));
884 if (input->ExpectTag(34)) goto parse_message_type;
885 if (input->ExpectTag(42)) goto parse_enum_type;
886 break;
887 }
888
889 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
890 case 5: {
891 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
892 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
893 goto handle_uninterpreted;
894 }
895 parse_enum_type:
896 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
897 input, add_enum_type()));
898 if (input->ExpectTag(42)) goto parse_enum_type;
899 if (input->ExpectTag(50)) goto parse_service;
900 break;
901 }
902
903 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
904 case 6: {
905 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
906 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
907 goto handle_uninterpreted;
908 }
909 parse_service:
910 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
911 input, add_service()));
912 if (input->ExpectTag(50)) goto parse_service;
913 if (input->ExpectTag(58)) goto parse_extension;
914 break;
915 }
916
917 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
918 case 7: {
919 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
920 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
921 goto handle_uninterpreted;
922 }
923 parse_extension:
924 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
925 input, add_extension()));
926 if (input->ExpectTag(58)) goto parse_extension;
927 if (input->ExpectTag(66)) goto parse_options;
928 break;
929 }
930
931 // optional .google.protobuf.FileOptions options = 8;
932 case 8: {
933 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
934 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
935 goto handle_uninterpreted;
936 }
937 parse_options:
938 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
939 input, mutable_options()));
940 if (input->ExpectAtEnd()) return true;
941 break;
942 }
943
944 default: {
945 handle_uninterpreted:
946 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
947 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
948 return true;
949 }
950 DO_(::google::protobuf::internal::WireFormat::SkipField(
951 input, tag, mutable_unknown_fields()));
952 break;
953 }
954 }
955 }
956 return true;
957#undef DO_
958}
959
960bool FileDescriptorProto::SerializeWithCachedSizes(
961 ::google::protobuf::io::CodedOutputStream* output) const {
962#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
963 // optional string name = 1;
964 if (_has_bit(0)) {
965 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
966 }
967
968 // optional string package = 2;
969 if (_has_bit(1)) {
970 DO_(::google::protobuf::internal::WireFormat::WriteString(2, this->package(), output));
971 }
972
973 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000974 for (int i = 0; i < this->dependency_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +0000975 DO_(::google::protobuf::internal::WireFormat::WriteString(3, this->dependency(i), output));
976 }
977
978 // repeated .google.protobuf.DescriptorProto message_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000979 for (int i = 0; i < this->message_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +0000980 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->message_type(i), output));
981 }
982
983 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000984 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +0000985 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(5, this->enum_type(i), output));
986 }
987
988 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000989 for (int i = 0; i < this->service_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +0000990 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(6, this->service(i), output));
991 }
992
993 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000994 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +0000995 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(7, this->extension(i), output));
996 }
997
998 // optional .google.protobuf.FileOptions options = 8;
999 if (_has_bit(7)) {
1000 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(8, this->options(), output));
1001 }
1002
1003 if (!unknown_fields().empty()) {
1004 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1005 unknown_fields(), output));
1006 }
1007 return true;
1008#undef DO_
1009}
1010
1011int FileDescriptorProto::ByteSize() const {
1012 int total_size = 0;
1013
1014 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1015 // optional string name = 1;
1016 if (has_name()) {
1017 total_size += 1 +
1018 ::google::protobuf::internal::WireFormat::StringSize(this->name());
1019 }
1020
1021 // optional string package = 2;
1022 if (has_package()) {
1023 total_size += 1 +
1024 ::google::protobuf::internal::WireFormat::StringSize(this->package());
1025 }
1026
1027 // optional .google.protobuf.FileOptions options = 8;
1028 if (has_options()) {
1029 total_size += 1 +
1030 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1031 this->options());
1032 }
1033
1034 }
1035 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001036 total_size += 1 * this->dependency_size();
1037 for (int i = 0; i < this->dependency_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001038 total_size += ::google::protobuf::internal::WireFormat::StringSize(
1039 this->dependency(i));
1040 }
1041
1042 // repeated .google.protobuf.DescriptorProto message_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001043 total_size += 1 * this->message_type_size();
1044 for (int i = 0; i < this->message_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001045 total_size +=
1046 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1047 this->message_type(i));
1048 }
1049
1050 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001051 total_size += 1 * this->enum_type_size();
1052 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001053 total_size +=
1054 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1055 this->enum_type(i));
1056 }
1057
1058 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001059 total_size += 1 * this->service_size();
1060 for (int i = 0; i < this->service_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001061 total_size +=
1062 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1063 this->service(i));
1064 }
1065
1066 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001067 total_size += 1 * this->extension_size();
1068 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001069 total_size +=
1070 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1071 this->extension(i));
1072 }
1073
1074 if (!unknown_fields().empty()) {
1075 total_size +=
1076 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1077 unknown_fields());
1078 }
1079 _cached_size_ = total_size;
1080 return total_size;
1081}
1082
1083void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
1084 GOOGLE_CHECK_NE(&from, this);
1085 const FileDescriptorProto* source =
1086 ::google::protobuf::internal::dynamic_cast_if_available<const FileDescriptorProto*>(
1087 &from);
1088 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001089 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001090 } else {
1091 MergeFrom(*source);
1092 }
1093}
1094
1095void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
1096 GOOGLE_CHECK_NE(&from, this);
1097 dependency_.MergeFrom(from.dependency_);
1098 message_type_.MergeFrom(from.message_type_);
1099 enum_type_.MergeFrom(from.enum_type_);
1100 service_.MergeFrom(from.service_);
1101 extension_.MergeFrom(from.extension_);
1102 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1103 if (from._has_bit(0)) {
1104 set_name(from.name());
1105 }
1106 if (from._has_bit(1)) {
1107 set_package(from.package());
1108 }
1109 if (from._has_bit(7)) {
1110 mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options());
1111 }
1112 }
1113 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1114}
1115
1116void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
1117 if (&from == this) return;
1118 Clear();
1119 MergeFrom(from);
1120}
1121
1122void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
1123 if (&from == this) return;
1124 Clear();
1125 MergeFrom(from);
1126}
1127
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001128void FileDescriptorProto::Swap(FileDescriptorProto* other) {
1129 if (other != this) {
1130 std::swap(name_, other->name_);
1131 std::swap(package_, other->package_);
1132 dependency_.Swap(&other->dependency_);
1133 message_type_.Swap(&other->message_type_);
1134 enum_type_.Swap(&other->enum_type_);
1135 service_.Swap(&other->service_);
1136 extension_.Swap(&other->extension_);
1137 std::swap(options_, other->options_);
1138 std::swap(_has_bits_[0], other->_has_bits_[0]);
1139 _unknown_fields_.Swap(&other->_unknown_fields_);
1140 std::swap(_cached_size_, other->_cached_size_);
1141 }
1142}
1143
temporal40ee5512008-07-10 02:12:20 +00001144bool FileDescriptorProto::IsInitialized() const {
1145
kenton@google.com24bf56f2008-09-24 20:31:01 +00001146 for (int i = 0; i < message_type_size(); i++) {
1147 if (!this->message_type(i).IsInitialized()) return false;
1148 }
1149 for (int i = 0; i < enum_type_size(); i++) {
1150 if (!this->enum_type(i).IsInitialized()) return false;
1151 }
1152 for (int i = 0; i < service_size(); i++) {
1153 if (!this->service(i).IsInitialized()) return false;
1154 }
1155 for (int i = 0; i < extension_size(); i++) {
1156 if (!this->extension(i).IsInitialized()) return false;
1157 }
1158 if (has_options()) {
1159 if (!this->options().IsInitialized()) return false;
1160 }
temporal40ee5512008-07-10 02:12:20 +00001161 return true;
1162}
1163
1164const ::google::protobuf::Descriptor* FileDescriptorProto::GetDescriptor() const {
1165 return descriptor();
1166}
1167
temporal779f61c2008-08-13 03:15:00 +00001168const ::google::protobuf::Reflection* FileDescriptorProto::GetReflection() const {
1169 if (FileDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
1170 return FileDescriptorProto_reflection_;
temporal40ee5512008-07-10 02:12:20 +00001171}
1172
1173// ===================================================================
1174
temporal40ee5512008-07-10 02:12:20 +00001175
1176
temporal40ee5512008-07-10 02:12:20 +00001177DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange()
kenton@google.coma69deb62008-09-23 20:03:24 +00001178 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001179 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00001180 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00001181 start_(0),
1182 end_(0) {
1183 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00001184}
1185
kenton@google.com24bf56f2008-09-24 20:31:01 +00001186void DescriptorProto_ExtensionRange::InitAsDefaultInstance() {}
1187
temporal40ee5512008-07-10 02:12:20 +00001188DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00001189 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001190 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00001191 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00001192 start_(0),
1193 end_(0) {
1194 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1195 MergeFrom(from);
1196}
1197
1198DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00001199 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001200 }
1201}
1202
1203const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00001204 if (DescriptorProto_ExtensionRange_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00001205 return DescriptorProto_ExtensionRange_descriptor_;
1206}
1207
kenton@google.com24bf56f2008-09-24 20:31:01 +00001208const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() {
1209 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
1210 return *default_instance_;
1211}
1212
1213DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL;
1214
temporal40ee5512008-07-10 02:12:20 +00001215DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New() const {
1216 return new DescriptorProto_ExtensionRange;
1217}
1218
1219void DescriptorProto_ExtensionRange::Clear() {
1220 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1221 start_ = 0;
1222 end_ = 0;
1223 }
1224 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1225 mutable_unknown_fields()->Clear();
1226}
1227
1228bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream(
1229 ::google::protobuf::io::CodedInputStream* input) {
1230#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1231 ::google::protobuf::uint32 tag;
1232 while ((tag = input->ReadTag()) != 0) {
1233 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
1234 // optional int32 start = 1;
1235 case 1: {
1236 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1237 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
1238 goto handle_uninterpreted;
1239 }
1240 DO_(::google::protobuf::internal::WireFormat::ReadInt32(
1241 input, &start_));
1242 _set_bit(0);
1243 if (input->ExpectTag(16)) goto parse_end;
1244 break;
1245 }
1246
1247 // optional int32 end = 2;
1248 case 2: {
1249 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1250 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
1251 goto handle_uninterpreted;
1252 }
1253 parse_end:
1254 DO_(::google::protobuf::internal::WireFormat::ReadInt32(
1255 input, &end_));
1256 _set_bit(1);
1257 if (input->ExpectAtEnd()) return true;
1258 break;
1259 }
1260
1261 default: {
1262 handle_uninterpreted:
1263 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
1264 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
1265 return true;
1266 }
1267 DO_(::google::protobuf::internal::WireFormat::SkipField(
1268 input, tag, mutable_unknown_fields()));
1269 break;
1270 }
1271 }
1272 }
1273 return true;
1274#undef DO_
1275}
1276
1277bool DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
1278 ::google::protobuf::io::CodedOutputStream* output) const {
1279#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1280 // optional int32 start = 1;
1281 if (_has_bit(0)) {
1282 DO_(::google::protobuf::internal::WireFormat::WriteInt32(1, this->start(), output));
1283 }
1284
1285 // optional int32 end = 2;
1286 if (_has_bit(1)) {
1287 DO_(::google::protobuf::internal::WireFormat::WriteInt32(2, this->end(), output));
1288 }
1289
1290 if (!unknown_fields().empty()) {
1291 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1292 unknown_fields(), output));
1293 }
1294 return true;
1295#undef DO_
1296}
1297
1298int DescriptorProto_ExtensionRange::ByteSize() const {
1299 int total_size = 0;
1300
1301 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1302 // optional int32 start = 1;
1303 if (has_start()) {
1304 total_size += 1 +
1305 ::google::protobuf::internal::WireFormat::Int32Size(
1306 this->start());
1307 }
1308
1309 // optional int32 end = 2;
1310 if (has_end()) {
1311 total_size += 1 +
1312 ::google::protobuf::internal::WireFormat::Int32Size(
1313 this->end());
1314 }
1315
1316 }
1317 if (!unknown_fields().empty()) {
1318 total_size +=
1319 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1320 unknown_fields());
1321 }
1322 _cached_size_ = total_size;
1323 return total_size;
1324}
1325
1326void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) {
1327 GOOGLE_CHECK_NE(&from, this);
1328 const DescriptorProto_ExtensionRange* source =
1329 ::google::protobuf::internal::dynamic_cast_if_available<const DescriptorProto_ExtensionRange*>(
1330 &from);
1331 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001332 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001333 } else {
1334 MergeFrom(*source);
1335 }
1336}
1337
1338void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
1339 GOOGLE_CHECK_NE(&from, this);
1340 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1341 if (from._has_bit(0)) {
1342 set_start(from.start());
1343 }
1344 if (from._has_bit(1)) {
1345 set_end(from.end());
1346 }
1347 }
1348 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1349}
1350
1351void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) {
1352 if (&from == this) return;
1353 Clear();
1354 MergeFrom(from);
1355}
1356
1357void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) {
1358 if (&from == this) return;
1359 Clear();
1360 MergeFrom(from);
1361}
1362
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001363void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) {
1364 if (other != this) {
1365 std::swap(start_, other->start_);
1366 std::swap(end_, other->end_);
1367 std::swap(_has_bits_[0], other->_has_bits_[0]);
1368 _unknown_fields_.Swap(&other->_unknown_fields_);
1369 std::swap(_cached_size_, other->_cached_size_);
1370 }
1371}
1372
temporal40ee5512008-07-10 02:12:20 +00001373bool DescriptorProto_ExtensionRange::IsInitialized() const {
1374
1375 return true;
1376}
1377
1378const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::GetDescriptor() const {
1379 return descriptor();
1380}
1381
temporal779f61c2008-08-13 03:15:00 +00001382const ::google::protobuf::Reflection* DescriptorProto_ExtensionRange::GetReflection() const {
1383 if (DescriptorProto_ExtensionRange_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
1384 return DescriptorProto_ExtensionRange_reflection_;
temporal40ee5512008-07-10 02:12:20 +00001385}
1386
1387// -------------------------------------------------------------------
1388
temporal40ee5512008-07-10 02:12:20 +00001389const ::std::string DescriptorProto::_default_name_;
1390
1391
1392
1393
1394
1395
temporal40ee5512008-07-10 02:12:20 +00001396DescriptorProto::DescriptorProto()
kenton@google.coma69deb62008-09-23 20:03:24 +00001397 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001398 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00001399 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00001400 name_(const_cast< ::std::string*>(&_default_name_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001401 field_(),
1402 extension_(),
1403 nested_type_(),
1404 enum_type_(),
1405 extension_range_(),
temporal40ee5512008-07-10 02:12:20 +00001406 options_(NULL) {
1407 ::memset(_has_bits_, 0, sizeof(_has_bits_));
kenton@google.com24bf56f2008-09-24 20:31:01 +00001408}
1409
1410void DescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00001411}
1412
1413DescriptorProto::DescriptorProto(const DescriptorProto& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00001414 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001415 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00001416 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00001417 name_(const_cast< ::std::string*>(&_default_name_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001418 field_(),
1419 extension_(),
1420 nested_type_(),
1421 enum_type_(),
1422 extension_range_(),
temporal40ee5512008-07-10 02:12:20 +00001423 options_(NULL) {
1424 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1425 MergeFrom(from);
1426}
1427
1428DescriptorProto::~DescriptorProto() {
1429 if (name_ != &_default_name_) {
1430 delete name_;
1431 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00001432 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001433 delete options_;
1434 }
1435}
1436
1437const ::google::protobuf::Descriptor* DescriptorProto::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00001438 if (DescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00001439 return DescriptorProto_descriptor_;
1440}
1441
kenton@google.com24bf56f2008-09-24 20:31:01 +00001442const DescriptorProto& DescriptorProto::default_instance() {
1443 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
1444 return *default_instance_;
1445}
1446
1447DescriptorProto* DescriptorProto::default_instance_ = NULL;
1448
temporal40ee5512008-07-10 02:12:20 +00001449DescriptorProto* DescriptorProto::New() const {
1450 return new DescriptorProto;
1451}
1452
1453void DescriptorProto::Clear() {
1454 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1455 if (_has_bit(0)) {
1456 if (name_ != &_default_name_) {
1457 name_->clear();
1458 }
1459 }
1460 if (_has_bit(6)) {
1461 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
1462 }
1463 }
1464 field_.Clear();
1465 extension_.Clear();
1466 nested_type_.Clear();
1467 enum_type_.Clear();
1468 extension_range_.Clear();
1469 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1470 mutable_unknown_fields()->Clear();
1471}
1472
1473bool DescriptorProto::MergePartialFromCodedStream(
1474 ::google::protobuf::io::CodedInputStream* input) {
1475#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1476 ::google::protobuf::uint32 tag;
1477 while ((tag = input->ReadTag()) != 0) {
1478 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
1479 // optional string name = 1;
1480 case 1: {
1481 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1482 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1483 goto handle_uninterpreted;
1484 }
1485 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name()));
1486 if (input->ExpectTag(18)) goto parse_field;
1487 break;
1488 }
1489
1490 // repeated .google.protobuf.FieldDescriptorProto field = 2;
1491 case 2: {
1492 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1493 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1494 goto handle_uninterpreted;
1495 }
1496 parse_field:
1497 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
1498 input, add_field()));
1499 if (input->ExpectTag(18)) goto parse_field;
1500 if (input->ExpectTag(26)) goto parse_nested_type;
1501 break;
1502 }
1503
1504 // repeated .google.protobuf.DescriptorProto nested_type = 3;
1505 case 3: {
1506 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1507 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1508 goto handle_uninterpreted;
1509 }
1510 parse_nested_type:
1511 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
1512 input, add_nested_type()));
1513 if (input->ExpectTag(26)) goto parse_nested_type;
1514 if (input->ExpectTag(34)) goto parse_enum_type;
1515 break;
1516 }
1517
1518 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
1519 case 4: {
1520 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1521 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1522 goto handle_uninterpreted;
1523 }
1524 parse_enum_type:
1525 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
1526 input, add_enum_type()));
1527 if (input->ExpectTag(34)) goto parse_enum_type;
1528 if (input->ExpectTag(42)) goto parse_extension_range;
1529 break;
1530 }
1531
1532 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
1533 case 5: {
1534 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1535 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1536 goto handle_uninterpreted;
1537 }
1538 parse_extension_range:
1539 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
1540 input, add_extension_range()));
1541 if (input->ExpectTag(42)) goto parse_extension_range;
1542 if (input->ExpectTag(50)) goto parse_extension;
1543 break;
1544 }
1545
1546 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
1547 case 6: {
1548 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1549 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1550 goto handle_uninterpreted;
1551 }
1552 parse_extension:
1553 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
1554 input, add_extension()));
1555 if (input->ExpectTag(50)) goto parse_extension;
1556 if (input->ExpectTag(58)) goto parse_options;
1557 break;
1558 }
1559
1560 // optional .google.protobuf.MessageOptions options = 7;
1561 case 7: {
1562 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1563 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1564 goto handle_uninterpreted;
1565 }
1566 parse_options:
1567 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
1568 input, mutable_options()));
1569 if (input->ExpectAtEnd()) return true;
1570 break;
1571 }
1572
1573 default: {
1574 handle_uninterpreted:
1575 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
1576 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
1577 return true;
1578 }
1579 DO_(::google::protobuf::internal::WireFormat::SkipField(
1580 input, tag, mutable_unknown_fields()));
1581 break;
1582 }
1583 }
1584 }
1585 return true;
1586#undef DO_
1587}
1588
1589bool DescriptorProto::SerializeWithCachedSizes(
1590 ::google::protobuf::io::CodedOutputStream* output) const {
1591#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1592 // optional string name = 1;
1593 if (_has_bit(0)) {
1594 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
1595 }
1596
1597 // repeated .google.protobuf.FieldDescriptorProto field = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001598 for (int i = 0; i < this->field_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001599 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->field(i), output));
1600 }
1601
1602 // repeated .google.protobuf.DescriptorProto nested_type = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001603 for (int i = 0; i < this->nested_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001604 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->nested_type(i), output));
1605 }
1606
1607 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001608 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001609 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->enum_type(i), output));
1610 }
1611
1612 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001613 for (int i = 0; i < this->extension_range_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001614 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(5, this->extension_range(i), output));
1615 }
1616
1617 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001618 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001619 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(6, this->extension(i), output));
1620 }
1621
1622 // optional .google.protobuf.MessageOptions options = 7;
1623 if (_has_bit(6)) {
1624 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(7, this->options(), output));
1625 }
1626
1627 if (!unknown_fields().empty()) {
1628 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1629 unknown_fields(), output));
1630 }
1631 return true;
1632#undef DO_
1633}
1634
1635int DescriptorProto::ByteSize() const {
1636 int total_size = 0;
1637
1638 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1639 // optional string name = 1;
1640 if (has_name()) {
1641 total_size += 1 +
1642 ::google::protobuf::internal::WireFormat::StringSize(this->name());
1643 }
1644
1645 // optional .google.protobuf.MessageOptions options = 7;
1646 if (has_options()) {
1647 total_size += 1 +
1648 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1649 this->options());
1650 }
1651
1652 }
1653 // repeated .google.protobuf.FieldDescriptorProto field = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001654 total_size += 1 * this->field_size();
1655 for (int i = 0; i < this->field_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001656 total_size +=
1657 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1658 this->field(i));
1659 }
1660
1661 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001662 total_size += 1 * this->extension_size();
1663 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001664 total_size +=
1665 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1666 this->extension(i));
1667 }
1668
1669 // repeated .google.protobuf.DescriptorProto nested_type = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001670 total_size += 1 * this->nested_type_size();
1671 for (int i = 0; i < this->nested_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001672 total_size +=
1673 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1674 this->nested_type(i));
1675 }
1676
1677 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001678 total_size += 1 * this->enum_type_size();
1679 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001680 total_size +=
1681 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1682 this->enum_type(i));
1683 }
1684
1685 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001686 total_size += 1 * this->extension_range_size();
1687 for (int i = 0; i < this->extension_range_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001688 total_size +=
1689 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
1690 this->extension_range(i));
1691 }
1692
1693 if (!unknown_fields().empty()) {
1694 total_size +=
1695 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1696 unknown_fields());
1697 }
1698 _cached_size_ = total_size;
1699 return total_size;
1700}
1701
1702void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
1703 GOOGLE_CHECK_NE(&from, this);
1704 const DescriptorProto* source =
1705 ::google::protobuf::internal::dynamic_cast_if_available<const DescriptorProto*>(
1706 &from);
1707 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001708 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001709 } else {
1710 MergeFrom(*source);
1711 }
1712}
1713
1714void DescriptorProto::MergeFrom(const DescriptorProto& from) {
1715 GOOGLE_CHECK_NE(&from, this);
1716 field_.MergeFrom(from.field_);
1717 extension_.MergeFrom(from.extension_);
1718 nested_type_.MergeFrom(from.nested_type_);
1719 enum_type_.MergeFrom(from.enum_type_);
1720 extension_range_.MergeFrom(from.extension_range_);
1721 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1722 if (from._has_bit(0)) {
1723 set_name(from.name());
1724 }
1725 if (from._has_bit(6)) {
1726 mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options());
1727 }
1728 }
1729 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1730}
1731
1732void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
1733 if (&from == this) return;
1734 Clear();
1735 MergeFrom(from);
1736}
1737
1738void DescriptorProto::CopyFrom(const DescriptorProto& from) {
1739 if (&from == this) return;
1740 Clear();
1741 MergeFrom(from);
1742}
1743
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001744void DescriptorProto::Swap(DescriptorProto* other) {
1745 if (other != this) {
1746 std::swap(name_, other->name_);
1747 field_.Swap(&other->field_);
1748 extension_.Swap(&other->extension_);
1749 nested_type_.Swap(&other->nested_type_);
1750 enum_type_.Swap(&other->enum_type_);
1751 extension_range_.Swap(&other->extension_range_);
1752 std::swap(options_, other->options_);
1753 std::swap(_has_bits_[0], other->_has_bits_[0]);
1754 _unknown_fields_.Swap(&other->_unknown_fields_);
1755 std::swap(_cached_size_, other->_cached_size_);
1756 }
1757}
1758
temporal40ee5512008-07-10 02:12:20 +00001759bool DescriptorProto::IsInitialized() const {
1760
kenton@google.com24bf56f2008-09-24 20:31:01 +00001761 for (int i = 0; i < field_size(); i++) {
1762 if (!this->field(i).IsInitialized()) return false;
1763 }
1764 for (int i = 0; i < extension_size(); i++) {
1765 if (!this->extension(i).IsInitialized()) return false;
1766 }
1767 for (int i = 0; i < nested_type_size(); i++) {
1768 if (!this->nested_type(i).IsInitialized()) return false;
1769 }
1770 for (int i = 0; i < enum_type_size(); i++) {
1771 if (!this->enum_type(i).IsInitialized()) return false;
1772 }
1773 if (has_options()) {
1774 if (!this->options().IsInitialized()) return false;
1775 }
temporal40ee5512008-07-10 02:12:20 +00001776 return true;
1777}
1778
1779const ::google::protobuf::Descriptor* DescriptorProto::GetDescriptor() const {
1780 return descriptor();
1781}
1782
temporal779f61c2008-08-13 03:15:00 +00001783const ::google::protobuf::Reflection* DescriptorProto::GetReflection() const {
1784 if (DescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
1785 return DescriptorProto_reflection_;
temporal40ee5512008-07-10 02:12:20 +00001786}
1787
1788// ===================================================================
1789
1790const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() {
temporal779f61c2008-08-13 03:15:00 +00001791 if (FieldDescriptorProto_Type_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00001792 return FieldDescriptorProto_Type_descriptor_;
1793}
1794bool FieldDescriptorProto_Type_IsValid(int value) {
1795 switch(value) {
1796 case 1:
1797 case 2:
1798 case 3:
1799 case 4:
1800 case 5:
1801 case 6:
1802 case 7:
1803 case 8:
1804 case 9:
1805 case 10:
1806 case 11:
1807 case 12:
1808 case 13:
1809 case 14:
1810 case 15:
1811 case 16:
1812 case 17:
1813 case 18:
1814 return true;
1815 default:
1816 return false;
1817 }
1818}
1819
1820#ifndef _MSC_VER
1821const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
1822const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
1823const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64;
1824const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64;
1825const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32;
1826const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64;
1827const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32;
1828const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL;
1829const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING;
1830const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP;
1831const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE;
1832const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES;
1833const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32;
1834const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM;
1835const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32;
1836const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64;
1837const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32;
1838const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64;
1839const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
1840const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
1841#endif // _MSC_VER
1842const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
temporal779f61c2008-08-13 03:15:00 +00001843 if (FieldDescriptorProto_Label_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00001844 return FieldDescriptorProto_Label_descriptor_;
1845}
1846bool FieldDescriptorProto_Label_IsValid(int value) {
1847 switch(value) {
1848 case 1:
1849 case 2:
1850 case 3:
1851 return true;
1852 default:
1853 return false;
1854 }
1855}
1856
1857#ifndef _MSC_VER
1858const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
1859const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
1860const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED;
1861const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN;
1862const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX;
1863#endif // _MSC_VER
temporal40ee5512008-07-10 02:12:20 +00001864const ::std::string FieldDescriptorProto::_default_name_;
1865
1866
1867
1868const ::std::string FieldDescriptorProto::_default_type_name_;
1869const ::std::string FieldDescriptorProto::_default_extendee_;
1870const ::std::string FieldDescriptorProto::_default_default_value_;
1871
temporal40ee5512008-07-10 02:12:20 +00001872FieldDescriptorProto::FieldDescriptorProto()
kenton@google.coma69deb62008-09-23 20:03:24 +00001873 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001874 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00001875 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00001876 name_(const_cast< ::std::string*>(&_default_name_)),
1877 number_(0),
1878 label_(1),
1879 type_(1),
1880 type_name_(const_cast< ::std::string*>(&_default_type_name_)),
1881 extendee_(const_cast< ::std::string*>(&_default_extendee_)),
1882 default_value_(const_cast< ::std::string*>(&_default_default_value_)),
1883 options_(NULL) {
1884 ::memset(_has_bits_, 0, sizeof(_has_bits_));
kenton@google.com24bf56f2008-09-24 20:31:01 +00001885}
1886
1887void FieldDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00001888}
1889
1890FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00001891 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00001892 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00001893 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00001894 name_(const_cast< ::std::string*>(&_default_name_)),
1895 number_(0),
1896 label_(1),
1897 type_(1),
1898 type_name_(const_cast< ::std::string*>(&_default_type_name_)),
1899 extendee_(const_cast< ::std::string*>(&_default_extendee_)),
1900 default_value_(const_cast< ::std::string*>(&_default_default_value_)),
1901 options_(NULL) {
1902 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1903 MergeFrom(from);
1904}
1905
1906FieldDescriptorProto::~FieldDescriptorProto() {
1907 if (name_ != &_default_name_) {
1908 delete name_;
1909 }
1910 if (type_name_ != &_default_type_name_) {
1911 delete type_name_;
1912 }
1913 if (extendee_ != &_default_extendee_) {
1914 delete extendee_;
1915 }
1916 if (default_value_ != &_default_default_value_) {
1917 delete default_value_;
1918 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00001919 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001920 delete options_;
1921 }
1922}
1923
1924const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00001925 if (FieldDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00001926 return FieldDescriptorProto_descriptor_;
1927}
1928
kenton@google.com24bf56f2008-09-24 20:31:01 +00001929const FieldDescriptorProto& FieldDescriptorProto::default_instance() {
1930 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
1931 return *default_instance_;
1932}
1933
1934FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL;
1935
temporal40ee5512008-07-10 02:12:20 +00001936FieldDescriptorProto* FieldDescriptorProto::New() const {
1937 return new FieldDescriptorProto;
1938}
1939
1940void FieldDescriptorProto::Clear() {
1941 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1942 if (_has_bit(0)) {
1943 if (name_ != &_default_name_) {
1944 name_->clear();
1945 }
1946 }
1947 number_ = 0;
1948 label_ = 1;
1949 type_ = 1;
1950 if (_has_bit(4)) {
1951 if (type_name_ != &_default_type_name_) {
1952 type_name_->clear();
1953 }
1954 }
1955 if (_has_bit(5)) {
1956 if (extendee_ != &_default_extendee_) {
1957 extendee_->clear();
1958 }
1959 }
1960 if (_has_bit(6)) {
1961 if (default_value_ != &_default_default_value_) {
1962 default_value_->clear();
1963 }
1964 }
1965 if (_has_bit(7)) {
1966 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
1967 }
1968 }
1969 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1970 mutable_unknown_fields()->Clear();
1971}
1972
1973bool FieldDescriptorProto::MergePartialFromCodedStream(
1974 ::google::protobuf::io::CodedInputStream* input) {
1975#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1976 ::google::protobuf::uint32 tag;
1977 while ((tag = input->ReadTag()) != 0) {
1978 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
1979 // optional string name = 1;
1980 case 1: {
1981 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1982 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1983 goto handle_uninterpreted;
1984 }
1985 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name()));
1986 if (input->ExpectTag(18)) goto parse_extendee;
1987 break;
1988 }
1989
1990 // optional string extendee = 2;
1991 case 2: {
1992 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
1993 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
1994 goto handle_uninterpreted;
1995 }
1996 parse_extendee:
1997 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_extendee()));
1998 if (input->ExpectTag(24)) goto parse_number;
1999 break;
2000 }
2001
2002 // optional int32 number = 3;
2003 case 3: {
2004 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2005 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
2006 goto handle_uninterpreted;
2007 }
2008 parse_number:
2009 DO_(::google::protobuf::internal::WireFormat::ReadInt32(
2010 input, &number_));
2011 _set_bit(1);
2012 if (input->ExpectTag(32)) goto parse_label;
2013 break;
2014 }
2015
2016 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
2017 case 4: {
2018 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2019 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
2020 goto handle_uninterpreted;
2021 }
2022 parse_label:
2023 int value;
2024 DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
2025 if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) {
2026 set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value));
2027 } else {
2028 mutable_unknown_fields()->AddField(4)->add_varint(value);
2029 }
2030 if (input->ExpectTag(40)) goto parse_type;
2031 break;
2032 }
2033
2034 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
2035 case 5: {
2036 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2037 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
2038 goto handle_uninterpreted;
2039 }
2040 parse_type:
2041 int value;
2042 DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
2043 if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) {
2044 set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value));
2045 } else {
2046 mutable_unknown_fields()->AddField(5)->add_varint(value);
2047 }
2048 if (input->ExpectTag(50)) goto parse_type_name;
2049 break;
2050 }
2051
2052 // optional string type_name = 6;
2053 case 6: {
2054 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2055 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2056 goto handle_uninterpreted;
2057 }
2058 parse_type_name:
2059 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_type_name()));
2060 if (input->ExpectTag(58)) goto parse_default_value;
2061 break;
2062 }
2063
2064 // optional string default_value = 7;
2065 case 7: {
2066 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2067 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2068 goto handle_uninterpreted;
2069 }
2070 parse_default_value:
2071 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_default_value()));
2072 if (input->ExpectTag(66)) goto parse_options;
2073 break;
2074 }
2075
2076 // optional .google.protobuf.FieldOptions options = 8;
2077 case 8: {
2078 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2079 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2080 goto handle_uninterpreted;
2081 }
2082 parse_options:
2083 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
2084 input, mutable_options()));
2085 if (input->ExpectAtEnd()) return true;
2086 break;
2087 }
2088
2089 default: {
2090 handle_uninterpreted:
2091 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
2092 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
2093 return true;
2094 }
2095 DO_(::google::protobuf::internal::WireFormat::SkipField(
2096 input, tag, mutable_unknown_fields()));
2097 break;
2098 }
2099 }
2100 }
2101 return true;
2102#undef DO_
2103}
2104
2105bool FieldDescriptorProto::SerializeWithCachedSizes(
2106 ::google::protobuf::io::CodedOutputStream* output) const {
2107#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2108 // optional string name = 1;
2109 if (_has_bit(0)) {
2110 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
2111 }
2112
2113 // optional string extendee = 2;
2114 if (_has_bit(5)) {
2115 DO_(::google::protobuf::internal::WireFormat::WriteString(2, this->extendee(), output));
2116 }
2117
2118 // optional int32 number = 3;
2119 if (_has_bit(1)) {
2120 DO_(::google::protobuf::internal::WireFormat::WriteInt32(3, this->number(), output));
2121 }
2122
2123 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
2124 if (_has_bit(2)) {
2125 DO_(::google::protobuf::internal::WireFormat::WriteEnum(4, this->label(), output));
2126 }
2127
2128 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
2129 if (_has_bit(3)) {
2130 DO_(::google::protobuf::internal::WireFormat::WriteEnum(5, this->type(), output));
2131 }
2132
2133 // optional string type_name = 6;
2134 if (_has_bit(4)) {
2135 DO_(::google::protobuf::internal::WireFormat::WriteString(6, this->type_name(), output));
2136 }
2137
2138 // optional string default_value = 7;
2139 if (_has_bit(6)) {
2140 DO_(::google::protobuf::internal::WireFormat::WriteString(7, this->default_value(), output));
2141 }
2142
2143 // optional .google.protobuf.FieldOptions options = 8;
2144 if (_has_bit(7)) {
2145 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(8, this->options(), output));
2146 }
2147
2148 if (!unknown_fields().empty()) {
2149 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2150 unknown_fields(), output));
2151 }
2152 return true;
2153#undef DO_
2154}
2155
2156int FieldDescriptorProto::ByteSize() const {
2157 int total_size = 0;
2158
2159 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2160 // optional string name = 1;
2161 if (has_name()) {
2162 total_size += 1 +
2163 ::google::protobuf::internal::WireFormat::StringSize(this->name());
2164 }
2165
2166 // optional int32 number = 3;
2167 if (has_number()) {
2168 total_size += 1 +
2169 ::google::protobuf::internal::WireFormat::Int32Size(
2170 this->number());
2171 }
2172
2173 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
2174 if (has_label()) {
2175 total_size += 1 +
2176 ::google::protobuf::internal::WireFormat::EnumSize(this->label());
2177 }
2178
2179 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
2180 if (has_type()) {
2181 total_size += 1 +
2182 ::google::protobuf::internal::WireFormat::EnumSize(this->type());
2183 }
2184
2185 // optional string type_name = 6;
2186 if (has_type_name()) {
2187 total_size += 1 +
2188 ::google::protobuf::internal::WireFormat::StringSize(this->type_name());
2189 }
2190
2191 // optional string extendee = 2;
2192 if (has_extendee()) {
2193 total_size += 1 +
2194 ::google::protobuf::internal::WireFormat::StringSize(this->extendee());
2195 }
2196
2197 // optional string default_value = 7;
2198 if (has_default_value()) {
2199 total_size += 1 +
2200 ::google::protobuf::internal::WireFormat::StringSize(this->default_value());
2201 }
2202
2203 // optional .google.protobuf.FieldOptions options = 8;
2204 if (has_options()) {
2205 total_size += 1 +
2206 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
2207 this->options());
2208 }
2209
2210 }
2211 if (!unknown_fields().empty()) {
2212 total_size +=
2213 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2214 unknown_fields());
2215 }
2216 _cached_size_ = total_size;
2217 return total_size;
2218}
2219
2220void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
2221 GOOGLE_CHECK_NE(&from, this);
2222 const FieldDescriptorProto* source =
2223 ::google::protobuf::internal::dynamic_cast_if_available<const FieldDescriptorProto*>(
2224 &from);
2225 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002226 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002227 } else {
2228 MergeFrom(*source);
2229 }
2230}
2231
2232void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
2233 GOOGLE_CHECK_NE(&from, this);
2234 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2235 if (from._has_bit(0)) {
2236 set_name(from.name());
2237 }
2238 if (from._has_bit(1)) {
2239 set_number(from.number());
2240 }
2241 if (from._has_bit(2)) {
2242 set_label(from.label());
2243 }
2244 if (from._has_bit(3)) {
2245 set_type(from.type());
2246 }
2247 if (from._has_bit(4)) {
2248 set_type_name(from.type_name());
2249 }
2250 if (from._has_bit(5)) {
2251 set_extendee(from.extendee());
2252 }
2253 if (from._has_bit(6)) {
2254 set_default_value(from.default_value());
2255 }
2256 if (from._has_bit(7)) {
2257 mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options());
2258 }
2259 }
2260 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2261}
2262
2263void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
2264 if (&from == this) return;
2265 Clear();
2266 MergeFrom(from);
2267}
2268
2269void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
2270 if (&from == this) return;
2271 Clear();
2272 MergeFrom(from);
2273}
2274
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002275void FieldDescriptorProto::Swap(FieldDescriptorProto* other) {
2276 if (other != this) {
2277 std::swap(name_, other->name_);
2278 std::swap(number_, other->number_);
2279 std::swap(label_, other->label_);
2280 std::swap(type_, other->type_);
2281 std::swap(type_name_, other->type_name_);
2282 std::swap(extendee_, other->extendee_);
2283 std::swap(default_value_, other->default_value_);
2284 std::swap(options_, other->options_);
2285 std::swap(_has_bits_[0], other->_has_bits_[0]);
2286 _unknown_fields_.Swap(&other->_unknown_fields_);
2287 std::swap(_cached_size_, other->_cached_size_);
2288 }
2289}
2290
temporal40ee5512008-07-10 02:12:20 +00002291bool FieldDescriptorProto::IsInitialized() const {
2292
kenton@google.com24bf56f2008-09-24 20:31:01 +00002293 if (has_options()) {
2294 if (!this->options().IsInitialized()) return false;
2295 }
temporal40ee5512008-07-10 02:12:20 +00002296 return true;
2297}
2298
2299const ::google::protobuf::Descriptor* FieldDescriptorProto::GetDescriptor() const {
2300 return descriptor();
2301}
2302
temporal779f61c2008-08-13 03:15:00 +00002303const ::google::protobuf::Reflection* FieldDescriptorProto::GetReflection() const {
2304 if (FieldDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
2305 return FieldDescriptorProto_reflection_;
temporal40ee5512008-07-10 02:12:20 +00002306}
2307
2308// ===================================================================
2309
temporal40ee5512008-07-10 02:12:20 +00002310const ::std::string EnumDescriptorProto::_default_name_;
2311
2312
temporal40ee5512008-07-10 02:12:20 +00002313EnumDescriptorProto::EnumDescriptorProto()
kenton@google.coma69deb62008-09-23 20:03:24 +00002314 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002315 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00002316 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00002317 name_(const_cast< ::std::string*>(&_default_name_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002318 value_(),
temporal40ee5512008-07-10 02:12:20 +00002319 options_(NULL) {
2320 ::memset(_has_bits_, 0, sizeof(_has_bits_));
kenton@google.com24bf56f2008-09-24 20:31:01 +00002321}
2322
2323void EnumDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002324}
2325
2326EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00002327 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002328 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00002329 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00002330 name_(const_cast< ::std::string*>(&_default_name_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002331 value_(),
temporal40ee5512008-07-10 02:12:20 +00002332 options_(NULL) {
2333 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2334 MergeFrom(from);
2335}
2336
2337EnumDescriptorProto::~EnumDescriptorProto() {
2338 if (name_ != &_default_name_) {
2339 delete name_;
2340 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00002341 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002342 delete options_;
2343 }
2344}
2345
2346const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00002347 if (EnumDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00002348 return EnumDescriptorProto_descriptor_;
2349}
2350
kenton@google.com24bf56f2008-09-24 20:31:01 +00002351const EnumDescriptorProto& EnumDescriptorProto::default_instance() {
2352 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
2353 return *default_instance_;
2354}
2355
2356EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL;
2357
temporal40ee5512008-07-10 02:12:20 +00002358EnumDescriptorProto* EnumDescriptorProto::New() const {
2359 return new EnumDescriptorProto;
2360}
2361
2362void EnumDescriptorProto::Clear() {
2363 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2364 if (_has_bit(0)) {
2365 if (name_ != &_default_name_) {
2366 name_->clear();
2367 }
2368 }
2369 if (_has_bit(2)) {
2370 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
2371 }
2372 }
2373 value_.Clear();
2374 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2375 mutable_unknown_fields()->Clear();
2376}
2377
2378bool EnumDescriptorProto::MergePartialFromCodedStream(
2379 ::google::protobuf::io::CodedInputStream* input) {
2380#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2381 ::google::protobuf::uint32 tag;
2382 while ((tag = input->ReadTag()) != 0) {
2383 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
2384 // optional string name = 1;
2385 case 1: {
2386 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2387 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2388 goto handle_uninterpreted;
2389 }
2390 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name()));
2391 if (input->ExpectTag(18)) goto parse_value;
2392 break;
2393 }
2394
2395 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
2396 case 2: {
2397 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2398 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2399 goto handle_uninterpreted;
2400 }
2401 parse_value:
2402 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
2403 input, add_value()));
2404 if (input->ExpectTag(18)) goto parse_value;
2405 if (input->ExpectTag(26)) goto parse_options;
2406 break;
2407 }
2408
2409 // optional .google.protobuf.EnumOptions options = 3;
2410 case 3: {
2411 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2412 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2413 goto handle_uninterpreted;
2414 }
2415 parse_options:
2416 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
2417 input, mutable_options()));
2418 if (input->ExpectAtEnd()) return true;
2419 break;
2420 }
2421
2422 default: {
2423 handle_uninterpreted:
2424 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
2425 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
2426 return true;
2427 }
2428 DO_(::google::protobuf::internal::WireFormat::SkipField(
2429 input, tag, mutable_unknown_fields()));
2430 break;
2431 }
2432 }
2433 }
2434 return true;
2435#undef DO_
2436}
2437
2438bool EnumDescriptorProto::SerializeWithCachedSizes(
2439 ::google::protobuf::io::CodedOutputStream* output) const {
2440#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2441 // optional string name = 1;
2442 if (_has_bit(0)) {
2443 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
2444 }
2445
2446 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002447 for (int i = 0; i < this->value_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002448 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->value(i), output));
2449 }
2450
2451 // optional .google.protobuf.EnumOptions options = 3;
2452 if (_has_bit(2)) {
2453 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output));
2454 }
2455
2456 if (!unknown_fields().empty()) {
2457 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2458 unknown_fields(), output));
2459 }
2460 return true;
2461#undef DO_
2462}
2463
2464int EnumDescriptorProto::ByteSize() const {
2465 int total_size = 0;
2466
2467 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2468 // optional string name = 1;
2469 if (has_name()) {
2470 total_size += 1 +
2471 ::google::protobuf::internal::WireFormat::StringSize(this->name());
2472 }
2473
2474 // optional .google.protobuf.EnumOptions options = 3;
2475 if (has_options()) {
2476 total_size += 1 +
2477 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
2478 this->options());
2479 }
2480
2481 }
2482 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002483 total_size += 1 * this->value_size();
2484 for (int i = 0; i < this->value_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002485 total_size +=
2486 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
2487 this->value(i));
2488 }
2489
2490 if (!unknown_fields().empty()) {
2491 total_size +=
2492 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2493 unknown_fields());
2494 }
2495 _cached_size_ = total_size;
2496 return total_size;
2497}
2498
2499void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
2500 GOOGLE_CHECK_NE(&from, this);
2501 const EnumDescriptorProto* source =
2502 ::google::protobuf::internal::dynamic_cast_if_available<const EnumDescriptorProto*>(
2503 &from);
2504 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002505 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002506 } else {
2507 MergeFrom(*source);
2508 }
2509}
2510
2511void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
2512 GOOGLE_CHECK_NE(&from, this);
2513 value_.MergeFrom(from.value_);
2514 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2515 if (from._has_bit(0)) {
2516 set_name(from.name());
2517 }
2518 if (from._has_bit(2)) {
2519 mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options());
2520 }
2521 }
2522 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2523}
2524
2525void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
2526 if (&from == this) return;
2527 Clear();
2528 MergeFrom(from);
2529}
2530
2531void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
2532 if (&from == this) return;
2533 Clear();
2534 MergeFrom(from);
2535}
2536
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002537void EnumDescriptorProto::Swap(EnumDescriptorProto* other) {
2538 if (other != this) {
2539 std::swap(name_, other->name_);
2540 value_.Swap(&other->value_);
2541 std::swap(options_, other->options_);
2542 std::swap(_has_bits_[0], other->_has_bits_[0]);
2543 _unknown_fields_.Swap(&other->_unknown_fields_);
2544 std::swap(_cached_size_, other->_cached_size_);
2545 }
2546}
2547
temporal40ee5512008-07-10 02:12:20 +00002548bool EnumDescriptorProto::IsInitialized() const {
2549
kenton@google.com24bf56f2008-09-24 20:31:01 +00002550 for (int i = 0; i < value_size(); i++) {
2551 if (!this->value(i).IsInitialized()) return false;
2552 }
2553 if (has_options()) {
2554 if (!this->options().IsInitialized()) return false;
2555 }
temporal40ee5512008-07-10 02:12:20 +00002556 return true;
2557}
2558
2559const ::google::protobuf::Descriptor* EnumDescriptorProto::GetDescriptor() const {
2560 return descriptor();
2561}
2562
temporal779f61c2008-08-13 03:15:00 +00002563const ::google::protobuf::Reflection* EnumDescriptorProto::GetReflection() const {
2564 if (EnumDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
2565 return EnumDescriptorProto_reflection_;
temporal40ee5512008-07-10 02:12:20 +00002566}
2567
2568// ===================================================================
2569
temporal40ee5512008-07-10 02:12:20 +00002570const ::std::string EnumValueDescriptorProto::_default_name_;
2571
2572
temporal40ee5512008-07-10 02:12:20 +00002573EnumValueDescriptorProto::EnumValueDescriptorProto()
kenton@google.coma69deb62008-09-23 20:03:24 +00002574 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002575 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00002576 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00002577 name_(const_cast< ::std::string*>(&_default_name_)),
2578 number_(0),
2579 options_(NULL) {
2580 ::memset(_has_bits_, 0, sizeof(_has_bits_));
kenton@google.com24bf56f2008-09-24 20:31:01 +00002581}
2582
2583void EnumValueDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002584}
2585
2586EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00002587 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002588 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00002589 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00002590 name_(const_cast< ::std::string*>(&_default_name_)),
2591 number_(0),
2592 options_(NULL) {
2593 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2594 MergeFrom(from);
2595}
2596
2597EnumValueDescriptorProto::~EnumValueDescriptorProto() {
2598 if (name_ != &_default_name_) {
2599 delete name_;
2600 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00002601 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002602 delete options_;
2603 }
2604}
2605
2606const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00002607 if (EnumValueDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00002608 return EnumValueDescriptorProto_descriptor_;
2609}
2610
kenton@google.com24bf56f2008-09-24 20:31:01 +00002611const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() {
2612 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
2613 return *default_instance_;
2614}
2615
2616EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL;
2617
temporal40ee5512008-07-10 02:12:20 +00002618EnumValueDescriptorProto* EnumValueDescriptorProto::New() const {
2619 return new EnumValueDescriptorProto;
2620}
2621
2622void EnumValueDescriptorProto::Clear() {
2623 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2624 if (_has_bit(0)) {
2625 if (name_ != &_default_name_) {
2626 name_->clear();
2627 }
2628 }
2629 number_ = 0;
2630 if (_has_bit(2)) {
2631 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
2632 }
2633 }
2634 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2635 mutable_unknown_fields()->Clear();
2636}
2637
2638bool EnumValueDescriptorProto::MergePartialFromCodedStream(
2639 ::google::protobuf::io::CodedInputStream* input) {
2640#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2641 ::google::protobuf::uint32 tag;
2642 while ((tag = input->ReadTag()) != 0) {
2643 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
2644 // optional string name = 1;
2645 case 1: {
2646 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2647 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2648 goto handle_uninterpreted;
2649 }
2650 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name()));
2651 if (input->ExpectTag(16)) goto parse_number;
2652 break;
2653 }
2654
2655 // optional int32 number = 2;
2656 case 2: {
2657 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2658 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
2659 goto handle_uninterpreted;
2660 }
2661 parse_number:
2662 DO_(::google::protobuf::internal::WireFormat::ReadInt32(
2663 input, &number_));
2664 _set_bit(1);
2665 if (input->ExpectTag(26)) goto parse_options;
2666 break;
2667 }
2668
2669 // optional .google.protobuf.EnumValueOptions options = 3;
2670 case 3: {
2671 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2672 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2673 goto handle_uninterpreted;
2674 }
2675 parse_options:
2676 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
2677 input, mutable_options()));
2678 if (input->ExpectAtEnd()) return true;
2679 break;
2680 }
2681
2682 default: {
2683 handle_uninterpreted:
2684 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
2685 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
2686 return true;
2687 }
2688 DO_(::google::protobuf::internal::WireFormat::SkipField(
2689 input, tag, mutable_unknown_fields()));
2690 break;
2691 }
2692 }
2693 }
2694 return true;
2695#undef DO_
2696}
2697
2698bool EnumValueDescriptorProto::SerializeWithCachedSizes(
2699 ::google::protobuf::io::CodedOutputStream* output) const {
2700#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2701 // optional string name = 1;
2702 if (_has_bit(0)) {
2703 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
2704 }
2705
2706 // optional int32 number = 2;
2707 if (_has_bit(1)) {
2708 DO_(::google::protobuf::internal::WireFormat::WriteInt32(2, this->number(), output));
2709 }
2710
2711 // optional .google.protobuf.EnumValueOptions options = 3;
2712 if (_has_bit(2)) {
2713 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output));
2714 }
2715
2716 if (!unknown_fields().empty()) {
2717 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2718 unknown_fields(), output));
2719 }
2720 return true;
2721#undef DO_
2722}
2723
2724int EnumValueDescriptorProto::ByteSize() const {
2725 int total_size = 0;
2726
2727 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2728 // optional string name = 1;
2729 if (has_name()) {
2730 total_size += 1 +
2731 ::google::protobuf::internal::WireFormat::StringSize(this->name());
2732 }
2733
2734 // optional int32 number = 2;
2735 if (has_number()) {
2736 total_size += 1 +
2737 ::google::protobuf::internal::WireFormat::Int32Size(
2738 this->number());
2739 }
2740
2741 // optional .google.protobuf.EnumValueOptions options = 3;
2742 if (has_options()) {
2743 total_size += 1 +
2744 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
2745 this->options());
2746 }
2747
2748 }
2749 if (!unknown_fields().empty()) {
2750 total_size +=
2751 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2752 unknown_fields());
2753 }
2754 _cached_size_ = total_size;
2755 return total_size;
2756}
2757
2758void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
2759 GOOGLE_CHECK_NE(&from, this);
2760 const EnumValueDescriptorProto* source =
2761 ::google::protobuf::internal::dynamic_cast_if_available<const EnumValueDescriptorProto*>(
2762 &from);
2763 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002764 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002765 } else {
2766 MergeFrom(*source);
2767 }
2768}
2769
2770void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
2771 GOOGLE_CHECK_NE(&from, this);
2772 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2773 if (from._has_bit(0)) {
2774 set_name(from.name());
2775 }
2776 if (from._has_bit(1)) {
2777 set_number(from.number());
2778 }
2779 if (from._has_bit(2)) {
2780 mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options());
2781 }
2782 }
2783 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2784}
2785
2786void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
2787 if (&from == this) return;
2788 Clear();
2789 MergeFrom(from);
2790}
2791
2792void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
2793 if (&from == this) return;
2794 Clear();
2795 MergeFrom(from);
2796}
2797
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002798void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) {
2799 if (other != this) {
2800 std::swap(name_, other->name_);
2801 std::swap(number_, other->number_);
2802 std::swap(options_, other->options_);
2803 std::swap(_has_bits_[0], other->_has_bits_[0]);
2804 _unknown_fields_.Swap(&other->_unknown_fields_);
2805 std::swap(_cached_size_, other->_cached_size_);
2806 }
2807}
2808
temporal40ee5512008-07-10 02:12:20 +00002809bool EnumValueDescriptorProto::IsInitialized() const {
2810
kenton@google.com24bf56f2008-09-24 20:31:01 +00002811 if (has_options()) {
2812 if (!this->options().IsInitialized()) return false;
2813 }
temporal40ee5512008-07-10 02:12:20 +00002814 return true;
2815}
2816
2817const ::google::protobuf::Descriptor* EnumValueDescriptorProto::GetDescriptor() const {
2818 return descriptor();
2819}
2820
temporal779f61c2008-08-13 03:15:00 +00002821const ::google::protobuf::Reflection* EnumValueDescriptorProto::GetReflection() const {
2822 if (EnumValueDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
2823 return EnumValueDescriptorProto_reflection_;
temporal40ee5512008-07-10 02:12:20 +00002824}
2825
2826// ===================================================================
2827
temporal40ee5512008-07-10 02:12:20 +00002828const ::std::string ServiceDescriptorProto::_default_name_;
2829
2830
temporal40ee5512008-07-10 02:12:20 +00002831ServiceDescriptorProto::ServiceDescriptorProto()
kenton@google.coma69deb62008-09-23 20:03:24 +00002832 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002833 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00002834 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00002835 name_(const_cast< ::std::string*>(&_default_name_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002836 method_(),
temporal40ee5512008-07-10 02:12:20 +00002837 options_(NULL) {
2838 ::memset(_has_bits_, 0, sizeof(_has_bits_));
kenton@google.com24bf56f2008-09-24 20:31:01 +00002839}
2840
2841void ServiceDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002842}
2843
2844ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00002845 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002846 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00002847 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00002848 name_(const_cast< ::std::string*>(&_default_name_)),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00002849 method_(),
temporal40ee5512008-07-10 02:12:20 +00002850 options_(NULL) {
2851 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2852 MergeFrom(from);
2853}
2854
2855ServiceDescriptorProto::~ServiceDescriptorProto() {
2856 if (name_ != &_default_name_) {
2857 delete name_;
2858 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00002859 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002860 delete options_;
2861 }
2862}
2863
2864const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00002865 if (ServiceDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00002866 return ServiceDescriptorProto_descriptor_;
2867}
2868
kenton@google.com24bf56f2008-09-24 20:31:01 +00002869const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() {
2870 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
2871 return *default_instance_;
2872}
2873
2874ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL;
2875
temporal40ee5512008-07-10 02:12:20 +00002876ServiceDescriptorProto* ServiceDescriptorProto::New() const {
2877 return new ServiceDescriptorProto;
2878}
2879
2880void ServiceDescriptorProto::Clear() {
2881 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2882 if (_has_bit(0)) {
2883 if (name_ != &_default_name_) {
2884 name_->clear();
2885 }
2886 }
2887 if (_has_bit(2)) {
2888 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
2889 }
2890 }
2891 method_.Clear();
2892 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2893 mutable_unknown_fields()->Clear();
2894}
2895
2896bool ServiceDescriptorProto::MergePartialFromCodedStream(
2897 ::google::protobuf::io::CodedInputStream* input) {
2898#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2899 ::google::protobuf::uint32 tag;
2900 while ((tag = input->ReadTag()) != 0) {
2901 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
2902 // optional string name = 1;
2903 case 1: {
2904 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2905 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2906 goto handle_uninterpreted;
2907 }
2908 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name()));
2909 if (input->ExpectTag(18)) goto parse_method;
2910 break;
2911 }
2912
2913 // repeated .google.protobuf.MethodDescriptorProto method = 2;
2914 case 2: {
2915 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2916 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2917 goto handle_uninterpreted;
2918 }
2919 parse_method:
2920 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
2921 input, add_method()));
2922 if (input->ExpectTag(18)) goto parse_method;
2923 if (input->ExpectTag(26)) goto parse_options;
2924 break;
2925 }
2926
2927 // optional .google.protobuf.ServiceOptions options = 3;
2928 case 3: {
2929 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
2930 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
2931 goto handle_uninterpreted;
2932 }
2933 parse_options:
2934 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
2935 input, mutable_options()));
2936 if (input->ExpectAtEnd()) return true;
2937 break;
2938 }
2939
2940 default: {
2941 handle_uninterpreted:
2942 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
2943 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
2944 return true;
2945 }
2946 DO_(::google::protobuf::internal::WireFormat::SkipField(
2947 input, tag, mutable_unknown_fields()));
2948 break;
2949 }
2950 }
2951 }
2952 return true;
2953#undef DO_
2954}
2955
2956bool ServiceDescriptorProto::SerializeWithCachedSizes(
2957 ::google::protobuf::io::CodedOutputStream* output) const {
2958#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2959 // optional string name = 1;
2960 if (_has_bit(0)) {
2961 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
2962 }
2963
2964 // repeated .google.protobuf.MethodDescriptorProto method = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00002965 for (int i = 0; i < this->method_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00002966 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->method(i), output));
2967 }
2968
2969 // optional .google.protobuf.ServiceOptions options = 3;
2970 if (_has_bit(2)) {
2971 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(3, this->options(), output));
2972 }
2973
2974 if (!unknown_fields().empty()) {
2975 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2976 unknown_fields(), output));
2977 }
2978 return true;
2979#undef DO_
2980}
2981
2982int ServiceDescriptorProto::ByteSize() const {
2983 int total_size = 0;
2984
2985 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2986 // optional string name = 1;
2987 if (has_name()) {
2988 total_size += 1 +
2989 ::google::protobuf::internal::WireFormat::StringSize(this->name());
2990 }
2991
2992 // optional .google.protobuf.ServiceOptions options = 3;
2993 if (has_options()) {
2994 total_size += 1 +
2995 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
2996 this->options());
2997 }
2998
2999 }
3000 // repeated .google.protobuf.MethodDescriptorProto method = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003001 total_size += 1 * this->method_size();
3002 for (int i = 0; i < this->method_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003003 total_size +=
3004 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
3005 this->method(i));
3006 }
3007
3008 if (!unknown_fields().empty()) {
3009 total_size +=
3010 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3011 unknown_fields());
3012 }
3013 _cached_size_ = total_size;
3014 return total_size;
3015}
3016
3017void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
3018 GOOGLE_CHECK_NE(&from, this);
3019 const ServiceDescriptorProto* source =
3020 ::google::protobuf::internal::dynamic_cast_if_available<const ServiceDescriptorProto*>(
3021 &from);
3022 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003023 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003024 } else {
3025 MergeFrom(*source);
3026 }
3027}
3028
3029void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
3030 GOOGLE_CHECK_NE(&from, this);
3031 method_.MergeFrom(from.method_);
3032 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3033 if (from._has_bit(0)) {
3034 set_name(from.name());
3035 }
3036 if (from._has_bit(2)) {
3037 mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options());
3038 }
3039 }
3040 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3041}
3042
3043void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3044 if (&from == this) return;
3045 Clear();
3046 MergeFrom(from);
3047}
3048
3049void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
3050 if (&from == this) return;
3051 Clear();
3052 MergeFrom(from);
3053}
3054
kenton@google.com26bd9ee2008-11-21 00:06:27 +00003055void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) {
3056 if (other != this) {
3057 std::swap(name_, other->name_);
3058 method_.Swap(&other->method_);
3059 std::swap(options_, other->options_);
3060 std::swap(_has_bits_[0], other->_has_bits_[0]);
3061 _unknown_fields_.Swap(&other->_unknown_fields_);
3062 std::swap(_cached_size_, other->_cached_size_);
3063 }
3064}
3065
temporal40ee5512008-07-10 02:12:20 +00003066bool ServiceDescriptorProto::IsInitialized() const {
3067
kenton@google.com24bf56f2008-09-24 20:31:01 +00003068 for (int i = 0; i < method_size(); i++) {
3069 if (!this->method(i).IsInitialized()) return false;
3070 }
3071 if (has_options()) {
3072 if (!this->options().IsInitialized()) return false;
3073 }
temporal40ee5512008-07-10 02:12:20 +00003074 return true;
3075}
3076
3077const ::google::protobuf::Descriptor* ServiceDescriptorProto::GetDescriptor() const {
3078 return descriptor();
3079}
3080
temporal779f61c2008-08-13 03:15:00 +00003081const ::google::protobuf::Reflection* ServiceDescriptorProto::GetReflection() const {
3082 if (ServiceDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
3083 return ServiceDescriptorProto_reflection_;
temporal40ee5512008-07-10 02:12:20 +00003084}
3085
3086// ===================================================================
3087
temporal40ee5512008-07-10 02:12:20 +00003088const ::std::string MethodDescriptorProto::_default_name_;
3089const ::std::string MethodDescriptorProto::_default_input_type_;
3090const ::std::string MethodDescriptorProto::_default_output_type_;
3091
temporal40ee5512008-07-10 02:12:20 +00003092MethodDescriptorProto::MethodDescriptorProto()
kenton@google.coma69deb62008-09-23 20:03:24 +00003093 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003094 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00003095 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00003096 name_(const_cast< ::std::string*>(&_default_name_)),
3097 input_type_(const_cast< ::std::string*>(&_default_input_type_)),
3098 output_type_(const_cast< ::std::string*>(&_default_output_type_)),
3099 options_(NULL) {
3100 ::memset(_has_bits_, 0, sizeof(_has_bits_));
kenton@google.com24bf56f2008-09-24 20:31:01 +00003101}
3102
3103void MethodDescriptorProto::InitAsDefaultInstance() { options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00003104}
3105
3106MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00003107 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003108 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00003109 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00003110 name_(const_cast< ::std::string*>(&_default_name_)),
3111 input_type_(const_cast< ::std::string*>(&_default_input_type_)),
3112 output_type_(const_cast< ::std::string*>(&_default_output_type_)),
3113 options_(NULL) {
3114 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3115 MergeFrom(from);
3116}
3117
3118MethodDescriptorProto::~MethodDescriptorProto() {
3119 if (name_ != &_default_name_) {
3120 delete name_;
3121 }
3122 if (input_type_ != &_default_input_type_) {
3123 delete input_type_;
3124 }
3125 if (output_type_ != &_default_output_type_) {
3126 delete output_type_;
3127 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003128 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003129 delete options_;
3130 }
3131}
3132
3133const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00003134 if (MethodDescriptorProto_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00003135 return MethodDescriptorProto_descriptor_;
3136}
3137
kenton@google.com24bf56f2008-09-24 20:31:01 +00003138const MethodDescriptorProto& MethodDescriptorProto::default_instance() {
3139 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
3140 return *default_instance_;
3141}
3142
3143MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL;
3144
temporal40ee5512008-07-10 02:12:20 +00003145MethodDescriptorProto* MethodDescriptorProto::New() const {
3146 return new MethodDescriptorProto;
3147}
3148
3149void MethodDescriptorProto::Clear() {
3150 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3151 if (_has_bit(0)) {
3152 if (name_ != &_default_name_) {
3153 name_->clear();
3154 }
3155 }
3156 if (_has_bit(1)) {
3157 if (input_type_ != &_default_input_type_) {
3158 input_type_->clear();
3159 }
3160 }
3161 if (_has_bit(2)) {
3162 if (output_type_ != &_default_output_type_) {
3163 output_type_->clear();
3164 }
3165 }
3166 if (_has_bit(3)) {
3167 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
3168 }
3169 }
3170 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3171 mutable_unknown_fields()->Clear();
3172}
3173
3174bool MethodDescriptorProto::MergePartialFromCodedStream(
3175 ::google::protobuf::io::CodedInputStream* input) {
3176#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3177 ::google::protobuf::uint32 tag;
3178 while ((tag = input->ReadTag()) != 0) {
3179 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
3180 // optional string name = 1;
3181 case 1: {
3182 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3183 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3184 goto handle_uninterpreted;
3185 }
3186 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name()));
3187 if (input->ExpectTag(18)) goto parse_input_type;
3188 break;
3189 }
3190
3191 // optional string input_type = 2;
3192 case 2: {
3193 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3194 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3195 goto handle_uninterpreted;
3196 }
3197 parse_input_type:
3198 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_input_type()));
3199 if (input->ExpectTag(26)) goto parse_output_type;
3200 break;
3201 }
3202
3203 // optional string output_type = 3;
3204 case 3: {
3205 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3206 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3207 goto handle_uninterpreted;
3208 }
3209 parse_output_type:
3210 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_output_type()));
3211 if (input->ExpectTag(34)) goto parse_options;
3212 break;
3213 }
3214
3215 // optional .google.protobuf.MethodOptions options = 4;
3216 case 4: {
3217 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3218 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3219 goto handle_uninterpreted;
3220 }
3221 parse_options:
3222 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
3223 input, mutable_options()));
3224 if (input->ExpectAtEnd()) return true;
3225 break;
3226 }
3227
3228 default: {
3229 handle_uninterpreted:
3230 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
3231 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
3232 return true;
3233 }
3234 DO_(::google::protobuf::internal::WireFormat::SkipField(
3235 input, tag, mutable_unknown_fields()));
3236 break;
3237 }
3238 }
3239 }
3240 return true;
3241#undef DO_
3242}
3243
3244bool MethodDescriptorProto::SerializeWithCachedSizes(
3245 ::google::protobuf::io::CodedOutputStream* output) const {
3246#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3247 // optional string name = 1;
3248 if (_has_bit(0)) {
3249 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name(), output));
3250 }
3251
3252 // optional string input_type = 2;
3253 if (_has_bit(1)) {
3254 DO_(::google::protobuf::internal::WireFormat::WriteString(2, this->input_type(), output));
3255 }
3256
3257 // optional string output_type = 3;
3258 if (_has_bit(2)) {
3259 DO_(::google::protobuf::internal::WireFormat::WriteString(3, this->output_type(), output));
3260 }
3261
3262 // optional .google.protobuf.MethodOptions options = 4;
3263 if (_has_bit(3)) {
3264 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->options(), output));
3265 }
3266
3267 if (!unknown_fields().empty()) {
3268 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3269 unknown_fields(), output));
3270 }
3271 return true;
3272#undef DO_
3273}
3274
3275int MethodDescriptorProto::ByteSize() const {
3276 int total_size = 0;
3277
3278 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3279 // optional string name = 1;
3280 if (has_name()) {
3281 total_size += 1 +
3282 ::google::protobuf::internal::WireFormat::StringSize(this->name());
3283 }
3284
3285 // optional string input_type = 2;
3286 if (has_input_type()) {
3287 total_size += 1 +
3288 ::google::protobuf::internal::WireFormat::StringSize(this->input_type());
3289 }
3290
3291 // optional string output_type = 3;
3292 if (has_output_type()) {
3293 total_size += 1 +
3294 ::google::protobuf::internal::WireFormat::StringSize(this->output_type());
3295 }
3296
3297 // optional .google.protobuf.MethodOptions options = 4;
3298 if (has_options()) {
3299 total_size += 1 +
3300 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
3301 this->options());
3302 }
3303
3304 }
3305 if (!unknown_fields().empty()) {
3306 total_size +=
3307 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3308 unknown_fields());
3309 }
3310 _cached_size_ = total_size;
3311 return total_size;
3312}
3313
3314void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
3315 GOOGLE_CHECK_NE(&from, this);
3316 const MethodDescriptorProto* source =
3317 ::google::protobuf::internal::dynamic_cast_if_available<const MethodDescriptorProto*>(
3318 &from);
3319 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003320 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003321 } else {
3322 MergeFrom(*source);
3323 }
3324}
3325
3326void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
3327 GOOGLE_CHECK_NE(&from, this);
3328 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3329 if (from._has_bit(0)) {
3330 set_name(from.name());
3331 }
3332 if (from._has_bit(1)) {
3333 set_input_type(from.input_type());
3334 }
3335 if (from._has_bit(2)) {
3336 set_output_type(from.output_type());
3337 }
3338 if (from._has_bit(3)) {
3339 mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options());
3340 }
3341 }
3342 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3343}
3344
3345void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3346 if (&from == this) return;
3347 Clear();
3348 MergeFrom(from);
3349}
3350
3351void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
3352 if (&from == this) return;
3353 Clear();
3354 MergeFrom(from);
3355}
3356
kenton@google.com26bd9ee2008-11-21 00:06:27 +00003357void MethodDescriptorProto::Swap(MethodDescriptorProto* other) {
3358 if (other != this) {
3359 std::swap(name_, other->name_);
3360 std::swap(input_type_, other->input_type_);
3361 std::swap(output_type_, other->output_type_);
3362 std::swap(options_, other->options_);
3363 std::swap(_has_bits_[0], other->_has_bits_[0]);
3364 _unknown_fields_.Swap(&other->_unknown_fields_);
3365 std::swap(_cached_size_, other->_cached_size_);
3366 }
3367}
3368
temporal40ee5512008-07-10 02:12:20 +00003369bool MethodDescriptorProto::IsInitialized() const {
3370
kenton@google.com24bf56f2008-09-24 20:31:01 +00003371 if (has_options()) {
3372 if (!this->options().IsInitialized()) return false;
3373 }
temporal40ee5512008-07-10 02:12:20 +00003374 return true;
3375}
3376
3377const ::google::protobuf::Descriptor* MethodDescriptorProto::GetDescriptor() const {
3378 return descriptor();
3379}
3380
temporal779f61c2008-08-13 03:15:00 +00003381const ::google::protobuf::Reflection* MethodDescriptorProto::GetReflection() const {
3382 if (MethodDescriptorProto_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
3383 return MethodDescriptorProto_reflection_;
temporal40ee5512008-07-10 02:12:20 +00003384}
3385
3386// ===================================================================
3387
3388const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
temporal779f61c2008-08-13 03:15:00 +00003389 if (FileOptions_OptimizeMode_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00003390 return FileOptions_OptimizeMode_descriptor_;
3391}
3392bool FileOptions_OptimizeMode_IsValid(int value) {
3393 switch(value) {
3394 case 1:
3395 case 2:
3396 return true;
3397 default:
3398 return false;
3399 }
3400}
3401
3402#ifndef _MSC_VER
3403const FileOptions_OptimizeMode FileOptions::SPEED;
3404const FileOptions_OptimizeMode FileOptions::CODE_SIZE;
3405const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN;
3406const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX;
3407#endif // _MSC_VER
temporal40ee5512008-07-10 02:12:20 +00003408const ::std::string FileOptions::_default_java_package_;
3409const ::std::string FileOptions::_default_java_outer_classname_;
3410
3411
kenton@google.com24bf56f2008-09-24 20:31:01 +00003412
temporal40ee5512008-07-10 02:12:20 +00003413FileOptions::FileOptions()
kenton@google.coma69deb62008-09-23 20:03:24 +00003414 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00003415 _extensions_(&FileOptions_descriptor_,
3416 ::google::protobuf::DescriptorPool::generated_pool(),
3417 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003418 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00003419 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00003420 java_package_(const_cast< ::std::string*>(&_default_java_package_)),
3421 java_outer_classname_(const_cast< ::std::string*>(&_default_java_outer_classname_)),
3422 java_multiple_files_(false),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003423 optimize_for_(2),
3424 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00003425 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00003426}
3427
kenton@google.com24bf56f2008-09-24 20:31:01 +00003428void FileOptions::InitAsDefaultInstance() {}
3429
temporal40ee5512008-07-10 02:12:20 +00003430FileOptions::FileOptions(const FileOptions& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00003431 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00003432 _extensions_(&FileOptions_descriptor_,
3433 ::google::protobuf::DescriptorPool::generated_pool(),
3434 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003435 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00003436 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00003437 java_package_(const_cast< ::std::string*>(&_default_java_package_)),
3438 java_outer_classname_(const_cast< ::std::string*>(&_default_java_outer_classname_)),
3439 java_multiple_files_(false),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003440 optimize_for_(2),
3441 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00003442 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3443 MergeFrom(from);
3444}
3445
3446FileOptions::~FileOptions() {
3447 if (java_package_ != &_default_java_package_) {
3448 delete java_package_;
3449 }
3450 if (java_outer_classname_ != &_default_java_outer_classname_) {
3451 delete java_outer_classname_;
3452 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003453 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003454 }
3455}
3456
3457const ::google::protobuf::Descriptor* FileOptions::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00003458 if (FileOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00003459 return FileOptions_descriptor_;
3460}
3461
kenton@google.com24bf56f2008-09-24 20:31:01 +00003462const FileOptions& FileOptions::default_instance() {
3463 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
3464 return *default_instance_;
3465}
3466
3467FileOptions* FileOptions::default_instance_ = NULL;
3468
temporal40ee5512008-07-10 02:12:20 +00003469FileOptions* FileOptions::New() const {
3470 return new FileOptions;
3471}
3472
3473void FileOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00003474 _extensions_.Clear();
temporal40ee5512008-07-10 02:12:20 +00003475 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3476 if (_has_bit(0)) {
3477 if (java_package_ != &_default_java_package_) {
3478 java_package_->clear();
3479 }
3480 }
3481 if (_has_bit(1)) {
3482 if (java_outer_classname_ != &_default_java_outer_classname_) {
3483 java_outer_classname_->clear();
3484 }
3485 }
3486 java_multiple_files_ = false;
3487 optimize_for_ = 2;
3488 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003489 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00003490 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3491 mutable_unknown_fields()->Clear();
3492}
3493
3494bool FileOptions::MergePartialFromCodedStream(
3495 ::google::protobuf::io::CodedInputStream* input) {
3496#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3497 ::google::protobuf::uint32 tag;
3498 while ((tag = input->ReadTag()) != 0) {
3499 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
3500 // optional string java_package = 1;
3501 case 1: {
3502 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3503 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3504 goto handle_uninterpreted;
3505 }
3506 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_java_package()));
3507 if (input->ExpectTag(66)) goto parse_java_outer_classname;
3508 break;
3509 }
3510
3511 // optional string java_outer_classname = 8;
3512 case 8: {
3513 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3514 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3515 goto handle_uninterpreted;
3516 }
3517 parse_java_outer_classname:
3518 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_java_outer_classname()));
3519 if (input->ExpectTag(72)) goto parse_optimize_for;
3520 break;
3521 }
3522
3523 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
3524 case 9: {
3525 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3526 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
3527 goto handle_uninterpreted;
3528 }
3529 parse_optimize_for:
3530 int value;
3531 DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
3532 if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) {
3533 set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value));
3534 } else {
3535 mutable_unknown_fields()->AddField(9)->add_varint(value);
3536 }
3537 if (input->ExpectTag(80)) goto parse_java_multiple_files;
3538 break;
3539 }
3540
3541 // optional bool java_multiple_files = 10 [default = false];
3542 case 10: {
3543 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3544 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
3545 goto handle_uninterpreted;
3546 }
3547 parse_java_multiple_files:
3548 DO_(::google::protobuf::internal::WireFormat::ReadBool(
3549 input, &java_multiple_files_));
3550 _set_bit(2);
kenton@google.com24bf56f2008-09-24 20:31:01 +00003551 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
3552 break;
3553 }
3554
3555 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
3556 case 999: {
3557 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3558 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3559 goto handle_uninterpreted;
3560 }
3561 parse_uninterpreted_option:
3562 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
3563 input, add_uninterpreted_option()));
3564 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
temporal40ee5512008-07-10 02:12:20 +00003565 if (input->ExpectAtEnd()) return true;
3566 break;
3567 }
3568
3569 default: {
3570 handle_uninterpreted:
3571 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
3572 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
3573 return true;
3574 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003575 if ((8000u <= tag)) {
3576 DO_(_extensions_.ParseField(tag, input, this));
3577 continue;
3578 }
temporal40ee5512008-07-10 02:12:20 +00003579 DO_(::google::protobuf::internal::WireFormat::SkipField(
3580 input, tag, mutable_unknown_fields()));
3581 break;
3582 }
3583 }
3584 }
3585 return true;
3586#undef DO_
3587}
3588
3589bool FileOptions::SerializeWithCachedSizes(
3590 ::google::protobuf::io::CodedOutputStream* output) const {
3591#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3592 // optional string java_package = 1;
3593 if (_has_bit(0)) {
3594 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->java_package(), output));
3595 }
3596
3597 // optional string java_outer_classname = 8;
3598 if (_has_bit(1)) {
3599 DO_(::google::protobuf::internal::WireFormat::WriteString(8, this->java_outer_classname(), output));
3600 }
3601
3602 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
3603 if (_has_bit(3)) {
3604 DO_(::google::protobuf::internal::WireFormat::WriteEnum(9, this->optimize_for(), output));
3605 }
3606
3607 // optional bool java_multiple_files = 10 [default = false];
3608 if (_has_bit(2)) {
3609 DO_(::google::protobuf::internal::WireFormat::WriteBool(10, this->java_multiple_files(), output));
3610 }
3611
kenton@google.com24bf56f2008-09-24 20:31:01 +00003612 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003613 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00003614 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
3615 }
3616
3617 // Extension range [1000, 536870912)
3618 DO_(_extensions_.SerializeWithCachedSizes(
3619 1000, 536870912, *this, output));
3620
temporal40ee5512008-07-10 02:12:20 +00003621 if (!unknown_fields().empty()) {
3622 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3623 unknown_fields(), output));
3624 }
3625 return true;
3626#undef DO_
3627}
3628
3629int FileOptions::ByteSize() const {
3630 int total_size = 0;
3631
3632 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3633 // optional string java_package = 1;
3634 if (has_java_package()) {
3635 total_size += 1 +
3636 ::google::protobuf::internal::WireFormat::StringSize(this->java_package());
3637 }
3638
3639 // optional string java_outer_classname = 8;
3640 if (has_java_outer_classname()) {
3641 total_size += 1 +
3642 ::google::protobuf::internal::WireFormat::StringSize(this->java_outer_classname());
3643 }
3644
3645 // optional bool java_multiple_files = 10 [default = false];
3646 if (has_java_multiple_files()) {
3647 total_size += 1 + 1;
3648 }
3649
3650 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
3651 if (has_optimize_for()) {
3652 total_size += 1 +
3653 ::google::protobuf::internal::WireFormat::EnumSize(this->optimize_for());
3654 }
3655
3656 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003657 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003658 total_size += 2 * this->uninterpreted_option_size();
3659 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00003660 total_size +=
3661 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
3662 this->uninterpreted_option(i));
3663 }
3664
3665 total_size += _extensions_.ByteSize(*this);
3666
temporal40ee5512008-07-10 02:12:20 +00003667 if (!unknown_fields().empty()) {
3668 total_size +=
3669 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3670 unknown_fields());
3671 }
3672 _cached_size_ = total_size;
3673 return total_size;
3674}
3675
3676void FileOptions::MergeFrom(const ::google::protobuf::Message& from) {
3677 GOOGLE_CHECK_NE(&from, this);
3678 const FileOptions* source =
3679 ::google::protobuf::internal::dynamic_cast_if_available<const FileOptions*>(
3680 &from);
3681 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003682 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003683 } else {
3684 MergeFrom(*source);
3685 }
3686}
3687
3688void FileOptions::MergeFrom(const FileOptions& from) {
3689 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00003690 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00003691 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3692 if (from._has_bit(0)) {
3693 set_java_package(from.java_package());
3694 }
3695 if (from._has_bit(1)) {
3696 set_java_outer_classname(from.java_outer_classname());
3697 }
3698 if (from._has_bit(2)) {
3699 set_java_multiple_files(from.java_multiple_files());
3700 }
3701 if (from._has_bit(3)) {
3702 set_optimize_for(from.optimize_for());
3703 }
3704 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003705 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00003706 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3707}
3708
3709void FileOptions::CopyFrom(const ::google::protobuf::Message& from) {
3710 if (&from == this) return;
3711 Clear();
3712 MergeFrom(from);
3713}
3714
3715void FileOptions::CopyFrom(const FileOptions& from) {
3716 if (&from == this) return;
3717 Clear();
3718 MergeFrom(from);
3719}
3720
kenton@google.com26bd9ee2008-11-21 00:06:27 +00003721void FileOptions::Swap(FileOptions* other) {
3722 if (other != this) {
3723 std::swap(java_package_, other->java_package_);
3724 std::swap(java_outer_classname_, other->java_outer_classname_);
3725 std::swap(java_multiple_files_, other->java_multiple_files_);
3726 std::swap(optimize_for_, other->optimize_for_);
3727 uninterpreted_option_.Swap(&other->uninterpreted_option_);
3728 std::swap(_has_bits_[0], other->_has_bits_[0]);
3729 _unknown_fields_.Swap(&other->_unknown_fields_);
3730 std::swap(_cached_size_, other->_cached_size_);
3731 _extensions_.Swap(&other->_extensions_);
3732 }
3733}
3734
temporal40ee5512008-07-10 02:12:20 +00003735bool FileOptions::IsInitialized() const {
3736
kenton@google.com24bf56f2008-09-24 20:31:01 +00003737 for (int i = 0; i < uninterpreted_option_size(); i++) {
3738 if (!this->uninterpreted_option(i).IsInitialized()) return false;
3739 }
3740
3741 if (!_extensions_.IsInitialized()) return false; return true;
temporal40ee5512008-07-10 02:12:20 +00003742}
3743
3744const ::google::protobuf::Descriptor* FileOptions::GetDescriptor() const {
3745 return descriptor();
3746}
3747
temporal779f61c2008-08-13 03:15:00 +00003748const ::google::protobuf::Reflection* FileOptions::GetReflection() const {
3749 if (FileOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
3750 return FileOptions_reflection_;
temporal40ee5512008-07-10 02:12:20 +00003751}
3752
3753// ===================================================================
3754
temporal40ee5512008-07-10 02:12:20 +00003755
3756
temporal40ee5512008-07-10 02:12:20 +00003757MessageOptions::MessageOptions()
kenton@google.coma69deb62008-09-23 20:03:24 +00003758 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00003759 _extensions_(&MessageOptions_descriptor_,
3760 ::google::protobuf::DescriptorPool::generated_pool(),
3761 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003762 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00003763 _cached_size_(0),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003764 message_set_wire_format_(false),
3765 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00003766 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00003767}
3768
kenton@google.com24bf56f2008-09-24 20:31:01 +00003769void MessageOptions::InitAsDefaultInstance() {}
3770
temporal40ee5512008-07-10 02:12:20 +00003771MessageOptions::MessageOptions(const MessageOptions& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00003772 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00003773 _extensions_(&MessageOptions_descriptor_,
3774 ::google::protobuf::DescriptorPool::generated_pool(),
3775 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003776 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00003777 _cached_size_(0),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00003778 message_set_wire_format_(false),
3779 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00003780 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3781 MergeFrom(from);
3782}
3783
3784MessageOptions::~MessageOptions() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00003785 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003786 }
3787}
3788
3789const ::google::protobuf::Descriptor* MessageOptions::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00003790 if (MessageOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00003791 return MessageOptions_descriptor_;
3792}
3793
kenton@google.com24bf56f2008-09-24 20:31:01 +00003794const MessageOptions& MessageOptions::default_instance() {
3795 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
3796 return *default_instance_;
3797}
3798
3799MessageOptions* MessageOptions::default_instance_ = NULL;
3800
temporal40ee5512008-07-10 02:12:20 +00003801MessageOptions* MessageOptions::New() const {
3802 return new MessageOptions;
3803}
3804
3805void MessageOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00003806 _extensions_.Clear();
temporal40ee5512008-07-10 02:12:20 +00003807 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3808 message_set_wire_format_ = false;
3809 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003810 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00003811 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3812 mutable_unknown_fields()->Clear();
3813}
3814
3815bool MessageOptions::MergePartialFromCodedStream(
3816 ::google::protobuf::io::CodedInputStream* input) {
3817#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3818 ::google::protobuf::uint32 tag;
3819 while ((tag = input->ReadTag()) != 0) {
3820 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
3821 // optional bool message_set_wire_format = 1 [default = false];
3822 case 1: {
3823 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3824 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
3825 goto handle_uninterpreted;
3826 }
3827 DO_(::google::protobuf::internal::WireFormat::ReadBool(
3828 input, &message_set_wire_format_));
3829 _set_bit(0);
kenton@google.com24bf56f2008-09-24 20:31:01 +00003830 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
3831 break;
3832 }
3833
3834 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
3835 case 999: {
3836 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
3837 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
3838 goto handle_uninterpreted;
3839 }
3840 parse_uninterpreted_option:
3841 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
3842 input, add_uninterpreted_option()));
3843 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
temporal40ee5512008-07-10 02:12:20 +00003844 if (input->ExpectAtEnd()) return true;
3845 break;
3846 }
3847
3848 default: {
3849 handle_uninterpreted:
3850 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
3851 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
3852 return true;
3853 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003854 if ((8000u <= tag)) {
3855 DO_(_extensions_.ParseField(tag, input, this));
3856 continue;
3857 }
temporal40ee5512008-07-10 02:12:20 +00003858 DO_(::google::protobuf::internal::WireFormat::SkipField(
3859 input, tag, mutable_unknown_fields()));
3860 break;
3861 }
3862 }
3863 }
3864 return true;
3865#undef DO_
3866}
3867
3868bool MessageOptions::SerializeWithCachedSizes(
3869 ::google::protobuf::io::CodedOutputStream* output) const {
3870#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
3871 // optional bool message_set_wire_format = 1 [default = false];
3872 if (_has_bit(0)) {
3873 DO_(::google::protobuf::internal::WireFormat::WriteBool(1, this->message_set_wire_format(), output));
3874 }
3875
kenton@google.com24bf56f2008-09-24 20:31:01 +00003876 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003877 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00003878 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
3879 }
3880
3881 // Extension range [1000, 536870912)
3882 DO_(_extensions_.SerializeWithCachedSizes(
3883 1000, 536870912, *this, output));
3884
temporal40ee5512008-07-10 02:12:20 +00003885 if (!unknown_fields().empty()) {
3886 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3887 unknown_fields(), output));
3888 }
3889 return true;
3890#undef DO_
3891}
3892
3893int MessageOptions::ByteSize() const {
3894 int total_size = 0;
3895
3896 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3897 // optional bool message_set_wire_format = 1 [default = false];
3898 if (has_message_set_wire_format()) {
3899 total_size += 1 + 1;
3900 }
3901
3902 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003903 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003904 total_size += 2 * this->uninterpreted_option_size();
3905 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00003906 total_size +=
3907 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
3908 this->uninterpreted_option(i));
3909 }
3910
3911 total_size += _extensions_.ByteSize(*this);
3912
temporal40ee5512008-07-10 02:12:20 +00003913 if (!unknown_fields().empty()) {
3914 total_size +=
3915 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3916 unknown_fields());
3917 }
3918 _cached_size_ = total_size;
3919 return total_size;
3920}
3921
3922void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) {
3923 GOOGLE_CHECK_NE(&from, this);
3924 const MessageOptions* source =
3925 ::google::protobuf::internal::dynamic_cast_if_available<const MessageOptions*>(
3926 &from);
3927 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003928 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003929 } else {
3930 MergeFrom(*source);
3931 }
3932}
3933
3934void MessageOptions::MergeFrom(const MessageOptions& from) {
3935 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00003936 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00003937 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3938 if (from._has_bit(0)) {
3939 set_message_set_wire_format(from.message_set_wire_format());
3940 }
3941 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00003942 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00003943 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3944}
3945
3946void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) {
3947 if (&from == this) return;
3948 Clear();
3949 MergeFrom(from);
3950}
3951
3952void MessageOptions::CopyFrom(const MessageOptions& from) {
3953 if (&from == this) return;
3954 Clear();
3955 MergeFrom(from);
3956}
3957
kenton@google.com26bd9ee2008-11-21 00:06:27 +00003958void MessageOptions::Swap(MessageOptions* other) {
3959 if (other != this) {
3960 std::swap(message_set_wire_format_, other->message_set_wire_format_);
3961 uninterpreted_option_.Swap(&other->uninterpreted_option_);
3962 std::swap(_has_bits_[0], other->_has_bits_[0]);
3963 _unknown_fields_.Swap(&other->_unknown_fields_);
3964 std::swap(_cached_size_, other->_cached_size_);
3965 _extensions_.Swap(&other->_extensions_);
3966 }
3967}
3968
temporal40ee5512008-07-10 02:12:20 +00003969bool MessageOptions::IsInitialized() const {
3970
kenton@google.com24bf56f2008-09-24 20:31:01 +00003971 for (int i = 0; i < uninterpreted_option_size(); i++) {
3972 if (!this->uninterpreted_option(i).IsInitialized()) return false;
3973 }
3974
3975 if (!_extensions_.IsInitialized()) return false; return true;
temporal40ee5512008-07-10 02:12:20 +00003976}
3977
3978const ::google::protobuf::Descriptor* MessageOptions::GetDescriptor() const {
3979 return descriptor();
3980}
3981
temporal779f61c2008-08-13 03:15:00 +00003982const ::google::protobuf::Reflection* MessageOptions::GetReflection() const {
3983 if (MessageOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
3984 return MessageOptions_reflection_;
temporal40ee5512008-07-10 02:12:20 +00003985}
3986
3987// ===================================================================
3988
3989const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() {
temporal779f61c2008-08-13 03:15:00 +00003990 if (FieldOptions_CType_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00003991 return FieldOptions_CType_descriptor_;
3992}
3993bool FieldOptions_CType_IsValid(int value) {
3994 switch(value) {
3995 case 1:
3996 case 2:
3997 return true;
3998 default:
3999 return false;
4000 }
4001}
4002
4003#ifndef _MSC_VER
4004const FieldOptions_CType FieldOptions::CORD;
4005const FieldOptions_CType FieldOptions::STRING_PIECE;
4006const FieldOptions_CType FieldOptions::CType_MIN;
4007const FieldOptions_CType FieldOptions::CType_MAX;
4008#endif // _MSC_VER
temporal40ee5512008-07-10 02:12:20 +00004009
kenton@google.com2d6daa72009-01-22 01:27:00 +00004010
temporal40ee5512008-07-10 02:12:20 +00004011const ::std::string FieldOptions::_default_experimental_map_key_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00004012
temporal40ee5512008-07-10 02:12:20 +00004013FieldOptions::FieldOptions()
kenton@google.coma69deb62008-09-23 20:03:24 +00004014 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004015 _extensions_(&FieldOptions_descriptor_,
4016 ::google::protobuf::DescriptorPool::generated_pool(),
4017 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004018 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00004019 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00004020 ctype_(1),
kenton@google.com2d6daa72009-01-22 01:27:00 +00004021 packed_(false),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004022 experimental_map_key_(const_cast< ::std::string*>(&_default_experimental_map_key_)),
4023 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004024 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00004025}
4026
kenton@google.com24bf56f2008-09-24 20:31:01 +00004027void FieldOptions::InitAsDefaultInstance() {}
4028
temporal40ee5512008-07-10 02:12:20 +00004029FieldOptions::FieldOptions(const FieldOptions& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00004030 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004031 _extensions_(&FieldOptions_descriptor_,
4032 ::google::protobuf::DescriptorPool::generated_pool(),
4033 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004034 _unknown_fields_(),
kenton@google.coma69deb62008-09-23 20:03:24 +00004035 _cached_size_(0),
temporal40ee5512008-07-10 02:12:20 +00004036 ctype_(1),
kenton@google.com2d6daa72009-01-22 01:27:00 +00004037 packed_(false),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004038 experimental_map_key_(const_cast< ::std::string*>(&_default_experimental_map_key_)),
4039 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004040 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4041 MergeFrom(from);
4042}
4043
4044FieldOptions::~FieldOptions() {
4045 if (experimental_map_key_ != &_default_experimental_map_key_) {
4046 delete experimental_map_key_;
4047 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004048 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004049 }
4050}
4051
4052const ::google::protobuf::Descriptor* FieldOptions::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00004053 if (FieldOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00004054 return FieldOptions_descriptor_;
4055}
4056
kenton@google.com24bf56f2008-09-24 20:31:01 +00004057const FieldOptions& FieldOptions::default_instance() {
4058 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4059 return *default_instance_;
4060}
4061
4062FieldOptions* FieldOptions::default_instance_ = NULL;
4063
temporal40ee5512008-07-10 02:12:20 +00004064FieldOptions* FieldOptions::New() const {
4065 return new FieldOptions;
4066}
4067
4068void FieldOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004069 _extensions_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004070 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
4071 ctype_ = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004072 packed_ = false;
4073 if (_has_bit(2)) {
temporal40ee5512008-07-10 02:12:20 +00004074 if (experimental_map_key_ != &_default_experimental_map_key_) {
4075 experimental_map_key_->clear();
4076 }
4077 }
4078 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004079 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004080 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4081 mutable_unknown_fields()->Clear();
4082}
4083
4084bool FieldOptions::MergePartialFromCodedStream(
4085 ::google::protobuf::io::CodedInputStream* input) {
4086#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4087 ::google::protobuf::uint32 tag;
4088 while ((tag = input->ReadTag()) != 0) {
4089 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
4090 // optional .google.protobuf.FieldOptions.CType ctype = 1;
4091 case 1: {
4092 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4093 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
4094 goto handle_uninterpreted;
4095 }
4096 int value;
4097 DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
4098 if (::google::protobuf::FieldOptions_CType_IsValid(value)) {
4099 set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value));
4100 } else {
4101 mutable_unknown_fields()->AddField(1)->add_varint(value);
4102 }
kenton@google.com2d6daa72009-01-22 01:27:00 +00004103 if (input->ExpectTag(16)) goto parse_packed;
4104 break;
4105 }
4106
4107 // optional bool packed = 2;
4108 case 2: {
4109 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4110 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
4111 goto handle_uninterpreted;
4112 }
4113 parse_packed:
4114 DO_(::google::protobuf::internal::WireFormat::ReadBool(
4115 input, &packed_));
4116 _set_bit(1);
temporal40ee5512008-07-10 02:12:20 +00004117 if (input->ExpectTag(74)) goto parse_experimental_map_key;
4118 break;
4119 }
4120
4121 // optional string experimental_map_key = 9;
4122 case 9: {
4123 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4124 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
4125 goto handle_uninterpreted;
4126 }
4127 parse_experimental_map_key:
4128 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_experimental_map_key()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00004129 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
4130 break;
4131 }
4132
4133 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4134 case 999: {
4135 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4136 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
4137 goto handle_uninterpreted;
4138 }
4139 parse_uninterpreted_option:
4140 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
4141 input, add_uninterpreted_option()));
4142 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
temporal40ee5512008-07-10 02:12:20 +00004143 if (input->ExpectAtEnd()) return true;
4144 break;
4145 }
4146
4147 default: {
4148 handle_uninterpreted:
4149 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
4150 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
4151 return true;
4152 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004153 if ((8000u <= tag)) {
4154 DO_(_extensions_.ParseField(tag, input, this));
4155 continue;
4156 }
temporal40ee5512008-07-10 02:12:20 +00004157 DO_(::google::protobuf::internal::WireFormat::SkipField(
4158 input, tag, mutable_unknown_fields()));
4159 break;
4160 }
4161 }
4162 }
4163 return true;
4164#undef DO_
4165}
4166
4167bool FieldOptions::SerializeWithCachedSizes(
4168 ::google::protobuf::io::CodedOutputStream* output) const {
4169#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4170 // optional .google.protobuf.FieldOptions.CType ctype = 1;
4171 if (_has_bit(0)) {
4172 DO_(::google::protobuf::internal::WireFormat::WriteEnum(1, this->ctype(), output));
4173 }
4174
kenton@google.com2d6daa72009-01-22 01:27:00 +00004175 // optional bool packed = 2;
temporal40ee5512008-07-10 02:12:20 +00004176 if (_has_bit(1)) {
kenton@google.com2d6daa72009-01-22 01:27:00 +00004177 DO_(::google::protobuf::internal::WireFormat::WriteBool(2, this->packed(), output));
4178 }
4179
4180 // optional string experimental_map_key = 9;
4181 if (_has_bit(2)) {
temporal40ee5512008-07-10 02:12:20 +00004182 DO_(::google::protobuf::internal::WireFormat::WriteString(9, this->experimental_map_key(), output));
4183 }
4184
kenton@google.com24bf56f2008-09-24 20:31:01 +00004185 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004186 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004187 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
4188 }
4189
4190 // Extension range [1000, 536870912)
4191 DO_(_extensions_.SerializeWithCachedSizes(
4192 1000, 536870912, *this, output));
4193
temporal40ee5512008-07-10 02:12:20 +00004194 if (!unknown_fields().empty()) {
4195 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4196 unknown_fields(), output));
4197 }
4198 return true;
4199#undef DO_
4200}
4201
4202int FieldOptions::ByteSize() const {
4203 int total_size = 0;
4204
4205 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
4206 // optional .google.protobuf.FieldOptions.CType ctype = 1;
4207 if (has_ctype()) {
4208 total_size += 1 +
4209 ::google::protobuf::internal::WireFormat::EnumSize(this->ctype());
4210 }
4211
kenton@google.com2d6daa72009-01-22 01:27:00 +00004212 // optional bool packed = 2;
4213 if (has_packed()) {
4214 total_size += 1 + 1;
4215 }
4216
temporal40ee5512008-07-10 02:12:20 +00004217 // optional string experimental_map_key = 9;
4218 if (has_experimental_map_key()) {
4219 total_size += 1 +
4220 ::google::protobuf::internal::WireFormat::StringSize(this->experimental_map_key());
4221 }
4222
4223 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004224 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004225 total_size += 2 * this->uninterpreted_option_size();
4226 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004227 total_size +=
4228 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
4229 this->uninterpreted_option(i));
4230 }
4231
4232 total_size += _extensions_.ByteSize(*this);
4233
temporal40ee5512008-07-10 02:12:20 +00004234 if (!unknown_fields().empty()) {
4235 total_size +=
4236 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4237 unknown_fields());
4238 }
4239 _cached_size_ = total_size;
4240 return total_size;
4241}
4242
4243void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) {
4244 GOOGLE_CHECK_NE(&from, this);
4245 const FieldOptions* source =
4246 ::google::protobuf::internal::dynamic_cast_if_available<const FieldOptions*>(
4247 &from);
4248 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00004249 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00004250 } else {
4251 MergeFrom(*source);
4252 }
4253}
4254
4255void FieldOptions::MergeFrom(const FieldOptions& from) {
4256 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004257 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00004258 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
4259 if (from._has_bit(0)) {
4260 set_ctype(from.ctype());
4261 }
4262 if (from._has_bit(1)) {
kenton@google.com2d6daa72009-01-22 01:27:00 +00004263 set_packed(from.packed());
4264 }
4265 if (from._has_bit(2)) {
temporal40ee5512008-07-10 02:12:20 +00004266 set_experimental_map_key(from.experimental_map_key());
4267 }
4268 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00004269 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00004270 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4271}
4272
4273void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) {
4274 if (&from == this) return;
4275 Clear();
4276 MergeFrom(from);
4277}
4278
4279void FieldOptions::CopyFrom(const FieldOptions& from) {
4280 if (&from == this) return;
4281 Clear();
4282 MergeFrom(from);
4283}
4284
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004285void FieldOptions::Swap(FieldOptions* other) {
4286 if (other != this) {
4287 std::swap(ctype_, other->ctype_);
kenton@google.com2d6daa72009-01-22 01:27:00 +00004288 std::swap(packed_, other->packed_);
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004289 std::swap(experimental_map_key_, other->experimental_map_key_);
4290 uninterpreted_option_.Swap(&other->uninterpreted_option_);
4291 std::swap(_has_bits_[0], other->_has_bits_[0]);
4292 _unknown_fields_.Swap(&other->_unknown_fields_);
4293 std::swap(_cached_size_, other->_cached_size_);
4294 _extensions_.Swap(&other->_extensions_);
4295 }
4296}
4297
temporal40ee5512008-07-10 02:12:20 +00004298bool FieldOptions::IsInitialized() const {
4299
kenton@google.com24bf56f2008-09-24 20:31:01 +00004300 for (int i = 0; i < uninterpreted_option_size(); i++) {
4301 if (!this->uninterpreted_option(i).IsInitialized()) return false;
4302 }
4303
4304 if (!_extensions_.IsInitialized()) return false; return true;
temporal40ee5512008-07-10 02:12:20 +00004305}
4306
4307const ::google::protobuf::Descriptor* FieldOptions::GetDescriptor() const {
4308 return descriptor();
4309}
4310
temporal779f61c2008-08-13 03:15:00 +00004311const ::google::protobuf::Reflection* FieldOptions::GetReflection() const {
4312 if (FieldOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4313 return FieldOptions_reflection_;
temporal40ee5512008-07-10 02:12:20 +00004314}
4315
4316// ===================================================================
4317
temporal40ee5512008-07-10 02:12:20 +00004318
temporal40ee5512008-07-10 02:12:20 +00004319EnumOptions::EnumOptions()
kenton@google.coma69deb62008-09-23 20:03:24 +00004320 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004321 _extensions_(&EnumOptions_descriptor_,
4322 ::google::protobuf::DescriptorPool::generated_pool(),
4323 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004324 _unknown_fields_(),
4325 _cached_size_(0),
4326 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004327 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00004328}
4329
kenton@google.com24bf56f2008-09-24 20:31:01 +00004330void EnumOptions::InitAsDefaultInstance() {}
4331
temporal40ee5512008-07-10 02:12:20 +00004332EnumOptions::EnumOptions(const EnumOptions& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00004333 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004334 _extensions_(&EnumOptions_descriptor_,
4335 ::google::protobuf::DescriptorPool::generated_pool(),
4336 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004337 _unknown_fields_(),
4338 _cached_size_(0),
4339 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004340 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4341 MergeFrom(from);
4342}
4343
4344EnumOptions::~EnumOptions() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004345 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004346 }
4347}
4348
4349const ::google::protobuf::Descriptor* EnumOptions::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00004350 if (EnumOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00004351 return EnumOptions_descriptor_;
4352}
4353
kenton@google.com24bf56f2008-09-24 20:31:01 +00004354const EnumOptions& EnumOptions::default_instance() {
4355 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4356 return *default_instance_;
4357}
4358
4359EnumOptions* EnumOptions::default_instance_ = NULL;
4360
temporal40ee5512008-07-10 02:12:20 +00004361EnumOptions* EnumOptions::New() const {
4362 return new EnumOptions;
4363}
4364
4365void EnumOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004366 _extensions_.Clear();
4367 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004368 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4369 mutable_unknown_fields()->Clear();
4370}
4371
4372bool EnumOptions::MergePartialFromCodedStream(
4373 ::google::protobuf::io::CodedInputStream* input) {
4374#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4375 ::google::protobuf::uint32 tag;
4376 while ((tag = input->ReadTag()) != 0) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004377 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
4378 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4379 case 999: {
4380 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4381 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
4382 goto handle_uninterpreted;
4383 }
4384 parse_uninterpreted_option:
4385 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
4386 input, add_uninterpreted_option()));
4387 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
4388 if (input->ExpectAtEnd()) return true;
4389 break;
4390 }
4391
4392 default: {
4393 handle_uninterpreted:
4394 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
4395 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
4396 return true;
4397 }
4398 if ((8000u <= tag)) {
4399 DO_(_extensions_.ParseField(tag, input, this));
4400 continue;
4401 }
4402 DO_(::google::protobuf::internal::WireFormat::SkipField(
4403 input, tag, mutable_unknown_fields()));
4404 break;
4405 }
temporal40ee5512008-07-10 02:12:20 +00004406 }
temporal40ee5512008-07-10 02:12:20 +00004407 }
4408 return true;
4409#undef DO_
4410}
4411
4412bool EnumOptions::SerializeWithCachedSizes(
4413 ::google::protobuf::io::CodedOutputStream* output) const {
4414#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
kenton@google.com24bf56f2008-09-24 20:31:01 +00004415 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004416 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004417 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
4418 }
4419
4420 // Extension range [1000, 536870912)
4421 DO_(_extensions_.SerializeWithCachedSizes(
4422 1000, 536870912, *this, output));
4423
temporal40ee5512008-07-10 02:12:20 +00004424 if (!unknown_fields().empty()) {
4425 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4426 unknown_fields(), output));
4427 }
4428 return true;
4429#undef DO_
4430}
4431
4432int EnumOptions::ByteSize() const {
4433 int total_size = 0;
4434
kenton@google.com24bf56f2008-09-24 20:31:01 +00004435 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004436 total_size += 2 * this->uninterpreted_option_size();
4437 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004438 total_size +=
4439 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
4440 this->uninterpreted_option(i));
4441 }
4442
4443 total_size += _extensions_.ByteSize(*this);
4444
temporal40ee5512008-07-10 02:12:20 +00004445 if (!unknown_fields().empty()) {
4446 total_size +=
4447 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4448 unknown_fields());
4449 }
4450 _cached_size_ = total_size;
4451 return total_size;
4452}
4453
4454void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) {
4455 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004456 const EnumOptions* source =
4457 ::google::protobuf::internal::dynamic_cast_if_available<const EnumOptions*>(
4458 &from);
4459 if (source == NULL) {
4460 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
4461 } else {
4462 MergeFrom(*source);
4463 }
temporal40ee5512008-07-10 02:12:20 +00004464}
4465
4466void EnumOptions::MergeFrom(const EnumOptions& from) {
4467 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004468 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
4469 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00004470 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4471}
4472
4473void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) {
4474 if (&from == this) return;
4475 Clear();
4476 MergeFrom(from);
4477}
4478
4479void EnumOptions::CopyFrom(const EnumOptions& from) {
4480 if (&from == this) return;
4481 Clear();
4482 MergeFrom(from);
4483}
4484
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004485void EnumOptions::Swap(EnumOptions* other) {
4486 if (other != this) {
4487 uninterpreted_option_.Swap(&other->uninterpreted_option_);
4488 std::swap(_has_bits_[0], other->_has_bits_[0]);
4489 _unknown_fields_.Swap(&other->_unknown_fields_);
4490 std::swap(_cached_size_, other->_cached_size_);
4491 _extensions_.Swap(&other->_extensions_);
4492 }
4493}
4494
temporal40ee5512008-07-10 02:12:20 +00004495bool EnumOptions::IsInitialized() const {
4496
kenton@google.com24bf56f2008-09-24 20:31:01 +00004497 for (int i = 0; i < uninterpreted_option_size(); i++) {
4498 if (!this->uninterpreted_option(i).IsInitialized()) return false;
4499 }
4500
4501 if (!_extensions_.IsInitialized()) return false; return true;
temporal40ee5512008-07-10 02:12:20 +00004502}
4503
4504const ::google::protobuf::Descriptor* EnumOptions::GetDescriptor() const {
4505 return descriptor();
4506}
4507
temporal779f61c2008-08-13 03:15:00 +00004508const ::google::protobuf::Reflection* EnumOptions::GetReflection() const {
4509 if (EnumOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4510 return EnumOptions_reflection_;
temporal40ee5512008-07-10 02:12:20 +00004511}
4512
4513// ===================================================================
4514
temporal40ee5512008-07-10 02:12:20 +00004515
temporal40ee5512008-07-10 02:12:20 +00004516EnumValueOptions::EnumValueOptions()
kenton@google.coma69deb62008-09-23 20:03:24 +00004517 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004518 _extensions_(&EnumValueOptions_descriptor_,
4519 ::google::protobuf::DescriptorPool::generated_pool(),
4520 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004521 _unknown_fields_(),
4522 _cached_size_(0),
4523 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004524 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00004525}
4526
kenton@google.com24bf56f2008-09-24 20:31:01 +00004527void EnumValueOptions::InitAsDefaultInstance() {}
4528
temporal40ee5512008-07-10 02:12:20 +00004529EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00004530 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004531 _extensions_(&EnumValueOptions_descriptor_,
4532 ::google::protobuf::DescriptorPool::generated_pool(),
4533 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004534 _unknown_fields_(),
4535 _cached_size_(0),
4536 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004537 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4538 MergeFrom(from);
4539}
4540
4541EnumValueOptions::~EnumValueOptions() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004542 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004543 }
4544}
4545
4546const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00004547 if (EnumValueOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00004548 return EnumValueOptions_descriptor_;
4549}
4550
kenton@google.com24bf56f2008-09-24 20:31:01 +00004551const EnumValueOptions& EnumValueOptions::default_instance() {
4552 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4553 return *default_instance_;
4554}
4555
4556EnumValueOptions* EnumValueOptions::default_instance_ = NULL;
4557
temporal40ee5512008-07-10 02:12:20 +00004558EnumValueOptions* EnumValueOptions::New() const {
4559 return new EnumValueOptions;
4560}
4561
4562void EnumValueOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004563 _extensions_.Clear();
4564 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004565 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4566 mutable_unknown_fields()->Clear();
4567}
4568
4569bool EnumValueOptions::MergePartialFromCodedStream(
4570 ::google::protobuf::io::CodedInputStream* input) {
4571#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4572 ::google::protobuf::uint32 tag;
4573 while ((tag = input->ReadTag()) != 0) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004574 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
4575 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4576 case 999: {
4577 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4578 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
4579 goto handle_uninterpreted;
4580 }
4581 parse_uninterpreted_option:
4582 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
4583 input, add_uninterpreted_option()));
4584 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
4585 if (input->ExpectAtEnd()) return true;
4586 break;
4587 }
4588
4589 default: {
4590 handle_uninterpreted:
4591 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
4592 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
4593 return true;
4594 }
4595 if ((8000u <= tag)) {
4596 DO_(_extensions_.ParseField(tag, input, this));
4597 continue;
4598 }
4599 DO_(::google::protobuf::internal::WireFormat::SkipField(
4600 input, tag, mutable_unknown_fields()));
4601 break;
4602 }
temporal40ee5512008-07-10 02:12:20 +00004603 }
temporal40ee5512008-07-10 02:12:20 +00004604 }
4605 return true;
4606#undef DO_
4607}
4608
4609bool EnumValueOptions::SerializeWithCachedSizes(
4610 ::google::protobuf::io::CodedOutputStream* output) const {
4611#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
kenton@google.com24bf56f2008-09-24 20:31:01 +00004612 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004613 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004614 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
4615 }
4616
4617 // Extension range [1000, 536870912)
4618 DO_(_extensions_.SerializeWithCachedSizes(
4619 1000, 536870912, *this, output));
4620
temporal40ee5512008-07-10 02:12:20 +00004621 if (!unknown_fields().empty()) {
4622 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4623 unknown_fields(), output));
4624 }
4625 return true;
4626#undef DO_
4627}
4628
4629int EnumValueOptions::ByteSize() const {
4630 int total_size = 0;
4631
kenton@google.com24bf56f2008-09-24 20:31:01 +00004632 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004633 total_size += 2 * this->uninterpreted_option_size();
4634 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004635 total_size +=
4636 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
4637 this->uninterpreted_option(i));
4638 }
4639
4640 total_size += _extensions_.ByteSize(*this);
4641
temporal40ee5512008-07-10 02:12:20 +00004642 if (!unknown_fields().empty()) {
4643 total_size +=
4644 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4645 unknown_fields());
4646 }
4647 _cached_size_ = total_size;
4648 return total_size;
4649}
4650
4651void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) {
4652 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004653 const EnumValueOptions* source =
4654 ::google::protobuf::internal::dynamic_cast_if_available<const EnumValueOptions*>(
4655 &from);
4656 if (source == NULL) {
4657 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
4658 } else {
4659 MergeFrom(*source);
4660 }
temporal40ee5512008-07-10 02:12:20 +00004661}
4662
4663void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
4664 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004665 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
4666 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00004667 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4668}
4669
4670void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) {
4671 if (&from == this) return;
4672 Clear();
4673 MergeFrom(from);
4674}
4675
4676void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
4677 if (&from == this) return;
4678 Clear();
4679 MergeFrom(from);
4680}
4681
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004682void EnumValueOptions::Swap(EnumValueOptions* other) {
4683 if (other != this) {
4684 uninterpreted_option_.Swap(&other->uninterpreted_option_);
4685 std::swap(_has_bits_[0], other->_has_bits_[0]);
4686 _unknown_fields_.Swap(&other->_unknown_fields_);
4687 std::swap(_cached_size_, other->_cached_size_);
4688 _extensions_.Swap(&other->_extensions_);
4689 }
4690}
4691
temporal40ee5512008-07-10 02:12:20 +00004692bool EnumValueOptions::IsInitialized() const {
4693
kenton@google.com24bf56f2008-09-24 20:31:01 +00004694 for (int i = 0; i < uninterpreted_option_size(); i++) {
4695 if (!this->uninterpreted_option(i).IsInitialized()) return false;
4696 }
4697
4698 if (!_extensions_.IsInitialized()) return false; return true;
temporal40ee5512008-07-10 02:12:20 +00004699}
4700
4701const ::google::protobuf::Descriptor* EnumValueOptions::GetDescriptor() const {
4702 return descriptor();
4703}
4704
temporal779f61c2008-08-13 03:15:00 +00004705const ::google::protobuf::Reflection* EnumValueOptions::GetReflection() const {
4706 if (EnumValueOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4707 return EnumValueOptions_reflection_;
temporal40ee5512008-07-10 02:12:20 +00004708}
4709
4710// ===================================================================
4711
temporal40ee5512008-07-10 02:12:20 +00004712
temporal40ee5512008-07-10 02:12:20 +00004713ServiceOptions::ServiceOptions()
kenton@google.coma69deb62008-09-23 20:03:24 +00004714 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004715 _extensions_(&ServiceOptions_descriptor_,
4716 ::google::protobuf::DescriptorPool::generated_pool(),
4717 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004718 _unknown_fields_(),
4719 _cached_size_(0),
4720 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004721 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00004722}
4723
kenton@google.com24bf56f2008-09-24 20:31:01 +00004724void ServiceOptions::InitAsDefaultInstance() {}
4725
temporal40ee5512008-07-10 02:12:20 +00004726ServiceOptions::ServiceOptions(const ServiceOptions& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00004727 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004728 _extensions_(&ServiceOptions_descriptor_,
4729 ::google::protobuf::DescriptorPool::generated_pool(),
4730 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004731 _unknown_fields_(),
4732 _cached_size_(0),
4733 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004734 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4735 MergeFrom(from);
4736}
4737
4738ServiceOptions::~ServiceOptions() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004739 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004740 }
4741}
4742
4743const ::google::protobuf::Descriptor* ServiceOptions::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00004744 if (ServiceOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00004745 return ServiceOptions_descriptor_;
4746}
4747
kenton@google.com24bf56f2008-09-24 20:31:01 +00004748const ServiceOptions& ServiceOptions::default_instance() {
4749 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4750 return *default_instance_;
4751}
4752
4753ServiceOptions* ServiceOptions::default_instance_ = NULL;
4754
temporal40ee5512008-07-10 02:12:20 +00004755ServiceOptions* ServiceOptions::New() const {
4756 return new ServiceOptions;
4757}
4758
4759void ServiceOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004760 _extensions_.Clear();
4761 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004762 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4763 mutable_unknown_fields()->Clear();
4764}
4765
4766bool ServiceOptions::MergePartialFromCodedStream(
4767 ::google::protobuf::io::CodedInputStream* input) {
4768#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4769 ::google::protobuf::uint32 tag;
4770 while ((tag = input->ReadTag()) != 0) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004771 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
4772 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4773 case 999: {
4774 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4775 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
4776 goto handle_uninterpreted;
4777 }
4778 parse_uninterpreted_option:
4779 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
4780 input, add_uninterpreted_option()));
4781 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
4782 if (input->ExpectAtEnd()) return true;
4783 break;
4784 }
4785
4786 default: {
4787 handle_uninterpreted:
4788 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
4789 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
4790 return true;
4791 }
4792 if ((8000u <= tag)) {
4793 DO_(_extensions_.ParseField(tag, input, this));
4794 continue;
4795 }
4796 DO_(::google::protobuf::internal::WireFormat::SkipField(
4797 input, tag, mutable_unknown_fields()));
4798 break;
4799 }
temporal40ee5512008-07-10 02:12:20 +00004800 }
temporal40ee5512008-07-10 02:12:20 +00004801 }
4802 return true;
4803#undef DO_
4804}
4805
4806bool ServiceOptions::SerializeWithCachedSizes(
4807 ::google::protobuf::io::CodedOutputStream* output) const {
4808#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
kenton@google.com24bf56f2008-09-24 20:31:01 +00004809 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004810 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004811 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
4812 }
4813
4814 // Extension range [1000, 536870912)
4815 DO_(_extensions_.SerializeWithCachedSizes(
4816 1000, 536870912, *this, output));
4817
temporal40ee5512008-07-10 02:12:20 +00004818 if (!unknown_fields().empty()) {
4819 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4820 unknown_fields(), output));
4821 }
4822 return true;
4823#undef DO_
4824}
4825
4826int ServiceOptions::ByteSize() const {
4827 int total_size = 0;
4828
kenton@google.com24bf56f2008-09-24 20:31:01 +00004829 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00004830 total_size += 2 * this->uninterpreted_option_size();
4831 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004832 total_size +=
4833 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
4834 this->uninterpreted_option(i));
4835 }
4836
4837 total_size += _extensions_.ByteSize(*this);
4838
temporal40ee5512008-07-10 02:12:20 +00004839 if (!unknown_fields().empty()) {
4840 total_size +=
4841 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4842 unknown_fields());
4843 }
4844 _cached_size_ = total_size;
4845 return total_size;
4846}
4847
4848void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) {
4849 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004850 const ServiceOptions* source =
4851 ::google::protobuf::internal::dynamic_cast_if_available<const ServiceOptions*>(
4852 &from);
4853 if (source == NULL) {
4854 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
4855 } else {
4856 MergeFrom(*source);
4857 }
temporal40ee5512008-07-10 02:12:20 +00004858}
4859
4860void ServiceOptions::MergeFrom(const ServiceOptions& from) {
4861 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00004862 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
4863 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00004864 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4865}
4866
4867void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) {
4868 if (&from == this) return;
4869 Clear();
4870 MergeFrom(from);
4871}
4872
4873void ServiceOptions::CopyFrom(const ServiceOptions& from) {
4874 if (&from == this) return;
4875 Clear();
4876 MergeFrom(from);
4877}
4878
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004879void ServiceOptions::Swap(ServiceOptions* other) {
4880 if (other != this) {
4881 uninterpreted_option_.Swap(&other->uninterpreted_option_);
4882 std::swap(_has_bits_[0], other->_has_bits_[0]);
4883 _unknown_fields_.Swap(&other->_unknown_fields_);
4884 std::swap(_cached_size_, other->_cached_size_);
4885 _extensions_.Swap(&other->_extensions_);
4886 }
4887}
4888
temporal40ee5512008-07-10 02:12:20 +00004889bool ServiceOptions::IsInitialized() const {
4890
kenton@google.com24bf56f2008-09-24 20:31:01 +00004891 for (int i = 0; i < uninterpreted_option_size(); i++) {
4892 if (!this->uninterpreted_option(i).IsInitialized()) return false;
4893 }
4894
4895 if (!_extensions_.IsInitialized()) return false; return true;
temporal40ee5512008-07-10 02:12:20 +00004896}
4897
4898const ::google::protobuf::Descriptor* ServiceOptions::GetDescriptor() const {
4899 return descriptor();
4900}
4901
temporal779f61c2008-08-13 03:15:00 +00004902const ::google::protobuf::Reflection* ServiceOptions::GetReflection() const {
4903 if (ServiceOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4904 return ServiceOptions_reflection_;
temporal40ee5512008-07-10 02:12:20 +00004905}
4906
4907// ===================================================================
4908
temporal40ee5512008-07-10 02:12:20 +00004909
temporal40ee5512008-07-10 02:12:20 +00004910MethodOptions::MethodOptions()
kenton@google.coma69deb62008-09-23 20:03:24 +00004911 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004912 _extensions_(&MethodOptions_descriptor_,
4913 ::google::protobuf::DescriptorPool::generated_pool(),
4914 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004915 _unknown_fields_(),
4916 _cached_size_(0),
4917 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004918 ::memset(_has_bits_, 0, sizeof(_has_bits_));
temporal40ee5512008-07-10 02:12:20 +00004919}
4920
kenton@google.com24bf56f2008-09-24 20:31:01 +00004921void MethodOptions::InitAsDefaultInstance() {}
4922
temporal40ee5512008-07-10 02:12:20 +00004923MethodOptions::MethodOptions(const MethodOptions& from)
kenton@google.coma69deb62008-09-23 20:03:24 +00004924 : ::google::protobuf::Message(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00004925 _extensions_(&MethodOptions_descriptor_,
4926 ::google::protobuf::DescriptorPool::generated_pool(),
4927 ::google::protobuf::MessageFactory::generated_factory()),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00004928 _unknown_fields_(),
4929 _cached_size_(0),
4930 uninterpreted_option_() {
temporal40ee5512008-07-10 02:12:20 +00004931 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4932 MergeFrom(from);
4933}
4934
4935MethodOptions::~MethodOptions() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004936 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004937 }
4938}
4939
4940const ::google::protobuf::Descriptor* MethodOptions::descriptor() {
temporal779f61c2008-08-13 03:15:00 +00004941 if (MethodOptions_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +00004942 return MethodOptions_descriptor_;
4943}
4944
kenton@google.com24bf56f2008-09-24 20:31:01 +00004945const MethodOptions& MethodOptions::default_instance() {
4946 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
4947 return *default_instance_;
4948}
4949
4950MethodOptions* MethodOptions::default_instance_ = NULL;
4951
temporal40ee5512008-07-10 02:12:20 +00004952MethodOptions* MethodOptions::New() const {
4953 return new MethodOptions;
4954}
4955
4956void MethodOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004957 _extensions_.Clear();
4958 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00004959 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4960 mutable_unknown_fields()->Clear();
4961}
4962
4963bool MethodOptions::MergePartialFromCodedStream(
4964 ::google::protobuf::io::CodedInputStream* input) {
4965#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
4966 ::google::protobuf::uint32 tag;
4967 while ((tag = input->ReadTag()) != 0) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00004968 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
4969 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4970 case 999: {
4971 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
4972 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
4973 goto handle_uninterpreted;
4974 }
4975 parse_uninterpreted_option:
4976 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
4977 input, add_uninterpreted_option()));
4978 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
4979 if (input->ExpectAtEnd()) return true;
4980 break;
4981 }
4982
4983 default: {
4984 handle_uninterpreted:
4985 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
4986 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
4987 return true;
4988 }
4989 if ((8000u <= tag)) {
4990 DO_(_extensions_.ParseField(tag, input, this));
4991 continue;
4992 }
4993 DO_(::google::protobuf::internal::WireFormat::SkipField(
4994 input, tag, mutable_unknown_fields()));
4995 break;
4996 }
temporal40ee5512008-07-10 02:12:20 +00004997 }
temporal40ee5512008-07-10 02:12:20 +00004998 }
4999 return true;
5000#undef DO_
5001}
5002
5003bool MethodOptions::SerializeWithCachedSizes(
5004 ::google::protobuf::io::CodedOutputStream* output) const {
5005#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
kenton@google.com24bf56f2008-09-24 20:31:01 +00005006 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005007 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005008 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(999, this->uninterpreted_option(i), output));
5009 }
5010
5011 // Extension range [1000, 536870912)
5012 DO_(_extensions_.SerializeWithCachedSizes(
5013 1000, 536870912, *this, output));
5014
temporal40ee5512008-07-10 02:12:20 +00005015 if (!unknown_fields().empty()) {
5016 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5017 unknown_fields(), output));
5018 }
5019 return true;
5020#undef DO_
5021}
5022
5023int MethodOptions::ByteSize() const {
5024 int total_size = 0;
5025
kenton@google.com24bf56f2008-09-24 20:31:01 +00005026 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005027 total_size += 2 * this->uninterpreted_option_size();
5028 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005029 total_size +=
5030 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
5031 this->uninterpreted_option(i));
5032 }
5033
5034 total_size += _extensions_.ByteSize(*this);
5035
temporal40ee5512008-07-10 02:12:20 +00005036 if (!unknown_fields().empty()) {
5037 total_size +=
5038 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5039 unknown_fields());
5040 }
5041 _cached_size_ = total_size;
5042 return total_size;
5043}
5044
5045void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) {
5046 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005047 const MethodOptions* source =
5048 ::google::protobuf::internal::dynamic_cast_if_available<const MethodOptions*>(
5049 &from);
5050 if (source == NULL) {
5051 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5052 } else {
5053 MergeFrom(*source);
5054 }
temporal40ee5512008-07-10 02:12:20 +00005055}
5056
5057void MethodOptions::MergeFrom(const MethodOptions& from) {
5058 GOOGLE_CHECK_NE(&from, this);
kenton@google.com24bf56f2008-09-24 20:31:01 +00005059 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
5060 _extensions_.MergeFrom(from._extensions_);
temporal40ee5512008-07-10 02:12:20 +00005061 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5062}
5063
5064void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) {
5065 if (&from == this) return;
5066 Clear();
5067 MergeFrom(from);
5068}
5069
5070void MethodOptions::CopyFrom(const MethodOptions& from) {
5071 if (&from == this) return;
5072 Clear();
5073 MergeFrom(from);
5074}
5075
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005076void MethodOptions::Swap(MethodOptions* other) {
5077 if (other != this) {
5078 uninterpreted_option_.Swap(&other->uninterpreted_option_);
5079 std::swap(_has_bits_[0], other->_has_bits_[0]);
5080 _unknown_fields_.Swap(&other->_unknown_fields_);
5081 std::swap(_cached_size_, other->_cached_size_);
5082 _extensions_.Swap(&other->_extensions_);
5083 }
5084}
5085
temporal40ee5512008-07-10 02:12:20 +00005086bool MethodOptions::IsInitialized() const {
5087
kenton@google.com24bf56f2008-09-24 20:31:01 +00005088 for (int i = 0; i < uninterpreted_option_size(); i++) {
5089 if (!this->uninterpreted_option(i).IsInitialized()) return false;
5090 }
5091
5092 if (!_extensions_.IsInitialized()) return false; return true;
temporal40ee5512008-07-10 02:12:20 +00005093}
5094
5095const ::google::protobuf::Descriptor* MethodOptions::GetDescriptor() const {
5096 return descriptor();
5097}
5098
temporal779f61c2008-08-13 03:15:00 +00005099const ::google::protobuf::Reflection* MethodOptions::GetReflection() const {
5100 if (MethodOptions_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
5101 return MethodOptions_reflection_;
temporal40ee5512008-07-10 02:12:20 +00005102}
5103
kenton@google.com24bf56f2008-09-24 20:31:01 +00005104// ===================================================================
5105
5106const ::std::string UninterpretedOption_NamePart::_default_name_part_;
5107
kenton@google.com24bf56f2008-09-24 20:31:01 +00005108UninterpretedOption_NamePart::UninterpretedOption_NamePart()
5109 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00005110 _unknown_fields_(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00005111 _cached_size_(0),
5112 name_part_(const_cast< ::std::string*>(&_default_name_part_)),
5113 is_extension_(false) {
5114 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5115}
5116
5117void UninterpretedOption_NamePart::InitAsDefaultInstance() {}
5118
5119UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
5120 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00005121 _unknown_fields_(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00005122 _cached_size_(0),
5123 name_part_(const_cast< ::std::string*>(&_default_name_part_)),
5124 is_extension_(false) {
5125 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5126 MergeFrom(from);
5127}
5128
5129UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
5130 if (name_part_ != &_default_name_part_) {
5131 delete name_part_;
5132 }
5133 if (this != default_instance_) {
5134 }
5135}
5136
5137const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() {
5138 if (UninterpretedOption_NamePart_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
5139 return UninterpretedOption_NamePart_descriptor_;
5140}
5141
5142const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() {
5143 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
5144 return *default_instance_;
5145}
5146
5147UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL;
5148
5149UninterpretedOption_NamePart* UninterpretedOption_NamePart::New() const {
5150 return new UninterpretedOption_NamePart;
5151}
5152
5153void UninterpretedOption_NamePart::Clear() {
5154 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
5155 if (_has_bit(0)) {
5156 if (name_part_ != &_default_name_part_) {
5157 name_part_->clear();
5158 }
5159 }
5160 is_extension_ = false;
5161 }
5162 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5163 mutable_unknown_fields()->Clear();
5164}
5165
5166bool UninterpretedOption_NamePart::MergePartialFromCodedStream(
5167 ::google::protobuf::io::CodedInputStream* input) {
5168#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
5169 ::google::protobuf::uint32 tag;
5170 while ((tag = input->ReadTag()) != 0) {
5171 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
5172 // required string name_part = 1;
5173 case 1: {
5174 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5175 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
5176 goto handle_uninterpreted;
5177 }
5178 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_name_part()));
5179 if (input->ExpectTag(16)) goto parse_is_extension;
5180 break;
5181 }
5182
5183 // required bool is_extension = 2;
5184 case 2: {
5185 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5186 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
5187 goto handle_uninterpreted;
5188 }
5189 parse_is_extension:
5190 DO_(::google::protobuf::internal::WireFormat::ReadBool(
5191 input, &is_extension_));
5192 _set_bit(1);
5193 if (input->ExpectAtEnd()) return true;
5194 break;
5195 }
5196
5197 default: {
5198 handle_uninterpreted:
5199 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
5200 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
5201 return true;
5202 }
5203 DO_(::google::protobuf::internal::WireFormat::SkipField(
5204 input, tag, mutable_unknown_fields()));
5205 break;
5206 }
5207 }
5208 }
5209 return true;
5210#undef DO_
5211}
5212
5213bool UninterpretedOption_NamePart::SerializeWithCachedSizes(
5214 ::google::protobuf::io::CodedOutputStream* output) const {
5215#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
5216 // required string name_part = 1;
5217 if (_has_bit(0)) {
5218 DO_(::google::protobuf::internal::WireFormat::WriteString(1, this->name_part(), output));
5219 }
5220
5221 // required bool is_extension = 2;
5222 if (_has_bit(1)) {
5223 DO_(::google::protobuf::internal::WireFormat::WriteBool(2, this->is_extension(), output));
5224 }
5225
5226 if (!unknown_fields().empty()) {
5227 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5228 unknown_fields(), output));
5229 }
5230 return true;
5231#undef DO_
5232}
5233
5234int UninterpretedOption_NamePart::ByteSize() const {
5235 int total_size = 0;
5236
5237 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
5238 // required string name_part = 1;
5239 if (has_name_part()) {
5240 total_size += 1 +
5241 ::google::protobuf::internal::WireFormat::StringSize(this->name_part());
5242 }
5243
5244 // required bool is_extension = 2;
5245 if (has_is_extension()) {
5246 total_size += 1 + 1;
5247 }
5248
5249 }
5250 if (!unknown_fields().empty()) {
5251 total_size +=
5252 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5253 unknown_fields());
5254 }
5255 _cached_size_ = total_size;
5256 return total_size;
5257}
5258
5259void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) {
5260 GOOGLE_CHECK_NE(&from, this);
5261 const UninterpretedOption_NamePart* source =
5262 ::google::protobuf::internal::dynamic_cast_if_available<const UninterpretedOption_NamePart*>(
5263 &from);
5264 if (source == NULL) {
5265 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5266 } else {
5267 MergeFrom(*source);
5268 }
5269}
5270
5271void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
5272 GOOGLE_CHECK_NE(&from, this);
5273 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
5274 if (from._has_bit(0)) {
5275 set_name_part(from.name_part());
5276 }
5277 if (from._has_bit(1)) {
5278 set_is_extension(from.is_extension());
5279 }
5280 }
5281 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5282}
5283
5284void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) {
5285 if (&from == this) return;
5286 Clear();
5287 MergeFrom(from);
5288}
5289
5290void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) {
5291 if (&from == this) return;
5292 Clear();
5293 MergeFrom(from);
5294}
5295
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005296void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) {
5297 if (other != this) {
5298 std::swap(name_part_, other->name_part_);
5299 std::swap(is_extension_, other->is_extension_);
5300 std::swap(_has_bits_[0], other->_has_bits_[0]);
5301 _unknown_fields_.Swap(&other->_unknown_fields_);
5302 std::swap(_cached_size_, other->_cached_size_);
5303 }
5304}
5305
kenton@google.com24bf56f2008-09-24 20:31:01 +00005306bool UninterpretedOption_NamePart::IsInitialized() const {
5307 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
5308
5309 return true;
5310}
5311
5312const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::GetDescriptor() const {
5313 return descriptor();
5314}
5315
5316const ::google::protobuf::Reflection* UninterpretedOption_NamePart::GetReflection() const {
5317 if (UninterpretedOption_NamePart_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
5318 return UninterpretedOption_NamePart_reflection_;
5319}
5320
5321// -------------------------------------------------------------------
5322
5323
5324const ::std::string UninterpretedOption::_default_identifier_value_;
5325
5326
5327
5328const ::std::string UninterpretedOption::_default_string_value_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005329UninterpretedOption::UninterpretedOption()
5330 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00005331 _unknown_fields_(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00005332 _cached_size_(0),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00005333 name_(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00005334 identifier_value_(const_cast< ::std::string*>(&_default_identifier_value_)),
5335 positive_int_value_(GOOGLE_ULONGLONG(0)),
5336 negative_int_value_(GOOGLE_LONGLONG(0)),
5337 double_value_(0),
5338 string_value_(const_cast< ::std::string*>(&_default_string_value_)) {
5339 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5340}
5341
5342void UninterpretedOption::InitAsDefaultInstance() {}
5343
5344UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
5345 : ::google::protobuf::Message(),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00005346 _unknown_fields_(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00005347 _cached_size_(0),
kenton@google.comeb26a1e2009-04-16 22:43:40 +00005348 name_(),
kenton@google.com24bf56f2008-09-24 20:31:01 +00005349 identifier_value_(const_cast< ::std::string*>(&_default_identifier_value_)),
5350 positive_int_value_(GOOGLE_ULONGLONG(0)),
5351 negative_int_value_(GOOGLE_LONGLONG(0)),
5352 double_value_(0),
5353 string_value_(const_cast< ::std::string*>(&_default_string_value_)) {
5354 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5355 MergeFrom(from);
5356}
5357
5358UninterpretedOption::~UninterpretedOption() {
5359 if (identifier_value_ != &_default_identifier_value_) {
5360 delete identifier_value_;
5361 }
5362 if (string_value_ != &_default_string_value_) {
5363 delete string_value_;
5364 }
5365 if (this != default_instance_) {
5366 }
5367}
5368
5369const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() {
5370 if (UninterpretedOption_descriptor_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
5371 return UninterpretedOption_descriptor_;
5372}
5373
5374const UninterpretedOption& UninterpretedOption::default_instance() {
5375 if (default_instance_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
5376 return *default_instance_;
5377}
5378
5379UninterpretedOption* UninterpretedOption::default_instance_ = NULL;
5380
5381UninterpretedOption* UninterpretedOption::New() const {
5382 return new UninterpretedOption;
5383}
5384
5385void UninterpretedOption::Clear() {
5386 if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
5387 if (_has_bit(1)) {
5388 if (identifier_value_ != &_default_identifier_value_) {
5389 identifier_value_->clear();
5390 }
5391 }
5392 positive_int_value_ = GOOGLE_ULONGLONG(0);
5393 negative_int_value_ = GOOGLE_LONGLONG(0);
5394 double_value_ = 0;
5395 if (_has_bit(5)) {
5396 if (string_value_ != &_default_string_value_) {
5397 string_value_->clear();
5398 }
5399 }
5400 }
5401 name_.Clear();
5402 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5403 mutable_unknown_fields()->Clear();
5404}
5405
5406bool UninterpretedOption::MergePartialFromCodedStream(
5407 ::google::protobuf::io::CodedInputStream* input) {
5408#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
5409 ::google::protobuf::uint32 tag;
5410 while ((tag = input->ReadTag()) != 0) {
5411 switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
5412 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
5413 case 2: {
5414 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5415 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
5416 goto handle_uninterpreted;
5417 }
5418 parse_name:
5419 DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
5420 input, add_name()));
5421 if (input->ExpectTag(18)) goto parse_name;
5422 if (input->ExpectTag(26)) goto parse_identifier_value;
5423 break;
5424 }
5425
5426 // optional string identifier_value = 3;
5427 case 3: {
5428 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5429 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
5430 goto handle_uninterpreted;
5431 }
5432 parse_identifier_value:
5433 DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_identifier_value()));
5434 if (input->ExpectTag(32)) goto parse_positive_int_value;
5435 break;
5436 }
5437
5438 // optional uint64 positive_int_value = 4;
5439 case 4: {
5440 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5441 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
5442 goto handle_uninterpreted;
5443 }
5444 parse_positive_int_value:
5445 DO_(::google::protobuf::internal::WireFormat::ReadUInt64(
5446 input, &positive_int_value_));
5447 _set_bit(2);
5448 if (input->ExpectTag(40)) goto parse_negative_int_value;
5449 break;
5450 }
5451
5452 // optional int64 negative_int_value = 5;
5453 case 5: {
5454 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5455 ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
5456 goto handle_uninterpreted;
5457 }
5458 parse_negative_int_value:
5459 DO_(::google::protobuf::internal::WireFormat::ReadInt64(
5460 input, &negative_int_value_));
5461 _set_bit(3);
5462 if (input->ExpectTag(49)) goto parse_double_value;
5463 break;
5464 }
5465
5466 // optional double double_value = 6;
5467 case 6: {
5468 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5469 ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
5470 goto handle_uninterpreted;
5471 }
5472 parse_double_value:
5473 DO_(::google::protobuf::internal::WireFormat::ReadDouble(
5474 input, &double_value_));
5475 _set_bit(4);
5476 if (input->ExpectTag(58)) goto parse_string_value;
5477 break;
5478 }
5479
5480 // optional bytes string_value = 7;
5481 case 7: {
5482 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
5483 ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
5484 goto handle_uninterpreted;
5485 }
5486 parse_string_value:
5487 DO_(::google::protobuf::internal::WireFormat::ReadBytes(input, mutable_string_value()));
5488 if (input->ExpectAtEnd()) return true;
5489 break;
5490 }
5491
5492 default: {
5493 handle_uninterpreted:
5494 if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
5495 ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
5496 return true;
5497 }
5498 DO_(::google::protobuf::internal::WireFormat::SkipField(
5499 input, tag, mutable_unknown_fields()));
5500 break;
5501 }
5502 }
5503 }
5504 return true;
5505#undef DO_
5506}
5507
5508bool UninterpretedOption::SerializeWithCachedSizes(
5509 ::google::protobuf::io::CodedOutputStream* output) const {
5510#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
5511 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005512 for (int i = 0; i < this->name_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005513 DO_(::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->name(i), output));
5514 }
5515
5516 // optional string identifier_value = 3;
5517 if (_has_bit(1)) {
5518 DO_(::google::protobuf::internal::WireFormat::WriteString(3, this->identifier_value(), output));
5519 }
5520
5521 // optional uint64 positive_int_value = 4;
5522 if (_has_bit(2)) {
5523 DO_(::google::protobuf::internal::WireFormat::WriteUInt64(4, this->positive_int_value(), output));
5524 }
5525
5526 // optional int64 negative_int_value = 5;
5527 if (_has_bit(3)) {
5528 DO_(::google::protobuf::internal::WireFormat::WriteInt64(5, this->negative_int_value(), output));
5529 }
5530
5531 // optional double double_value = 6;
5532 if (_has_bit(4)) {
5533 DO_(::google::protobuf::internal::WireFormat::WriteDouble(6, this->double_value(), output));
5534 }
5535
5536 // optional bytes string_value = 7;
5537 if (_has_bit(5)) {
5538 DO_(::google::protobuf::internal::WireFormat::WriteBytes(7, this->string_value(), output));
5539 }
5540
5541 if (!unknown_fields().empty()) {
5542 DO_(::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5543 unknown_fields(), output));
5544 }
5545 return true;
5546#undef DO_
5547}
5548
5549int UninterpretedOption::ByteSize() const {
5550 int total_size = 0;
5551
5552 if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
5553 // optional string identifier_value = 3;
5554 if (has_identifier_value()) {
5555 total_size += 1 +
5556 ::google::protobuf::internal::WireFormat::StringSize(this->identifier_value());
5557 }
5558
5559 // optional uint64 positive_int_value = 4;
5560 if (has_positive_int_value()) {
5561 total_size += 1 +
5562 ::google::protobuf::internal::WireFormat::UInt64Size(
5563 this->positive_int_value());
5564 }
5565
5566 // optional int64 negative_int_value = 5;
5567 if (has_negative_int_value()) {
5568 total_size += 1 +
5569 ::google::protobuf::internal::WireFormat::Int64Size(
5570 this->negative_int_value());
5571 }
5572
5573 // optional double double_value = 6;
5574 if (has_double_value()) {
5575 total_size += 1 + 8;
5576 }
5577
5578 // optional bytes string_value = 7;
5579 if (has_string_value()) {
5580 total_size += 1 +
5581 ::google::protobuf::internal::WireFormat::BytesSize(this->string_value());
5582 }
5583
5584 }
5585 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005586 total_size += 1 * this->name_size();
5587 for (int i = 0; i < this->name_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00005588 total_size +=
5589 ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
5590 this->name(i));
5591 }
5592
5593 if (!unknown_fields().empty()) {
5594 total_size +=
5595 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5596 unknown_fields());
5597 }
5598 _cached_size_ = total_size;
5599 return total_size;
5600}
5601
5602void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) {
5603 GOOGLE_CHECK_NE(&from, this);
5604 const UninterpretedOption* source =
5605 ::google::protobuf::internal::dynamic_cast_if_available<const UninterpretedOption*>(
5606 &from);
5607 if (source == NULL) {
5608 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5609 } else {
5610 MergeFrom(*source);
5611 }
5612}
5613
5614void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
5615 GOOGLE_CHECK_NE(&from, this);
5616 name_.MergeFrom(from.name_);
5617 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
5618 if (from._has_bit(1)) {
5619 set_identifier_value(from.identifier_value());
5620 }
5621 if (from._has_bit(2)) {
5622 set_positive_int_value(from.positive_int_value());
5623 }
5624 if (from._has_bit(3)) {
5625 set_negative_int_value(from.negative_int_value());
5626 }
5627 if (from._has_bit(4)) {
5628 set_double_value(from.double_value());
5629 }
5630 if (from._has_bit(5)) {
5631 set_string_value(from.string_value());
5632 }
5633 }
5634 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5635}
5636
5637void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) {
5638 if (&from == this) return;
5639 Clear();
5640 MergeFrom(from);
5641}
5642
5643void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
5644 if (&from == this) return;
5645 Clear();
5646 MergeFrom(from);
5647}
5648
kenton@google.com26bd9ee2008-11-21 00:06:27 +00005649void UninterpretedOption::Swap(UninterpretedOption* other) {
5650 if (other != this) {
5651 name_.Swap(&other->name_);
5652 std::swap(identifier_value_, other->identifier_value_);
5653 std::swap(positive_int_value_, other->positive_int_value_);
5654 std::swap(negative_int_value_, other->negative_int_value_);
5655 std::swap(double_value_, other->double_value_);
5656 std::swap(string_value_, other->string_value_);
5657 std::swap(_has_bits_[0], other->_has_bits_[0]);
5658 _unknown_fields_.Swap(&other->_unknown_fields_);
5659 std::swap(_cached_size_, other->_cached_size_);
5660 }
5661}
5662
kenton@google.com24bf56f2008-09-24 20:31:01 +00005663bool UninterpretedOption::IsInitialized() const {
5664
5665 for (int i = 0; i < name_size(); i++) {
5666 if (!this->name(i).IsInitialized()) return false;
5667 }
5668 return true;
5669}
5670
5671const ::google::protobuf::Descriptor* UninterpretedOption::GetDescriptor() const {
5672 return descriptor();
5673}
5674
5675const ::google::protobuf::Reflection* UninterpretedOption::GetReflection() const {
5676 if (UninterpretedOption_reflection_ == NULL) protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto();
5677 return UninterpretedOption_reflection_;
5678}
5679
temporal40ee5512008-07-10 02:12:20 +00005680} // namespace protobuf
5681} // namespace google