123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: msg.proto
- #include "msg.pb.h"
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- class msg_loginDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<msg_login>
- _instance;
- } _msg_login_default_instance_;
- class msg_registerDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<msg_register>
- _instance;
- } _msg_register_default_instance_;
- namespace protobuf_msg_2eproto {
- static void InitDefaultsmsg_login() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::_msg_login_default_instance_;
- new (ptr) ::msg_login();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::msg_login::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_msg_login =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsmsg_login}, {}};
- static void InitDefaultsmsg_register() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::_msg_register_default_instance_;
- new (ptr) ::msg_register();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::msg_register::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_msg_register =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsmsg_register}, {}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_msg_login.base);
- ::google::protobuf::internal::InitSCC(&scc_info_msg_register.base);
- }
- ::google::protobuf::Metadata file_level_metadata[2];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, phone_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, passwrod_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, system_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, phone_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, gender_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, passwrod_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, vcode_),
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::msg_login)},
- { 8, -1, sizeof(::msg_register)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::_msg_login_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::_msg_register_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "msg.proto", schemas, file_default_instances, TableStruct::offsets,
- file_level_metadata, NULL, NULL);
- }
- void protobuf_AssignDescriptorsOnce() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\tmsg.proto\"<\n\tmsg_login\022\r\n\005phone\030\001 \001(\t\022"
- "\020\n\010passwrod\030\002 \001(\t\022\016\n\006system\030\003 \001(\t\"\\\n\014msg"
- "_register\022\r\n\005phone\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\016"
- "\n\006gender\030\003 \001(\010\022\020\n\010passwrod\030\004 \001(\t\022\r\n\005vcod"
- "e\030\005 \001(\tb\006proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 175);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "msg.proto", &protobuf_RegisterTypes);
- }
- void AddDescriptors() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
- }
- // Force AddDescriptors() to be called at dynamic initialization time.
- struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
- } static_descriptor_initializer;
- } // namespace protobuf_msg_2eproto
- // ===================================================================
- void msg_login::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int msg_login::kPhoneFieldNumber;
- const int msg_login::kPasswrodFieldNumber;
- const int msg_login::kSystemFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- msg_login::msg_login()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_msg_2eproto::scc_info_msg_login.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:msg_login)
- }
- msg_login::msg_login(const msg_login& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.phone().size() > 0) {
- phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
- }
- passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.passwrod().size() > 0) {
- passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
- }
- system_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.system().size() > 0) {
- system_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.system_);
- }
- // @@protoc_insertion_point(copy_constructor:msg_login)
- }
- void msg_login::SharedCtor() {
- phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- system_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- msg_login::~msg_login() {
- // @@protoc_insertion_point(destructor:msg_login)
- SharedDtor();
- }
- void msg_login::SharedDtor() {
- phone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- passwrod_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- system_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void msg_login::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* msg_login::descriptor() {
- ::protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const msg_login& msg_login::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_msg_2eproto::scc_info_msg_login.base);
- return *internal_default_instance();
- }
- void msg_login::Clear() {
- // @@protoc_insertion_point(message_clear_start:msg_login)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- phone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- passwrod_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- system_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _internal_metadata_.Clear();
- }
- bool msg_login::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:msg_login)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string phone = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_phone()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->phone().data(), static_cast<int>(this->phone().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "msg_login.phone"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string passwrod = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_passwrod()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->passwrod().data(), static_cast<int>(this->passwrod().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "msg_login.passwrod"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string system = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_system()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->system().data(), static_cast<int>(this->system().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "msg_login.system"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:msg_login)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:msg_login)
- return false;
- #undef DO_
- }
- void msg_login::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:msg_login)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string phone = 1;
- if (this->phone().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->phone().data(), static_cast<int>(this->phone().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_login.phone");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->phone(), output);
- }
- // string passwrod = 2;
- if (this->passwrod().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->passwrod().data(), static_cast<int>(this->passwrod().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_login.passwrod");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->passwrod(), output);
- }
- // string system = 3;
- if (this->system().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->system().data(), static_cast<int>(this->system().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_login.system");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->system(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:msg_login)
- }
- ::google::protobuf::uint8* msg_login::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:msg_login)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string phone = 1;
- if (this->phone().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->phone().data(), static_cast<int>(this->phone().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_login.phone");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->phone(), target);
- }
- // string passwrod = 2;
- if (this->passwrod().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->passwrod().data(), static_cast<int>(this->passwrod().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_login.passwrod");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->passwrod(), target);
- }
- // string system = 3;
- if (this->system().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->system().data(), static_cast<int>(this->system().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_login.system");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->system(), target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:msg_login)
- return target;
- }
- size_t msg_login::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:msg_login)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string phone = 1;
- if (this->phone().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->phone());
- }
- // string passwrod = 2;
- if (this->passwrod().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->passwrod());
- }
- // string system = 3;
- if (this->system().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->system());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void msg_login::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:msg_login)
- GOOGLE_DCHECK_NE(&from, this);
- const msg_login* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const msg_login>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:msg_login)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:msg_login)
- MergeFrom(*source);
- }
- }
- void msg_login::MergeFrom(const msg_login& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:msg_login)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.phone().size() > 0) {
- phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
- }
- if (from.passwrod().size() > 0) {
- passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
- }
- if (from.system().size() > 0) {
- system_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.system_);
- }
- }
- void msg_login::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:msg_login)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void msg_login::CopyFrom(const msg_login& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:msg_login)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool msg_login::IsInitialized() const {
- return true;
- }
- void msg_login::Swap(msg_login* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void msg_login::InternalSwap(msg_login* other) {
- using std::swap;
- phone_.Swap(&other->phone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- passwrod_.Swap(&other->passwrod_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- system_.Swap(&other->system_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata msg_login::GetMetadata() const {
- protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void msg_register::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int msg_register::kPhoneFieldNumber;
- const int msg_register::kNameFieldNumber;
- const int msg_register::kGenderFieldNumber;
- const int msg_register::kPasswrodFieldNumber;
- const int msg_register::kVcodeFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- msg_register::msg_register()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_msg_2eproto::scc_info_msg_register.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:msg_register)
- }
- msg_register::msg_register(const msg_register& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.phone().size() > 0) {
- phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
- }
- name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.name().size() > 0) {
- name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.passwrod().size() > 0) {
- passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
- }
- vcode_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.vcode().size() > 0) {
- vcode_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.vcode_);
- }
- gender_ = from.gender_;
- // @@protoc_insertion_point(copy_constructor:msg_register)
- }
- void msg_register::SharedCtor() {
- phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- vcode_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- gender_ = false;
- }
- msg_register::~msg_register() {
- // @@protoc_insertion_point(destructor:msg_register)
- SharedDtor();
- }
- void msg_register::SharedDtor() {
- phone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- passwrod_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- vcode_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void msg_register::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* msg_register::descriptor() {
- ::protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const msg_register& msg_register::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_msg_2eproto::scc_info_msg_register.base);
- return *internal_default_instance();
- }
- void msg_register::Clear() {
- // @@protoc_insertion_point(message_clear_start:msg_register)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- phone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- passwrod_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- vcode_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- gender_ = false;
- _internal_metadata_.Clear();
- }
- bool msg_register::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:msg_register)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string phone = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_phone()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->phone().data(), static_cast<int>(this->phone().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "msg_register.phone"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string name = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_name()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "msg_register.name"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bool gender = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &gender_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string passwrod = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_passwrod()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->passwrod().data(), static_cast<int>(this->passwrod().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "msg_register.passwrod"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string vcode = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_vcode()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->vcode().data(), static_cast<int>(this->vcode().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "msg_register.vcode"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:msg_register)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:msg_register)
- return false;
- #undef DO_
- }
- void msg_register::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:msg_register)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string phone = 1;
- if (this->phone().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->phone().data(), static_cast<int>(this->phone().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.phone");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->phone(), output);
- }
- // string name = 2;
- if (this->name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->name(), output);
- }
- // bool gender = 3;
- if (this->gender() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->gender(), output);
- }
- // string passwrod = 4;
- if (this->passwrod().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->passwrod().data(), static_cast<int>(this->passwrod().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.passwrod");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->passwrod(), output);
- }
- // string vcode = 5;
- if (this->vcode().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->vcode().data(), static_cast<int>(this->vcode().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.vcode");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 5, this->vcode(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:msg_register)
- }
- ::google::protobuf::uint8* msg_register::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:msg_register)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string phone = 1;
- if (this->phone().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->phone().data(), static_cast<int>(this->phone().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.phone");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->phone(), target);
- }
- // string name = 2;
- if (this->name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->name(), target);
- }
- // bool gender = 3;
- if (this->gender() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->gender(), target);
- }
- // string passwrod = 4;
- if (this->passwrod().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->passwrod().data(), static_cast<int>(this->passwrod().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.passwrod");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 4, this->passwrod(), target);
- }
- // string vcode = 5;
- if (this->vcode().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->vcode().data(), static_cast<int>(this->vcode().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "msg_register.vcode");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 5, this->vcode(), target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:msg_register)
- return target;
- }
- size_t msg_register::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:msg_register)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string phone = 1;
- if (this->phone().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->phone());
- }
- // string name = 2;
- if (this->name().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->name());
- }
- // string passwrod = 4;
- if (this->passwrod().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->passwrod());
- }
- // string vcode = 5;
- if (this->vcode().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->vcode());
- }
- // bool gender = 3;
- if (this->gender() != 0) {
- total_size += 1 + 1;
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void msg_register::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:msg_register)
- GOOGLE_DCHECK_NE(&from, this);
- const msg_register* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const msg_register>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:msg_register)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:msg_register)
- MergeFrom(*source);
- }
- }
- void msg_register::MergeFrom(const msg_register& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:msg_register)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.phone().size() > 0) {
- phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
- }
- if (from.name().size() > 0) {
- name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- if (from.passwrod().size() > 0) {
- passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
- }
- if (from.vcode().size() > 0) {
- vcode_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.vcode_);
- }
- if (from.gender() != 0) {
- set_gender(from.gender());
- }
- }
- void msg_register::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:msg_register)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void msg_register::CopyFrom(const msg_register& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:msg_register)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool msg_register::IsInitialized() const {
- return true;
- }
- void msg_register::Swap(msg_register* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void msg_register::InternalSwap(msg_register* other) {
- using std::swap;
- phone_.Swap(&other->phone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- passwrod_.Swap(&other->passwrod_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- vcode_.Swap(&other->vcode_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(gender_, other->gender_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata msg_register::GetMetadata() const {
- protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::msg_login* Arena::CreateMaybeMessage< ::msg_login >(Arena* arena) {
- return Arena::CreateInternal< ::msg_login >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::msg_register* Arena::CreateMaybeMessage< ::msg_register >(Arena* arena) {
- return Arena::CreateInternal< ::msg_register >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|