msg.pb.cc 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: msg.proto
  3. #include "msg.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. class msg_loginDefaultTypeInternal {
  19. public:
  20. ::google::protobuf::internal::ExplicitlyConstructed<msg_login>
  21. _instance;
  22. } _msg_login_default_instance_;
  23. class msg_registerDefaultTypeInternal {
  24. public:
  25. ::google::protobuf::internal::ExplicitlyConstructed<msg_register>
  26. _instance;
  27. } _msg_register_default_instance_;
  28. namespace protobuf_msg_2eproto {
  29. static void InitDefaultsmsg_login() {
  30. GOOGLE_PROTOBUF_VERIFY_VERSION;
  31. {
  32. void* ptr = &::_msg_login_default_instance_;
  33. new (ptr) ::msg_login();
  34. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  35. }
  36. ::msg_login::InitAsDefaultInstance();
  37. }
  38. ::google::protobuf::internal::SCCInfo<0> scc_info_msg_login =
  39. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsmsg_login}, {}};
  40. static void InitDefaultsmsg_register() {
  41. GOOGLE_PROTOBUF_VERIFY_VERSION;
  42. {
  43. void* ptr = &::_msg_register_default_instance_;
  44. new (ptr) ::msg_register();
  45. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  46. }
  47. ::msg_register::InitAsDefaultInstance();
  48. }
  49. ::google::protobuf::internal::SCCInfo<0> scc_info_msg_register =
  50. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsmsg_register}, {}};
  51. void InitDefaults() {
  52. ::google::protobuf::internal::InitSCC(&scc_info_msg_login.base);
  53. ::google::protobuf::internal::InitSCC(&scc_info_msg_register.base);
  54. }
  55. ::google::protobuf::Metadata file_level_metadata[2];
  56. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  57. ~0u, // no _has_bits_
  58. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, _internal_metadata_),
  59. ~0u, // no _extensions_
  60. ~0u, // no _oneof_case_
  61. ~0u, // no _weak_field_map_
  62. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, phone_),
  63. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, passwrod_),
  64. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_login, system_),
  65. ~0u, // no _has_bits_
  66. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, _internal_metadata_),
  67. ~0u, // no _extensions_
  68. ~0u, // no _oneof_case_
  69. ~0u, // no _weak_field_map_
  70. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, phone_),
  71. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, name_),
  72. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, gender_),
  73. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, passwrod_),
  74. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::msg_register, vcode_),
  75. };
  76. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  77. { 0, -1, sizeof(::msg_login)},
  78. { 8, -1, sizeof(::msg_register)},
  79. };
  80. static ::google::protobuf::Message const * const file_default_instances[] = {
  81. reinterpret_cast<const ::google::protobuf::Message*>(&::_msg_login_default_instance_),
  82. reinterpret_cast<const ::google::protobuf::Message*>(&::_msg_register_default_instance_),
  83. };
  84. void protobuf_AssignDescriptors() {
  85. AddDescriptors();
  86. AssignDescriptors(
  87. "msg.proto", schemas, file_default_instances, TableStruct::offsets,
  88. file_level_metadata, NULL, NULL);
  89. }
  90. void protobuf_AssignDescriptorsOnce() {
  91. static ::google::protobuf::internal::once_flag once;
  92. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  93. }
  94. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  95. void protobuf_RegisterTypes(const ::std::string&) {
  96. protobuf_AssignDescriptorsOnce();
  97. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
  98. }
  99. void AddDescriptorsImpl() {
  100. InitDefaults();
  101. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  102. "\n\tmsg.proto\"<\n\tmsg_login\022\r\n\005phone\030\001 \001(\t\022"
  103. "\020\n\010passwrod\030\002 \001(\t\022\016\n\006system\030\003 \001(\t\"\\\n\014msg"
  104. "_register\022\r\n\005phone\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\016"
  105. "\n\006gender\030\003 \001(\010\022\020\n\010passwrod\030\004 \001(\t\022\r\n\005vcod"
  106. "e\030\005 \001(\tb\006proto3"
  107. };
  108. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  109. descriptor, 175);
  110. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  111. "msg.proto", &protobuf_RegisterTypes);
  112. }
  113. void AddDescriptors() {
  114. static ::google::protobuf::internal::once_flag once;
  115. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  116. }
  117. // Force AddDescriptors() to be called at dynamic initialization time.
  118. struct StaticDescriptorInitializer {
  119. StaticDescriptorInitializer() {
  120. AddDescriptors();
  121. }
  122. } static_descriptor_initializer;
  123. } // namespace protobuf_msg_2eproto
  124. // ===================================================================
  125. void msg_login::InitAsDefaultInstance() {
  126. }
  127. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  128. const int msg_login::kPhoneFieldNumber;
  129. const int msg_login::kPasswrodFieldNumber;
  130. const int msg_login::kSystemFieldNumber;
  131. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  132. msg_login::msg_login()
  133. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  134. ::google::protobuf::internal::InitSCC(
  135. &protobuf_msg_2eproto::scc_info_msg_login.base);
  136. SharedCtor();
  137. // @@protoc_insertion_point(constructor:msg_login)
  138. }
  139. msg_login::msg_login(const msg_login& from)
  140. : ::google::protobuf::Message(),
  141. _internal_metadata_(NULL) {
  142. _internal_metadata_.MergeFrom(from._internal_metadata_);
  143. phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  144. if (from.phone().size() > 0) {
  145. phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
  146. }
  147. passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  148. if (from.passwrod().size() > 0) {
  149. passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
  150. }
  151. system_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  152. if (from.system().size() > 0) {
  153. system_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.system_);
  154. }
  155. // @@protoc_insertion_point(copy_constructor:msg_login)
  156. }
  157. void msg_login::SharedCtor() {
  158. phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  159. passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  160. system_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  161. }
  162. msg_login::~msg_login() {
  163. // @@protoc_insertion_point(destructor:msg_login)
  164. SharedDtor();
  165. }
  166. void msg_login::SharedDtor() {
  167. phone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  168. passwrod_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  169. system_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  170. }
  171. void msg_login::SetCachedSize(int size) const {
  172. _cached_size_.Set(size);
  173. }
  174. const ::google::protobuf::Descriptor* msg_login::descriptor() {
  175. ::protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
  176. return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  177. }
  178. const msg_login& msg_login::default_instance() {
  179. ::google::protobuf::internal::InitSCC(&protobuf_msg_2eproto::scc_info_msg_login.base);
  180. return *internal_default_instance();
  181. }
  182. void msg_login::Clear() {
  183. // @@protoc_insertion_point(message_clear_start:msg_login)
  184. ::google::protobuf::uint32 cached_has_bits = 0;
  185. // Prevent compiler warnings about cached_has_bits being unused
  186. (void) cached_has_bits;
  187. phone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  188. passwrod_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  189. system_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  190. _internal_metadata_.Clear();
  191. }
  192. bool msg_login::MergePartialFromCodedStream(
  193. ::google::protobuf::io::CodedInputStream* input) {
  194. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  195. ::google::protobuf::uint32 tag;
  196. // @@protoc_insertion_point(parse_start:msg_login)
  197. for (;;) {
  198. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  199. tag = p.first;
  200. if (!p.second) goto handle_unusual;
  201. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  202. // string phone = 1;
  203. case 1: {
  204. if (static_cast< ::google::protobuf::uint8>(tag) ==
  205. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  206. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  207. input, this->mutable_phone()));
  208. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  209. this->phone().data(), static_cast<int>(this->phone().length()),
  210. ::google::protobuf::internal::WireFormatLite::PARSE,
  211. "msg_login.phone"));
  212. } else {
  213. goto handle_unusual;
  214. }
  215. break;
  216. }
  217. // string passwrod = 2;
  218. case 2: {
  219. if (static_cast< ::google::protobuf::uint8>(tag) ==
  220. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  221. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  222. input, this->mutable_passwrod()));
  223. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  224. this->passwrod().data(), static_cast<int>(this->passwrod().length()),
  225. ::google::protobuf::internal::WireFormatLite::PARSE,
  226. "msg_login.passwrod"));
  227. } else {
  228. goto handle_unusual;
  229. }
  230. break;
  231. }
  232. // string system = 3;
  233. case 3: {
  234. if (static_cast< ::google::protobuf::uint8>(tag) ==
  235. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  236. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  237. input, this->mutable_system()));
  238. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  239. this->system().data(), static_cast<int>(this->system().length()),
  240. ::google::protobuf::internal::WireFormatLite::PARSE,
  241. "msg_login.system"));
  242. } else {
  243. goto handle_unusual;
  244. }
  245. break;
  246. }
  247. default: {
  248. handle_unusual:
  249. if (tag == 0) {
  250. goto success;
  251. }
  252. DO_(::google::protobuf::internal::WireFormat::SkipField(
  253. input, tag, _internal_metadata_.mutable_unknown_fields()));
  254. break;
  255. }
  256. }
  257. }
  258. success:
  259. // @@protoc_insertion_point(parse_success:msg_login)
  260. return true;
  261. failure:
  262. // @@protoc_insertion_point(parse_failure:msg_login)
  263. return false;
  264. #undef DO_
  265. }
  266. void msg_login::SerializeWithCachedSizes(
  267. ::google::protobuf::io::CodedOutputStream* output) const {
  268. // @@protoc_insertion_point(serialize_start:msg_login)
  269. ::google::protobuf::uint32 cached_has_bits = 0;
  270. (void) cached_has_bits;
  271. // string phone = 1;
  272. if (this->phone().size() > 0) {
  273. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  274. this->phone().data(), static_cast<int>(this->phone().length()),
  275. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  276. "msg_login.phone");
  277. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  278. 1, this->phone(), output);
  279. }
  280. // string passwrod = 2;
  281. if (this->passwrod().size() > 0) {
  282. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  283. this->passwrod().data(), static_cast<int>(this->passwrod().length()),
  284. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  285. "msg_login.passwrod");
  286. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  287. 2, this->passwrod(), output);
  288. }
  289. // string system = 3;
  290. if (this->system().size() > 0) {
  291. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  292. this->system().data(), static_cast<int>(this->system().length()),
  293. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  294. "msg_login.system");
  295. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  296. 3, this->system(), output);
  297. }
  298. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  299. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  300. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  301. }
  302. // @@protoc_insertion_point(serialize_end:msg_login)
  303. }
  304. ::google::protobuf::uint8* msg_login::InternalSerializeWithCachedSizesToArray(
  305. bool deterministic, ::google::protobuf::uint8* target) const {
  306. (void)deterministic; // Unused
  307. // @@protoc_insertion_point(serialize_to_array_start:msg_login)
  308. ::google::protobuf::uint32 cached_has_bits = 0;
  309. (void) cached_has_bits;
  310. // string phone = 1;
  311. if (this->phone().size() > 0) {
  312. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  313. this->phone().data(), static_cast<int>(this->phone().length()),
  314. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  315. "msg_login.phone");
  316. target =
  317. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  318. 1, this->phone(), target);
  319. }
  320. // string passwrod = 2;
  321. if (this->passwrod().size() > 0) {
  322. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  323. this->passwrod().data(), static_cast<int>(this->passwrod().length()),
  324. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  325. "msg_login.passwrod");
  326. target =
  327. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  328. 2, this->passwrod(), target);
  329. }
  330. // string system = 3;
  331. if (this->system().size() > 0) {
  332. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  333. this->system().data(), static_cast<int>(this->system().length()),
  334. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  335. "msg_login.system");
  336. target =
  337. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  338. 3, this->system(), target);
  339. }
  340. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  341. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  342. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  343. }
  344. // @@protoc_insertion_point(serialize_to_array_end:msg_login)
  345. return target;
  346. }
  347. size_t msg_login::ByteSizeLong() const {
  348. // @@protoc_insertion_point(message_byte_size_start:msg_login)
  349. size_t total_size = 0;
  350. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  351. total_size +=
  352. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  353. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  354. }
  355. // string phone = 1;
  356. if (this->phone().size() > 0) {
  357. total_size += 1 +
  358. ::google::protobuf::internal::WireFormatLite::StringSize(
  359. this->phone());
  360. }
  361. // string passwrod = 2;
  362. if (this->passwrod().size() > 0) {
  363. total_size += 1 +
  364. ::google::protobuf::internal::WireFormatLite::StringSize(
  365. this->passwrod());
  366. }
  367. // string system = 3;
  368. if (this->system().size() > 0) {
  369. total_size += 1 +
  370. ::google::protobuf::internal::WireFormatLite::StringSize(
  371. this->system());
  372. }
  373. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  374. SetCachedSize(cached_size);
  375. return total_size;
  376. }
  377. void msg_login::MergeFrom(const ::google::protobuf::Message& from) {
  378. // @@protoc_insertion_point(generalized_merge_from_start:msg_login)
  379. GOOGLE_DCHECK_NE(&from, this);
  380. const msg_login* source =
  381. ::google::protobuf::internal::DynamicCastToGenerated<const msg_login>(
  382. &from);
  383. if (source == NULL) {
  384. // @@protoc_insertion_point(generalized_merge_from_cast_fail:msg_login)
  385. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  386. } else {
  387. // @@protoc_insertion_point(generalized_merge_from_cast_success:msg_login)
  388. MergeFrom(*source);
  389. }
  390. }
  391. void msg_login::MergeFrom(const msg_login& from) {
  392. // @@protoc_insertion_point(class_specific_merge_from_start:msg_login)
  393. GOOGLE_DCHECK_NE(&from, this);
  394. _internal_metadata_.MergeFrom(from._internal_metadata_);
  395. ::google::protobuf::uint32 cached_has_bits = 0;
  396. (void) cached_has_bits;
  397. if (from.phone().size() > 0) {
  398. phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
  399. }
  400. if (from.passwrod().size() > 0) {
  401. passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
  402. }
  403. if (from.system().size() > 0) {
  404. system_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.system_);
  405. }
  406. }
  407. void msg_login::CopyFrom(const ::google::protobuf::Message& from) {
  408. // @@protoc_insertion_point(generalized_copy_from_start:msg_login)
  409. if (&from == this) return;
  410. Clear();
  411. MergeFrom(from);
  412. }
  413. void msg_login::CopyFrom(const msg_login& from) {
  414. // @@protoc_insertion_point(class_specific_copy_from_start:msg_login)
  415. if (&from == this) return;
  416. Clear();
  417. MergeFrom(from);
  418. }
  419. bool msg_login::IsInitialized() const {
  420. return true;
  421. }
  422. void msg_login::Swap(msg_login* other) {
  423. if (other == this) return;
  424. InternalSwap(other);
  425. }
  426. void msg_login::InternalSwap(msg_login* other) {
  427. using std::swap;
  428. phone_.Swap(&other->phone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  429. GetArenaNoVirtual());
  430. passwrod_.Swap(&other->passwrod_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  431. GetArenaNoVirtual());
  432. system_.Swap(&other->system_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  433. GetArenaNoVirtual());
  434. _internal_metadata_.Swap(&other->_internal_metadata_);
  435. }
  436. ::google::protobuf::Metadata msg_login::GetMetadata() const {
  437. protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
  438. return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages];
  439. }
  440. // ===================================================================
  441. void msg_register::InitAsDefaultInstance() {
  442. }
  443. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  444. const int msg_register::kPhoneFieldNumber;
  445. const int msg_register::kNameFieldNumber;
  446. const int msg_register::kGenderFieldNumber;
  447. const int msg_register::kPasswrodFieldNumber;
  448. const int msg_register::kVcodeFieldNumber;
  449. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  450. msg_register::msg_register()
  451. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  452. ::google::protobuf::internal::InitSCC(
  453. &protobuf_msg_2eproto::scc_info_msg_register.base);
  454. SharedCtor();
  455. // @@protoc_insertion_point(constructor:msg_register)
  456. }
  457. msg_register::msg_register(const msg_register& from)
  458. : ::google::protobuf::Message(),
  459. _internal_metadata_(NULL) {
  460. _internal_metadata_.MergeFrom(from._internal_metadata_);
  461. phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  462. if (from.phone().size() > 0) {
  463. phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
  464. }
  465. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  466. if (from.name().size() > 0) {
  467. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  468. }
  469. passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  470. if (from.passwrod().size() > 0) {
  471. passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
  472. }
  473. vcode_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  474. if (from.vcode().size() > 0) {
  475. vcode_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.vcode_);
  476. }
  477. gender_ = from.gender_;
  478. // @@protoc_insertion_point(copy_constructor:msg_register)
  479. }
  480. void msg_register::SharedCtor() {
  481. phone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  482. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  483. passwrod_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  484. vcode_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  485. gender_ = false;
  486. }
  487. msg_register::~msg_register() {
  488. // @@protoc_insertion_point(destructor:msg_register)
  489. SharedDtor();
  490. }
  491. void msg_register::SharedDtor() {
  492. phone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  493. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  494. passwrod_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  495. vcode_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  496. }
  497. void msg_register::SetCachedSize(int size) const {
  498. _cached_size_.Set(size);
  499. }
  500. const ::google::protobuf::Descriptor* msg_register::descriptor() {
  501. ::protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
  502. return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  503. }
  504. const msg_register& msg_register::default_instance() {
  505. ::google::protobuf::internal::InitSCC(&protobuf_msg_2eproto::scc_info_msg_register.base);
  506. return *internal_default_instance();
  507. }
  508. void msg_register::Clear() {
  509. // @@protoc_insertion_point(message_clear_start:msg_register)
  510. ::google::protobuf::uint32 cached_has_bits = 0;
  511. // Prevent compiler warnings about cached_has_bits being unused
  512. (void) cached_has_bits;
  513. phone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  514. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  515. passwrod_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  516. vcode_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  517. gender_ = false;
  518. _internal_metadata_.Clear();
  519. }
  520. bool msg_register::MergePartialFromCodedStream(
  521. ::google::protobuf::io::CodedInputStream* input) {
  522. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  523. ::google::protobuf::uint32 tag;
  524. // @@protoc_insertion_point(parse_start:msg_register)
  525. for (;;) {
  526. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  527. tag = p.first;
  528. if (!p.second) goto handle_unusual;
  529. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  530. // string phone = 1;
  531. case 1: {
  532. if (static_cast< ::google::protobuf::uint8>(tag) ==
  533. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  534. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  535. input, this->mutable_phone()));
  536. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  537. this->phone().data(), static_cast<int>(this->phone().length()),
  538. ::google::protobuf::internal::WireFormatLite::PARSE,
  539. "msg_register.phone"));
  540. } else {
  541. goto handle_unusual;
  542. }
  543. break;
  544. }
  545. // string name = 2;
  546. case 2: {
  547. if (static_cast< ::google::protobuf::uint8>(tag) ==
  548. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  549. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  550. input, this->mutable_name()));
  551. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  552. this->name().data(), static_cast<int>(this->name().length()),
  553. ::google::protobuf::internal::WireFormatLite::PARSE,
  554. "msg_register.name"));
  555. } else {
  556. goto handle_unusual;
  557. }
  558. break;
  559. }
  560. // bool gender = 3;
  561. case 3: {
  562. if (static_cast< ::google::protobuf::uint8>(tag) ==
  563. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  564. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  565. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  566. input, &gender_)));
  567. } else {
  568. goto handle_unusual;
  569. }
  570. break;
  571. }
  572. // string passwrod = 4;
  573. case 4: {
  574. if (static_cast< ::google::protobuf::uint8>(tag) ==
  575. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  576. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  577. input, this->mutable_passwrod()));
  578. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  579. this->passwrod().data(), static_cast<int>(this->passwrod().length()),
  580. ::google::protobuf::internal::WireFormatLite::PARSE,
  581. "msg_register.passwrod"));
  582. } else {
  583. goto handle_unusual;
  584. }
  585. break;
  586. }
  587. // string vcode = 5;
  588. case 5: {
  589. if (static_cast< ::google::protobuf::uint8>(tag) ==
  590. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  591. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  592. input, this->mutable_vcode()));
  593. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  594. this->vcode().data(), static_cast<int>(this->vcode().length()),
  595. ::google::protobuf::internal::WireFormatLite::PARSE,
  596. "msg_register.vcode"));
  597. } else {
  598. goto handle_unusual;
  599. }
  600. break;
  601. }
  602. default: {
  603. handle_unusual:
  604. if (tag == 0) {
  605. goto success;
  606. }
  607. DO_(::google::protobuf::internal::WireFormat::SkipField(
  608. input, tag, _internal_metadata_.mutable_unknown_fields()));
  609. break;
  610. }
  611. }
  612. }
  613. success:
  614. // @@protoc_insertion_point(parse_success:msg_register)
  615. return true;
  616. failure:
  617. // @@protoc_insertion_point(parse_failure:msg_register)
  618. return false;
  619. #undef DO_
  620. }
  621. void msg_register::SerializeWithCachedSizes(
  622. ::google::protobuf::io::CodedOutputStream* output) const {
  623. // @@protoc_insertion_point(serialize_start:msg_register)
  624. ::google::protobuf::uint32 cached_has_bits = 0;
  625. (void) cached_has_bits;
  626. // string phone = 1;
  627. if (this->phone().size() > 0) {
  628. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  629. this->phone().data(), static_cast<int>(this->phone().length()),
  630. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  631. "msg_register.phone");
  632. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  633. 1, this->phone(), output);
  634. }
  635. // string name = 2;
  636. if (this->name().size() > 0) {
  637. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  638. this->name().data(), static_cast<int>(this->name().length()),
  639. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  640. "msg_register.name");
  641. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  642. 2, this->name(), output);
  643. }
  644. // bool gender = 3;
  645. if (this->gender() != 0) {
  646. ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->gender(), output);
  647. }
  648. // string passwrod = 4;
  649. if (this->passwrod().size() > 0) {
  650. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  651. this->passwrod().data(), static_cast<int>(this->passwrod().length()),
  652. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  653. "msg_register.passwrod");
  654. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  655. 4, this->passwrod(), output);
  656. }
  657. // string vcode = 5;
  658. if (this->vcode().size() > 0) {
  659. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  660. this->vcode().data(), static_cast<int>(this->vcode().length()),
  661. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  662. "msg_register.vcode");
  663. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  664. 5, this->vcode(), output);
  665. }
  666. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  667. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  668. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  669. }
  670. // @@protoc_insertion_point(serialize_end:msg_register)
  671. }
  672. ::google::protobuf::uint8* msg_register::InternalSerializeWithCachedSizesToArray(
  673. bool deterministic, ::google::protobuf::uint8* target) const {
  674. (void)deterministic; // Unused
  675. // @@protoc_insertion_point(serialize_to_array_start:msg_register)
  676. ::google::protobuf::uint32 cached_has_bits = 0;
  677. (void) cached_has_bits;
  678. // string phone = 1;
  679. if (this->phone().size() > 0) {
  680. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  681. this->phone().data(), static_cast<int>(this->phone().length()),
  682. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  683. "msg_register.phone");
  684. target =
  685. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  686. 1, this->phone(), target);
  687. }
  688. // string name = 2;
  689. if (this->name().size() > 0) {
  690. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  691. this->name().data(), static_cast<int>(this->name().length()),
  692. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  693. "msg_register.name");
  694. target =
  695. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  696. 2, this->name(), target);
  697. }
  698. // bool gender = 3;
  699. if (this->gender() != 0) {
  700. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->gender(), target);
  701. }
  702. // string passwrod = 4;
  703. if (this->passwrod().size() > 0) {
  704. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  705. this->passwrod().data(), static_cast<int>(this->passwrod().length()),
  706. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  707. "msg_register.passwrod");
  708. target =
  709. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  710. 4, this->passwrod(), target);
  711. }
  712. // string vcode = 5;
  713. if (this->vcode().size() > 0) {
  714. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  715. this->vcode().data(), static_cast<int>(this->vcode().length()),
  716. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  717. "msg_register.vcode");
  718. target =
  719. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  720. 5, this->vcode(), target);
  721. }
  722. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  723. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  724. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  725. }
  726. // @@protoc_insertion_point(serialize_to_array_end:msg_register)
  727. return target;
  728. }
  729. size_t msg_register::ByteSizeLong() const {
  730. // @@protoc_insertion_point(message_byte_size_start:msg_register)
  731. size_t total_size = 0;
  732. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  733. total_size +=
  734. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  735. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  736. }
  737. // string phone = 1;
  738. if (this->phone().size() > 0) {
  739. total_size += 1 +
  740. ::google::protobuf::internal::WireFormatLite::StringSize(
  741. this->phone());
  742. }
  743. // string name = 2;
  744. if (this->name().size() > 0) {
  745. total_size += 1 +
  746. ::google::protobuf::internal::WireFormatLite::StringSize(
  747. this->name());
  748. }
  749. // string passwrod = 4;
  750. if (this->passwrod().size() > 0) {
  751. total_size += 1 +
  752. ::google::protobuf::internal::WireFormatLite::StringSize(
  753. this->passwrod());
  754. }
  755. // string vcode = 5;
  756. if (this->vcode().size() > 0) {
  757. total_size += 1 +
  758. ::google::protobuf::internal::WireFormatLite::StringSize(
  759. this->vcode());
  760. }
  761. // bool gender = 3;
  762. if (this->gender() != 0) {
  763. total_size += 1 + 1;
  764. }
  765. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  766. SetCachedSize(cached_size);
  767. return total_size;
  768. }
  769. void msg_register::MergeFrom(const ::google::protobuf::Message& from) {
  770. // @@protoc_insertion_point(generalized_merge_from_start:msg_register)
  771. GOOGLE_DCHECK_NE(&from, this);
  772. const msg_register* source =
  773. ::google::protobuf::internal::DynamicCastToGenerated<const msg_register>(
  774. &from);
  775. if (source == NULL) {
  776. // @@protoc_insertion_point(generalized_merge_from_cast_fail:msg_register)
  777. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  778. } else {
  779. // @@protoc_insertion_point(generalized_merge_from_cast_success:msg_register)
  780. MergeFrom(*source);
  781. }
  782. }
  783. void msg_register::MergeFrom(const msg_register& from) {
  784. // @@protoc_insertion_point(class_specific_merge_from_start:msg_register)
  785. GOOGLE_DCHECK_NE(&from, this);
  786. _internal_metadata_.MergeFrom(from._internal_metadata_);
  787. ::google::protobuf::uint32 cached_has_bits = 0;
  788. (void) cached_has_bits;
  789. if (from.phone().size() > 0) {
  790. phone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.phone_);
  791. }
  792. if (from.name().size() > 0) {
  793. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  794. }
  795. if (from.passwrod().size() > 0) {
  796. passwrod_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.passwrod_);
  797. }
  798. if (from.vcode().size() > 0) {
  799. vcode_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.vcode_);
  800. }
  801. if (from.gender() != 0) {
  802. set_gender(from.gender());
  803. }
  804. }
  805. void msg_register::CopyFrom(const ::google::protobuf::Message& from) {
  806. // @@protoc_insertion_point(generalized_copy_from_start:msg_register)
  807. if (&from == this) return;
  808. Clear();
  809. MergeFrom(from);
  810. }
  811. void msg_register::CopyFrom(const msg_register& from) {
  812. // @@protoc_insertion_point(class_specific_copy_from_start:msg_register)
  813. if (&from == this) return;
  814. Clear();
  815. MergeFrom(from);
  816. }
  817. bool msg_register::IsInitialized() const {
  818. return true;
  819. }
  820. void msg_register::Swap(msg_register* other) {
  821. if (other == this) return;
  822. InternalSwap(other);
  823. }
  824. void msg_register::InternalSwap(msg_register* other) {
  825. using std::swap;
  826. phone_.Swap(&other->phone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  827. GetArenaNoVirtual());
  828. name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  829. GetArenaNoVirtual());
  830. passwrod_.Swap(&other->passwrod_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  831. GetArenaNoVirtual());
  832. vcode_.Swap(&other->vcode_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  833. GetArenaNoVirtual());
  834. swap(gender_, other->gender_);
  835. _internal_metadata_.Swap(&other->_internal_metadata_);
  836. }
  837. ::google::protobuf::Metadata msg_register::GetMetadata() const {
  838. protobuf_msg_2eproto::protobuf_AssignDescriptorsOnce();
  839. return ::protobuf_msg_2eproto::file_level_metadata[kIndexInFileMessages];
  840. }
  841. // @@protoc_insertion_point(namespace_scope)
  842. namespace google {
  843. namespace protobuf {
  844. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::msg_login* Arena::CreateMaybeMessage< ::msg_login >(Arena* arena) {
  845. return Arena::CreateInternal< ::msg_login >(arena);
  846. }
  847. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::msg_register* Arena::CreateMaybeMessage< ::msg_register >(Arena* arena) {
  848. return Arena::CreateInternal< ::msg_register >(arena);
  849. }
  850. } // namespace protobuf
  851. } // namespace google
  852. // @@protoc_insertion_point(global_scope)