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