kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | |
| 3 | #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
| 4 | #include "google/protobuf/compiler/plugin.pb.h" |
kenton@google.com | c65c041 | 2010-02-01 20:35:34 +0000 | [diff] [blame] | 5 | |
| 6 | #include <algorithm> |
| 7 | |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 8 | #include <google/protobuf/stubs/once.h> |
| 9 | #include <google/protobuf/io/coded_stream.h> |
| 10 | #include <google/protobuf/wire_format_lite_inl.h> |
| 11 | #include <google/protobuf/descriptor.h> |
| 12 | #include <google/protobuf/reflection_ops.h> |
| 13 | #include <google/protobuf/wire_format.h> |
| 14 | // @@protoc_insertion_point(includes) |
| 15 | |
| 16 | namespace google { |
| 17 | namespace protobuf { |
| 18 | namespace compiler { |
| 19 | |
| 20 | namespace { |
| 21 | |
| 22 | const ::google::protobuf::Descriptor* CodeGeneratorRequest_descriptor_ = NULL; |
| 23 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 24 | CodeGeneratorRequest_reflection_ = NULL; |
| 25 | const ::google::protobuf::Descriptor* CodeGeneratorResponse_descriptor_ = NULL; |
| 26 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 27 | CodeGeneratorResponse_reflection_ = NULL; |
| 28 | const ::google::protobuf::Descriptor* CodeGeneratorResponse_File_descriptor_ = NULL; |
| 29 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 30 | CodeGeneratorResponse_File_reflection_ = NULL; |
| 31 | |
| 32 | } // namespace |
| 33 | |
| 34 | |
| 35 | void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { |
| 36 | protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); |
| 37 | const ::google::protobuf::FileDescriptor* file = |
| 38 | ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( |
| 39 | "google/protobuf/compiler/plugin.proto"); |
| 40 | GOOGLE_CHECK(file != NULL); |
| 41 | CodeGeneratorRequest_descriptor_ = file->message_type(0); |
| 42 | static const int CodeGeneratorRequest_offsets_[3] = { |
| 43 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, file_to_generate_), |
| 44 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, parameter_), |
| 45 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, proto_file_), |
| 46 | }; |
| 47 | CodeGeneratorRequest_reflection_ = |
| 48 | new ::google::protobuf::internal::GeneratedMessageReflection( |
| 49 | CodeGeneratorRequest_descriptor_, |
| 50 | CodeGeneratorRequest::default_instance_, |
| 51 | CodeGeneratorRequest_offsets_, |
| 52 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_[0]), |
| 53 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _unknown_fields_), |
| 54 | -1, |
| 55 | ::google::protobuf::DescriptorPool::generated_pool(), |
| 56 | ::google::protobuf::MessageFactory::generated_factory(), |
| 57 | sizeof(CodeGeneratorRequest)); |
| 58 | CodeGeneratorResponse_descriptor_ = file->message_type(1); |
| 59 | static const int CodeGeneratorResponse_offsets_[2] = { |
| 60 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, error_), |
| 61 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, file_), |
| 62 | }; |
| 63 | CodeGeneratorResponse_reflection_ = |
| 64 | new ::google::protobuf::internal::GeneratedMessageReflection( |
| 65 | CodeGeneratorResponse_descriptor_, |
| 66 | CodeGeneratorResponse::default_instance_, |
| 67 | CodeGeneratorResponse_offsets_, |
| 68 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _has_bits_[0]), |
| 69 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _unknown_fields_), |
| 70 | -1, |
| 71 | ::google::protobuf::DescriptorPool::generated_pool(), |
| 72 | ::google::protobuf::MessageFactory::generated_factory(), |
| 73 | sizeof(CodeGeneratorResponse)); |
| 74 | CodeGeneratorResponse_File_descriptor_ = CodeGeneratorResponse_descriptor_->nested_type(0); |
| 75 | static const int CodeGeneratorResponse_File_offsets_[3] = { |
| 76 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, name_), |
| 77 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, insertion_point_), |
| 78 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, content_), |
| 79 | }; |
| 80 | CodeGeneratorResponse_File_reflection_ = |
| 81 | new ::google::protobuf::internal::GeneratedMessageReflection( |
| 82 | CodeGeneratorResponse_File_descriptor_, |
| 83 | CodeGeneratorResponse_File::default_instance_, |
| 84 | CodeGeneratorResponse_File_offsets_, |
| 85 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_[0]), |
| 86 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _unknown_fields_), |
| 87 | -1, |
| 88 | ::google::protobuf::DescriptorPool::generated_pool(), |
| 89 | ::google::protobuf::MessageFactory::generated_factory(), |
| 90 | sizeof(CodeGeneratorResponse_File)); |
| 91 | } |
| 92 | |
| 93 | namespace { |
| 94 | |
| 95 | GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); |
| 96 | inline void protobuf_AssignDescriptorsOnce() { |
| 97 | ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, |
| 98 | &protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto); |
| 99 | } |
| 100 | |
| 101 | void protobuf_RegisterTypes(const ::std::string&) { |
| 102 | protobuf_AssignDescriptorsOnce(); |
| 103 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 104 | CodeGeneratorRequest_descriptor_, &CodeGeneratorRequest::default_instance()); |
| 105 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 106 | CodeGeneratorResponse_descriptor_, &CodeGeneratorResponse::default_instance()); |
| 107 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 108 | CodeGeneratorResponse_File_descriptor_, &CodeGeneratorResponse_File::default_instance()); |
| 109 | } |
| 110 | |
| 111 | } // namespace |
| 112 | |
| 113 | void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { |
| 114 | delete CodeGeneratorRequest::default_instance_; |
| 115 | delete CodeGeneratorRequest_reflection_; |
| 116 | delete CodeGeneratorResponse::default_instance_; |
| 117 | delete CodeGeneratorResponse_reflection_; |
| 118 | delete CodeGeneratorResponse_File::default_instance_; |
| 119 | delete CodeGeneratorResponse_File_reflection_; |
| 120 | } |
| 121 | |
| 122 | void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { |
| 123 | static bool already_here = false; |
| 124 | if (already_here) return; |
| 125 | already_here = true; |
| 126 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 127 | |
| 128 | ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 129 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
| 130 | "\n%google/protobuf/compiler/plugin.proto\022" |
| 131 | "\030google.protobuf.compiler\032 google/protob" |
| 132 | "uf/descriptor.proto\"}\n\024CodeGeneratorRequ" |
| 133 | "est\022\030\n\020file_to_generate\030\001 \003(\t\022\021\n\tparamet" |
| 134 | "er\030\002 \001(\t\0228\n\nproto_file\030\017 \003(\0132$.google.pr" |
| 135 | "otobuf.FileDescriptorProto\"\252\001\n\025CodeGener" |
| 136 | "atorResponse\022\r\n\005error\030\001 \001(\t\022B\n\004file\030\017 \003(" |
| 137 | "\01324.google.protobuf.compiler.CodeGenerat" |
| 138 | "orResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022\027\n" |
| 139 | "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\t", 399); |
| 140 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| 141 | "google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes); |
| 142 | CodeGeneratorRequest::default_instance_ = new CodeGeneratorRequest(); |
| 143 | CodeGeneratorResponse::default_instance_ = new CodeGeneratorResponse(); |
| 144 | CodeGeneratorResponse_File::default_instance_ = new CodeGeneratorResponse_File(); |
| 145 | CodeGeneratorRequest::default_instance_->InitAsDefaultInstance(); |
| 146 | CodeGeneratorResponse::default_instance_->InitAsDefaultInstance(); |
| 147 | CodeGeneratorResponse_File::default_instance_->InitAsDefaultInstance(); |
| 148 | ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto); |
| 149 | } |
| 150 | |
| 151 | // Force AddDescriptors() to be called at static initialization time. |
| 152 | struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto { |
| 153 | StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { |
| 154 | protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); |
| 155 | } |
| 156 | } static_descriptor_initializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto_; |
| 157 | |
| 158 | |
| 159 | // =================================================================== |
| 160 | |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 161 | #ifndef _MSC_VER |
| 162 | const int CodeGeneratorRequest::kFileToGenerateFieldNumber; |
| 163 | const int CodeGeneratorRequest::kParameterFieldNumber; |
| 164 | const int CodeGeneratorRequest::kProtoFileFieldNumber; |
| 165 | #endif // !_MSC_VER |
| 166 | |
| 167 | CodeGeneratorRequest::CodeGeneratorRequest() |
| 168 | : ::google::protobuf::Message() { |
| 169 | SharedCtor(); |
| 170 | } |
| 171 | |
| 172 | void CodeGeneratorRequest::InitAsDefaultInstance() { |
| 173 | } |
| 174 | |
| 175 | CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) |
| 176 | : ::google::protobuf::Message() { |
| 177 | SharedCtor(); |
| 178 | MergeFrom(from); |
| 179 | } |
| 180 | |
| 181 | void CodeGeneratorRequest::SharedCtor() { |
| 182 | _cached_size_ = 0; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 183 | parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 184 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 185 | } |
| 186 | |
| 187 | CodeGeneratorRequest::~CodeGeneratorRequest() { |
| 188 | SharedDtor(); |
| 189 | } |
| 190 | |
| 191 | void CodeGeneratorRequest::SharedDtor() { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 192 | if (parameter_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 193 | delete parameter_; |
| 194 | } |
| 195 | if (this != default_instance_) { |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | void CodeGeneratorRequest::SetCachedSize(int size) const { |
| 200 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 201 | _cached_size_ = size; |
| 202 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 203 | } |
| 204 | const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() { |
| 205 | protobuf_AssignDescriptorsOnce(); |
| 206 | return CodeGeneratorRequest_descriptor_; |
| 207 | } |
| 208 | |
| 209 | const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() { |
| 210 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; |
| 211 | } |
| 212 | |
| 213 | CodeGeneratorRequest* CodeGeneratorRequest::default_instance_ = NULL; |
| 214 | |
| 215 | CodeGeneratorRequest* CodeGeneratorRequest::New() const { |
| 216 | return new CodeGeneratorRequest; |
| 217 | } |
| 218 | |
| 219 | void CodeGeneratorRequest::Clear() { |
| 220 | if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 221 | if (has_parameter()) { |
| 222 | if (parameter_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 223 | parameter_->clear(); |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | file_to_generate_.Clear(); |
| 228 | proto_file_.Clear(); |
| 229 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 230 | mutable_unknown_fields()->Clear(); |
| 231 | } |
| 232 | |
| 233 | bool CodeGeneratorRequest::MergePartialFromCodedStream( |
| 234 | ::google::protobuf::io::CodedInputStream* input) { |
| 235 | #define DO_(EXPRESSION) if (!(EXPRESSION)) return false |
| 236 | ::google::protobuf::uint32 tag; |
| 237 | while ((tag = input->ReadTag()) != 0) { |
| 238 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 239 | // repeated string file_to_generate = 1; |
| 240 | case 1: { |
| 241 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 242 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 243 | parse_file_to_generate: |
| 244 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 245 | input, this->add_file_to_generate())); |
| 246 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 247 | this->file_to_generate(0).data(), this->file_to_generate(0).length(), |
| 248 | ::google::protobuf::internal::WireFormat::PARSE); |
| 249 | } else { |
| 250 | goto handle_uninterpreted; |
| 251 | } |
| 252 | if (input->ExpectTag(10)) goto parse_file_to_generate; |
| 253 | if (input->ExpectTag(18)) goto parse_parameter; |
| 254 | break; |
| 255 | } |
| 256 | |
| 257 | // optional string parameter = 2; |
| 258 | case 2: { |
| 259 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 260 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 261 | parse_parameter: |
| 262 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 263 | input, this->mutable_parameter())); |
| 264 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 265 | this->parameter().data(), this->parameter().length(), |
| 266 | ::google::protobuf::internal::WireFormat::PARSE); |
| 267 | } else { |
| 268 | goto handle_uninterpreted; |
| 269 | } |
| 270 | if (input->ExpectTag(122)) goto parse_proto_file; |
| 271 | break; |
| 272 | } |
| 273 | |
| 274 | // repeated .google.protobuf.FileDescriptorProto proto_file = 15; |
| 275 | case 15: { |
| 276 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 277 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 278 | parse_proto_file: |
| 279 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 280 | input, add_proto_file())); |
| 281 | } else { |
| 282 | goto handle_uninterpreted; |
| 283 | } |
| 284 | if (input->ExpectTag(122)) goto parse_proto_file; |
| 285 | if (input->ExpectAtEnd()) return true; |
| 286 | break; |
| 287 | } |
| 288 | |
| 289 | default: { |
| 290 | handle_uninterpreted: |
| 291 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 292 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 293 | return true; |
| 294 | } |
| 295 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 296 | input, tag, mutable_unknown_fields())); |
| 297 | break; |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | return true; |
| 302 | #undef DO_ |
| 303 | } |
| 304 | |
| 305 | void CodeGeneratorRequest::SerializeWithCachedSizes( |
| 306 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 307 | // repeated string file_to_generate = 1; |
| 308 | for (int i = 0; i < this->file_to_generate_size(); i++) { |
| 309 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 310 | this->file_to_generate(i).data(), this->file_to_generate(i).length(), |
| 311 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 312 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 313 | 1, this->file_to_generate(i), output); |
| 314 | } |
| 315 | |
| 316 | // optional string parameter = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 317 | if (has_parameter()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 318 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 319 | this->parameter().data(), this->parameter().length(), |
| 320 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 321 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 322 | 2, this->parameter(), output); |
| 323 | } |
| 324 | |
| 325 | // repeated .google.protobuf.FileDescriptorProto proto_file = 15; |
| 326 | for (int i = 0; i < this->proto_file_size(); i++) { |
| 327 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 328 | 15, this->proto_file(i), output); |
| 329 | } |
| 330 | |
| 331 | if (!unknown_fields().empty()) { |
| 332 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 333 | unknown_fields(), output); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | ::google::protobuf::uint8* CodeGeneratorRequest::SerializeWithCachedSizesToArray( |
| 338 | ::google::protobuf::uint8* target) const { |
| 339 | // repeated string file_to_generate = 1; |
| 340 | for (int i = 0; i < this->file_to_generate_size(); i++) { |
| 341 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 342 | this->file_to_generate(i).data(), this->file_to_generate(i).length(), |
| 343 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 344 | target = ::google::protobuf::internal::WireFormatLite:: |
| 345 | WriteStringToArray(1, this->file_to_generate(i), target); |
| 346 | } |
| 347 | |
| 348 | // optional string parameter = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 349 | if (has_parameter()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 350 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 351 | this->parameter().data(), this->parameter().length(), |
| 352 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 353 | target = |
| 354 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 355 | 2, this->parameter(), target); |
| 356 | } |
| 357 | |
| 358 | // repeated .google.protobuf.FileDescriptorProto proto_file = 15; |
| 359 | for (int i = 0; i < this->proto_file_size(); i++) { |
| 360 | target = ::google::protobuf::internal::WireFormatLite:: |
| 361 | WriteMessageNoVirtualToArray( |
| 362 | 15, this->proto_file(i), target); |
| 363 | } |
| 364 | |
| 365 | if (!unknown_fields().empty()) { |
| 366 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 367 | unknown_fields(), target); |
| 368 | } |
| 369 | return target; |
| 370 | } |
| 371 | |
| 372 | int CodeGeneratorRequest::ByteSize() const { |
| 373 | int total_size = 0; |
| 374 | |
| 375 | if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { |
| 376 | // optional string parameter = 2; |
| 377 | if (has_parameter()) { |
| 378 | total_size += 1 + |
| 379 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 380 | this->parameter()); |
| 381 | } |
| 382 | |
| 383 | } |
| 384 | // repeated string file_to_generate = 1; |
| 385 | total_size += 1 * this->file_to_generate_size(); |
| 386 | for (int i = 0; i < this->file_to_generate_size(); i++) { |
| 387 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
| 388 | this->file_to_generate(i)); |
| 389 | } |
| 390 | |
| 391 | // repeated .google.protobuf.FileDescriptorProto proto_file = 15; |
| 392 | total_size += 1 * this->proto_file_size(); |
| 393 | for (int i = 0; i < this->proto_file_size(); i++) { |
| 394 | total_size += |
| 395 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 396 | this->proto_file(i)); |
| 397 | } |
| 398 | |
| 399 | if (!unknown_fields().empty()) { |
| 400 | total_size += |
| 401 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 402 | unknown_fields()); |
| 403 | } |
| 404 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 405 | _cached_size_ = total_size; |
| 406 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 407 | return total_size; |
| 408 | } |
| 409 | |
| 410 | void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) { |
| 411 | GOOGLE_CHECK_NE(&from, this); |
| 412 | const CodeGeneratorRequest* source = |
| 413 | ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorRequest*>( |
| 414 | &from); |
| 415 | if (source == NULL) { |
| 416 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 417 | } else { |
| 418 | MergeFrom(*source); |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) { |
| 423 | GOOGLE_CHECK_NE(&from, this); |
| 424 | file_to_generate_.MergeFrom(from.file_to_generate_); |
| 425 | proto_file_.MergeFrom(from.proto_file_); |
| 426 | if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 427 | if (from.has_parameter()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 428 | set_parameter(from.parameter()); |
| 429 | } |
| 430 | } |
| 431 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 432 | } |
| 433 | |
| 434 | void CodeGeneratorRequest::CopyFrom(const ::google::protobuf::Message& from) { |
| 435 | if (&from == this) return; |
| 436 | Clear(); |
| 437 | MergeFrom(from); |
| 438 | } |
| 439 | |
| 440 | void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) { |
| 441 | if (&from == this) return; |
| 442 | Clear(); |
| 443 | MergeFrom(from); |
| 444 | } |
| 445 | |
| 446 | bool CodeGeneratorRequest::IsInitialized() const { |
| 447 | |
| 448 | for (int i = 0; i < proto_file_size(); i++) { |
| 449 | if (!this->proto_file(i).IsInitialized()) return false; |
| 450 | } |
| 451 | return true; |
| 452 | } |
| 453 | |
| 454 | void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) { |
| 455 | if (other != this) { |
| 456 | file_to_generate_.Swap(&other->file_to_generate_); |
| 457 | std::swap(parameter_, other->parameter_); |
| 458 | proto_file_.Swap(&other->proto_file_); |
| 459 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 460 | _unknown_fields_.Swap(&other->_unknown_fields_); |
| 461 | std::swap(_cached_size_, other->_cached_size_); |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | ::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const { |
| 466 | protobuf_AssignDescriptorsOnce(); |
| 467 | ::google::protobuf::Metadata metadata; |
| 468 | metadata.descriptor = CodeGeneratorRequest_descriptor_; |
| 469 | metadata.reflection = CodeGeneratorRequest_reflection_; |
| 470 | return metadata; |
| 471 | } |
| 472 | |
| 473 | |
| 474 | // =================================================================== |
| 475 | |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 476 | #ifndef _MSC_VER |
| 477 | const int CodeGeneratorResponse_File::kNameFieldNumber; |
| 478 | const int CodeGeneratorResponse_File::kInsertionPointFieldNumber; |
| 479 | const int CodeGeneratorResponse_File::kContentFieldNumber; |
| 480 | #endif // !_MSC_VER |
| 481 | |
| 482 | CodeGeneratorResponse_File::CodeGeneratorResponse_File() |
| 483 | : ::google::protobuf::Message() { |
| 484 | SharedCtor(); |
| 485 | } |
| 486 | |
| 487 | void CodeGeneratorResponse_File::InitAsDefaultInstance() { |
| 488 | } |
| 489 | |
| 490 | CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from) |
| 491 | : ::google::protobuf::Message() { |
| 492 | SharedCtor(); |
| 493 | MergeFrom(from); |
| 494 | } |
| 495 | |
| 496 | void CodeGeneratorResponse_File::SharedCtor() { |
| 497 | _cached_size_ = 0; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 498 | name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); |
| 499 | insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); |
| 500 | content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 501 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 502 | } |
| 503 | |
| 504 | CodeGeneratorResponse_File::~CodeGeneratorResponse_File() { |
| 505 | SharedDtor(); |
| 506 | } |
| 507 | |
| 508 | void CodeGeneratorResponse_File::SharedDtor() { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 509 | if (name_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 510 | delete name_; |
| 511 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 512 | if (insertion_point_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 513 | delete insertion_point_; |
| 514 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 515 | if (content_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 516 | delete content_; |
| 517 | } |
| 518 | if (this != default_instance_) { |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | void CodeGeneratorResponse_File::SetCachedSize(int size) const { |
| 523 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 524 | _cached_size_ = size; |
| 525 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 526 | } |
| 527 | const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() { |
| 528 | protobuf_AssignDescriptorsOnce(); |
| 529 | return CodeGeneratorResponse_File_descriptor_; |
| 530 | } |
| 531 | |
| 532 | const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() { |
| 533 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; |
| 534 | } |
| 535 | |
| 536 | CodeGeneratorResponse_File* CodeGeneratorResponse_File::default_instance_ = NULL; |
| 537 | |
| 538 | CodeGeneratorResponse_File* CodeGeneratorResponse_File::New() const { |
| 539 | return new CodeGeneratorResponse_File; |
| 540 | } |
| 541 | |
| 542 | void CodeGeneratorResponse_File::Clear() { |
| 543 | if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 544 | if (has_name()) { |
| 545 | if (name_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 546 | name_->clear(); |
| 547 | } |
| 548 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 549 | if (has_insertion_point()) { |
| 550 | if (insertion_point_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 551 | insertion_point_->clear(); |
| 552 | } |
| 553 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 554 | if (has_content()) { |
| 555 | if (content_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 556 | content_->clear(); |
| 557 | } |
| 558 | } |
| 559 | } |
| 560 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 561 | mutable_unknown_fields()->Clear(); |
| 562 | } |
| 563 | |
| 564 | bool CodeGeneratorResponse_File::MergePartialFromCodedStream( |
| 565 | ::google::protobuf::io::CodedInputStream* input) { |
| 566 | #define DO_(EXPRESSION) if (!(EXPRESSION)) return false |
| 567 | ::google::protobuf::uint32 tag; |
| 568 | while ((tag = input->ReadTag()) != 0) { |
| 569 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 570 | // optional string name = 1; |
| 571 | case 1: { |
| 572 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 573 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 574 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 575 | input, this->mutable_name())); |
| 576 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 577 | this->name().data(), this->name().length(), |
| 578 | ::google::protobuf::internal::WireFormat::PARSE); |
| 579 | } else { |
| 580 | goto handle_uninterpreted; |
| 581 | } |
| 582 | if (input->ExpectTag(18)) goto parse_insertion_point; |
| 583 | break; |
| 584 | } |
| 585 | |
| 586 | // optional string insertion_point = 2; |
| 587 | case 2: { |
| 588 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 589 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 590 | parse_insertion_point: |
| 591 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 592 | input, this->mutable_insertion_point())); |
| 593 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 594 | this->insertion_point().data(), this->insertion_point().length(), |
| 595 | ::google::protobuf::internal::WireFormat::PARSE); |
| 596 | } else { |
| 597 | goto handle_uninterpreted; |
| 598 | } |
| 599 | if (input->ExpectTag(122)) goto parse_content; |
| 600 | break; |
| 601 | } |
| 602 | |
| 603 | // optional string content = 15; |
| 604 | case 15: { |
| 605 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 606 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 607 | parse_content: |
| 608 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 609 | input, this->mutable_content())); |
| 610 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 611 | this->content().data(), this->content().length(), |
| 612 | ::google::protobuf::internal::WireFormat::PARSE); |
| 613 | } else { |
| 614 | goto handle_uninterpreted; |
| 615 | } |
| 616 | if (input->ExpectAtEnd()) return true; |
| 617 | break; |
| 618 | } |
| 619 | |
| 620 | default: { |
| 621 | handle_uninterpreted: |
| 622 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 623 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 624 | return true; |
| 625 | } |
| 626 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 627 | input, tag, mutable_unknown_fields())); |
| 628 | break; |
| 629 | } |
| 630 | } |
| 631 | } |
| 632 | return true; |
| 633 | #undef DO_ |
| 634 | } |
| 635 | |
| 636 | void CodeGeneratorResponse_File::SerializeWithCachedSizes( |
| 637 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 638 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 639 | if (has_name()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 640 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 641 | this->name().data(), this->name().length(), |
| 642 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 643 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 644 | 1, this->name(), output); |
| 645 | } |
| 646 | |
| 647 | // optional string insertion_point = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 648 | if (has_insertion_point()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 649 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 650 | this->insertion_point().data(), this->insertion_point().length(), |
| 651 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 652 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 653 | 2, this->insertion_point(), output); |
| 654 | } |
| 655 | |
| 656 | // optional string content = 15; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 657 | if (has_content()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 658 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 659 | this->content().data(), this->content().length(), |
| 660 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 661 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 662 | 15, this->content(), output); |
| 663 | } |
| 664 | |
| 665 | if (!unknown_fields().empty()) { |
| 666 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 667 | unknown_fields(), output); |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | ::google::protobuf::uint8* CodeGeneratorResponse_File::SerializeWithCachedSizesToArray( |
| 672 | ::google::protobuf::uint8* target) const { |
| 673 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 674 | if (has_name()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 675 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 676 | this->name().data(), this->name().length(), |
| 677 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 678 | target = |
| 679 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 680 | 1, this->name(), target); |
| 681 | } |
| 682 | |
| 683 | // optional string insertion_point = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 684 | if (has_insertion_point()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 685 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 686 | this->insertion_point().data(), this->insertion_point().length(), |
| 687 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 688 | target = |
| 689 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 690 | 2, this->insertion_point(), target); |
| 691 | } |
| 692 | |
| 693 | // optional string content = 15; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 694 | if (has_content()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 695 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 696 | this->content().data(), this->content().length(), |
| 697 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 698 | target = |
| 699 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 700 | 15, this->content(), target); |
| 701 | } |
| 702 | |
| 703 | if (!unknown_fields().empty()) { |
| 704 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 705 | unknown_fields(), target); |
| 706 | } |
| 707 | return target; |
| 708 | } |
| 709 | |
| 710 | int CodeGeneratorResponse_File::ByteSize() const { |
| 711 | int total_size = 0; |
| 712 | |
| 713 | if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 714 | // optional string name = 1; |
| 715 | if (has_name()) { |
| 716 | total_size += 1 + |
| 717 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 718 | this->name()); |
| 719 | } |
| 720 | |
| 721 | // optional string insertion_point = 2; |
| 722 | if (has_insertion_point()) { |
| 723 | total_size += 1 + |
| 724 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 725 | this->insertion_point()); |
| 726 | } |
| 727 | |
| 728 | // optional string content = 15; |
| 729 | if (has_content()) { |
| 730 | total_size += 1 + |
| 731 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 732 | this->content()); |
| 733 | } |
| 734 | |
| 735 | } |
| 736 | if (!unknown_fields().empty()) { |
| 737 | total_size += |
| 738 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 739 | unknown_fields()); |
| 740 | } |
| 741 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 742 | _cached_size_ = total_size; |
| 743 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 744 | return total_size; |
| 745 | } |
| 746 | |
| 747 | void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& from) { |
| 748 | GOOGLE_CHECK_NE(&from, this); |
| 749 | const CodeGeneratorResponse_File* source = |
| 750 | ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorResponse_File*>( |
| 751 | &from); |
| 752 | if (source == NULL) { |
| 753 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 754 | } else { |
| 755 | MergeFrom(*source); |
| 756 | } |
| 757 | } |
| 758 | |
| 759 | void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) { |
| 760 | GOOGLE_CHECK_NE(&from, this); |
| 761 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 762 | if (from.has_name()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 763 | set_name(from.name()); |
| 764 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 765 | if (from.has_insertion_point()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 766 | set_insertion_point(from.insertion_point()); |
| 767 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 768 | if (from.has_content()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 769 | set_content(from.content()); |
| 770 | } |
| 771 | } |
| 772 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 773 | } |
| 774 | |
| 775 | void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) { |
| 776 | if (&from == this) return; |
| 777 | Clear(); |
| 778 | MergeFrom(from); |
| 779 | } |
| 780 | |
| 781 | void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) { |
| 782 | if (&from == this) return; |
| 783 | Clear(); |
| 784 | MergeFrom(from); |
| 785 | } |
| 786 | |
| 787 | bool CodeGeneratorResponse_File::IsInitialized() const { |
| 788 | |
| 789 | return true; |
| 790 | } |
| 791 | |
| 792 | void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) { |
| 793 | if (other != this) { |
| 794 | std::swap(name_, other->name_); |
| 795 | std::swap(insertion_point_, other->insertion_point_); |
| 796 | std::swap(content_, other->content_); |
| 797 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 798 | _unknown_fields_.Swap(&other->_unknown_fields_); |
| 799 | std::swap(_cached_size_, other->_cached_size_); |
| 800 | } |
| 801 | } |
| 802 | |
| 803 | ::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const { |
| 804 | protobuf_AssignDescriptorsOnce(); |
| 805 | ::google::protobuf::Metadata metadata; |
| 806 | metadata.descriptor = CodeGeneratorResponse_File_descriptor_; |
| 807 | metadata.reflection = CodeGeneratorResponse_File_reflection_; |
| 808 | return metadata; |
| 809 | } |
| 810 | |
| 811 | |
| 812 | // ------------------------------------------------------------------- |
| 813 | |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 814 | #ifndef _MSC_VER |
| 815 | const int CodeGeneratorResponse::kErrorFieldNumber; |
| 816 | const int CodeGeneratorResponse::kFileFieldNumber; |
| 817 | #endif // !_MSC_VER |
| 818 | |
| 819 | CodeGeneratorResponse::CodeGeneratorResponse() |
| 820 | : ::google::protobuf::Message() { |
| 821 | SharedCtor(); |
| 822 | } |
| 823 | |
| 824 | void CodeGeneratorResponse::InitAsDefaultInstance() { |
| 825 | } |
| 826 | |
| 827 | CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) |
| 828 | : ::google::protobuf::Message() { |
| 829 | SharedCtor(); |
| 830 | MergeFrom(from); |
| 831 | } |
| 832 | |
| 833 | void CodeGeneratorResponse::SharedCtor() { |
| 834 | _cached_size_ = 0; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 835 | error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 836 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 837 | } |
| 838 | |
| 839 | CodeGeneratorResponse::~CodeGeneratorResponse() { |
| 840 | SharedDtor(); |
| 841 | } |
| 842 | |
| 843 | void CodeGeneratorResponse::SharedDtor() { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 844 | if (error_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 845 | delete error_; |
| 846 | } |
| 847 | if (this != default_instance_) { |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | void CodeGeneratorResponse::SetCachedSize(int size) const { |
| 852 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 853 | _cached_size_ = size; |
| 854 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 855 | } |
| 856 | const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() { |
| 857 | protobuf_AssignDescriptorsOnce(); |
| 858 | return CodeGeneratorResponse_descriptor_; |
| 859 | } |
| 860 | |
| 861 | const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() { |
| 862 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; |
| 863 | } |
| 864 | |
| 865 | CodeGeneratorResponse* CodeGeneratorResponse::default_instance_ = NULL; |
| 866 | |
| 867 | CodeGeneratorResponse* CodeGeneratorResponse::New() const { |
| 868 | return new CodeGeneratorResponse; |
| 869 | } |
| 870 | |
| 871 | void CodeGeneratorResponse::Clear() { |
| 872 | if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 873 | if (has_error()) { |
| 874 | if (error_ != &::google::protobuf::internal::kEmptyString) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 875 | error_->clear(); |
| 876 | } |
| 877 | } |
| 878 | } |
| 879 | file_.Clear(); |
| 880 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 881 | mutable_unknown_fields()->Clear(); |
| 882 | } |
| 883 | |
| 884 | bool CodeGeneratorResponse::MergePartialFromCodedStream( |
| 885 | ::google::protobuf::io::CodedInputStream* input) { |
| 886 | #define DO_(EXPRESSION) if (!(EXPRESSION)) return false |
| 887 | ::google::protobuf::uint32 tag; |
| 888 | while ((tag = input->ReadTag()) != 0) { |
| 889 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 890 | // optional string error = 1; |
| 891 | case 1: { |
| 892 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 893 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 894 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 895 | input, this->mutable_error())); |
| 896 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 897 | this->error().data(), this->error().length(), |
| 898 | ::google::protobuf::internal::WireFormat::PARSE); |
| 899 | } else { |
| 900 | goto handle_uninterpreted; |
| 901 | } |
| 902 | if (input->ExpectTag(122)) goto parse_file; |
| 903 | break; |
| 904 | } |
| 905 | |
| 906 | // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; |
| 907 | case 15: { |
| 908 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 909 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { |
| 910 | parse_file: |
| 911 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 912 | input, add_file())); |
| 913 | } else { |
| 914 | goto handle_uninterpreted; |
| 915 | } |
| 916 | if (input->ExpectTag(122)) goto parse_file; |
| 917 | if (input->ExpectAtEnd()) return true; |
| 918 | break; |
| 919 | } |
| 920 | |
| 921 | default: { |
| 922 | handle_uninterpreted: |
| 923 | if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 924 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 925 | return true; |
| 926 | } |
| 927 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 928 | input, tag, mutable_unknown_fields())); |
| 929 | break; |
| 930 | } |
| 931 | } |
| 932 | } |
| 933 | return true; |
| 934 | #undef DO_ |
| 935 | } |
| 936 | |
| 937 | void CodeGeneratorResponse::SerializeWithCachedSizes( |
| 938 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 939 | // optional string error = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 940 | if (has_error()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 941 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 942 | this->error().data(), this->error().length(), |
| 943 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 944 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 945 | 1, this->error(), output); |
| 946 | } |
| 947 | |
| 948 | // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; |
| 949 | for (int i = 0; i < this->file_size(); i++) { |
| 950 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 951 | 15, this->file(i), output); |
| 952 | } |
| 953 | |
| 954 | if (!unknown_fields().empty()) { |
| 955 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 956 | unknown_fields(), output); |
| 957 | } |
| 958 | } |
| 959 | |
| 960 | ::google::protobuf::uint8* CodeGeneratorResponse::SerializeWithCachedSizesToArray( |
| 961 | ::google::protobuf::uint8* target) const { |
| 962 | // optional string error = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 963 | if (has_error()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 964 | ::google::protobuf::internal::WireFormat::VerifyUTF8String( |
| 965 | this->error().data(), this->error().length(), |
| 966 | ::google::protobuf::internal::WireFormat::SERIALIZE); |
| 967 | target = |
| 968 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 969 | 1, this->error(), target); |
| 970 | } |
| 971 | |
| 972 | // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; |
| 973 | for (int i = 0; i < this->file_size(); i++) { |
| 974 | target = ::google::protobuf::internal::WireFormatLite:: |
| 975 | WriteMessageNoVirtualToArray( |
| 976 | 15, this->file(i), target); |
| 977 | } |
| 978 | |
| 979 | if (!unknown_fields().empty()) { |
| 980 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 981 | unknown_fields(), target); |
| 982 | } |
| 983 | return target; |
| 984 | } |
| 985 | |
| 986 | int CodeGeneratorResponse::ByteSize() const { |
| 987 | int total_size = 0; |
| 988 | |
| 989 | if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 990 | // optional string error = 1; |
| 991 | if (has_error()) { |
| 992 | total_size += 1 + |
| 993 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 994 | this->error()); |
| 995 | } |
| 996 | |
| 997 | } |
| 998 | // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; |
| 999 | total_size += 1 * this->file_size(); |
| 1000 | for (int i = 0; i < this->file_size(); i++) { |
| 1001 | total_size += |
| 1002 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 1003 | this->file(i)); |
| 1004 | } |
| 1005 | |
| 1006 | if (!unknown_fields().empty()) { |
| 1007 | total_size += |
| 1008 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1009 | unknown_fields()); |
| 1010 | } |
| 1011 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 1012 | _cached_size_ = total_size; |
| 1013 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 1014 | return total_size; |
| 1015 | } |
| 1016 | |
| 1017 | void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) { |
| 1018 | GOOGLE_CHECK_NE(&from, this); |
| 1019 | const CodeGeneratorResponse* source = |
| 1020 | ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorResponse*>( |
| 1021 | &from); |
| 1022 | if (source == NULL) { |
| 1023 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1024 | } else { |
| 1025 | MergeFrom(*source); |
| 1026 | } |
| 1027 | } |
| 1028 | |
| 1029 | void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) { |
| 1030 | GOOGLE_CHECK_NE(&from, this); |
| 1031 | file_.MergeFrom(from.file_); |
| 1032 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 1033 | if (from.has_error()) { |
kenton@google.com | 5e744ff | 2009-12-18 04:51:42 +0000 | [diff] [blame] | 1034 | set_error(from.error()); |
| 1035 | } |
| 1036 | } |
| 1037 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 1038 | } |
| 1039 | |
| 1040 | void CodeGeneratorResponse::CopyFrom(const ::google::protobuf::Message& from) { |
| 1041 | if (&from == this) return; |
| 1042 | Clear(); |
| 1043 | MergeFrom(from); |
| 1044 | } |
| 1045 | |
| 1046 | void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) { |
| 1047 | if (&from == this) return; |
| 1048 | Clear(); |
| 1049 | MergeFrom(from); |
| 1050 | } |
| 1051 | |
| 1052 | bool CodeGeneratorResponse::IsInitialized() const { |
| 1053 | |
| 1054 | return true; |
| 1055 | } |
| 1056 | |
| 1057 | void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) { |
| 1058 | if (other != this) { |
| 1059 | std::swap(error_, other->error_); |
| 1060 | file_.Swap(&other->file_); |
| 1061 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 1062 | _unknown_fields_.Swap(&other->_unknown_fields_); |
| 1063 | std::swap(_cached_size_, other->_cached_size_); |
| 1064 | } |
| 1065 | } |
| 1066 | |
| 1067 | ::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const { |
| 1068 | protobuf_AssignDescriptorsOnce(); |
| 1069 | ::google::protobuf::Metadata metadata; |
| 1070 | metadata.descriptor = CodeGeneratorResponse_descriptor_; |
| 1071 | metadata.reflection = CodeGeneratorResponse_reflection_; |
| 1072 | return metadata; |
| 1073 | } |
| 1074 | |
| 1075 | |
| 1076 | // @@protoc_insertion_point(namespace_scope) |
| 1077 | |
| 1078 | } // namespace compiler |
| 1079 | } // namespace protobuf |
| 1080 | } // namespace google |
| 1081 | |
| 1082 | // @@protoc_insertion_point(global_scope) |