bool AddressBook::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::StringOutputStream unknown_fields_string( mutable_unknown_fields()); ::google::protobuf::io::CodedOutputStream unknown_fields_stream( &unknown_fields_string); // @@protoc_insertion_point(parse_start:tutorial.AddressBook) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .tutorial.Person person = 1; case 1: { if (tag == 10) { parse_person: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_person())); } else { goto handle_unusual; } if (input->ExpectTag(10)) goto parse_person; if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField( input, tag, &unknown_fields_stream)); break; } } } success: // @@protoc_insertion_point(parse_success:tutorial.AddressBook) return true; failure: // @@protoc_insertion_point(parse_failure:tutorial.AddressBook) return false; #undef DO_ }
bool UserLogin::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::StringOutputStream unknown_fields_string( mutable_unknown_fields()); ::google::protobuf::io::CodedOutputStream unknown_fields_stream( &unknown_fields_string); // @@protoc_insertion_point(parse_start:yunquan.UserLogin) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required .yunquan.E_CLIENT_TYPE clientType = 1; case 1: { if (tag == 8) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::yunquan::E_CLIENT_TYPE_IsValid(value)) { set_clienttype(static_cast< ::yunquan::E_CLIENT_TYPE >(value)); } else { unknown_fields_stream.WriteVarint32(tag); unknown_fields_stream.WriteVarint32(value); } } else { goto handle_unusual; } if (input->ExpectTag(18)) goto parse_clientId; break; } // required string clientId = 2; case 2: { if (tag == 18) { parse_clientId: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_clientid())); } else { goto handle_unusual; } if (input->ExpectTag(26)) goto parse_clientSecret; break; } // required string clientSecret = 3; case 3: { if (tag == 26) { parse_clientSecret: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_clientsecret())); } else { goto handle_unusual; } if (input->ExpectTag(32)) goto parse_sessionId; break; } // optional uint32 sessionId = 4; case 4: { if (tag == 32) { parse_sessionId: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &sessionid_))); set_has_sessionid(); } else { goto handle_unusual; } if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField( input, tag, &unknown_fields_stream)); break; } } } success: // @@protoc_insertion_point(parse_success:yunquan.UserLogin) return true; failure: // @@protoc_insertion_point(parse_failure:yunquan.UserLogin) return false; #undef DO_ }
bool Person::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::StringOutputStream unknown_fields_string( mutable_unknown_fields()); ::google::protobuf::io::CodedOutputStream unknown_fields_stream( &unknown_fields_string); // @@protoc_insertion_point(parse_start:tutorial.Person) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required string name = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); } else { goto handle_unusual; } if (input->ExpectTag(16)) goto parse_id; break; } // required int32 id = 2; case 2: { if (tag == 16) { parse_id: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &id_))); set_has_id(); } else { goto handle_unusual; } if (input->ExpectTag(26)) goto parse_email; break; } // optional string email = 3; case 3: { if (tag == 26) { parse_email: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_email())); } else { goto handle_unusual; } if (input->ExpectTag(34)) goto parse_phone; break; } // repeated .tutorial.Person.PhoneNumber phone = 4; case 4: { if (tag == 34) { parse_phone: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_phone())); } else { goto handle_unusual; } if (input->ExpectTag(34)) goto parse_phone; if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField( input, tag, &unknown_fields_stream)); break; } } } success: // @@protoc_insertion_point(parse_success:tutorial.Person) return true; failure: // @@protoc_insertion_point(parse_failure:tutorial.Person) return false; #undef DO_ }
bool Person_PhoneNumber::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::StringOutputStream unknown_fields_string( mutable_unknown_fields()); ::google::protobuf::io::CodedOutputStream unknown_fields_stream( &unknown_fields_string); // @@protoc_insertion_point(parse_start:tutorial.Person.PhoneNumber) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required string number = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_number())); } else { goto handle_unusual; } if (input->ExpectTag(16)) goto parse_type; break; } // optional .tutorial.Person.PhoneType type = 2 [default = HOME]; case 2: { if (tag == 16) { parse_type: int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::tutorial::Person_PhoneType_IsValid(value)) { set_type(static_cast< ::tutorial::Person_PhoneType >(value)); } else { unknown_fields_stream.WriteVarint32(tag); unknown_fields_stream.WriteVarint32(value); } } else { goto handle_unusual; } if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField( input, tag, &unknown_fields_stream)); break; } } } success: // @@protoc_insertion_point(parse_success:tutorial.Person.PhoneNumber) return true; failure: // @@protoc_insertion_point(parse_failure:tutorial.Person.PhoneNumber) return false; #undef DO_ }