You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Message2Server.pb.cc 72 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: Message2Server.proto
  3. #include "Message2Server.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/io/coded_stream.h>
  6. #include <google/protobuf/extension_set.h>
  7. #include <google/protobuf/wire_format_lite.h>
  8. #include <google/protobuf/descriptor.h>
  9. #include <google/protobuf/generated_message_reflection.h>
  10. #include <google/protobuf/reflection_ops.h>
  11. #include <google/protobuf/wire_format.h>
  12. // @@protoc_insertion_point(includes)
  13. #include <google/protobuf/port_def.inc>
  14. PROTOBUF_PRAGMA_INIT_SEG
  15. namespace _pb = ::PROTOBUF_NAMESPACE_ID;
  16. namespace _pbi = _pb::internal;
  17. namespace protobuf
  18. {
  19. PROTOBUF_CONSTEXPR PlayerMsg::PlayerMsg(
  20. ::_pbi::ConstantInitialized
  21. ) :
  22. _impl_{
  23. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.job_type_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}}
  24. {
  25. }
  26. struct PlayerMsgDefaultTypeInternal
  27. {
  28. PROTOBUF_CONSTEXPR PlayerMsgDefaultTypeInternal() :
  29. _instance(::_pbi::ConstantInitialized{})
  30. {
  31. }
  32. ~PlayerMsgDefaultTypeInternal()
  33. {
  34. }
  35. union
  36. {
  37. PlayerMsg _instance;
  38. };
  39. };
  40. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlayerMsgDefaultTypeInternal _PlayerMsg_default_instance_;
  41. PROTOBUF_CONSTEXPR MoveMsg::MoveMsg(
  42. ::_pbi::ConstantInitialized
  43. ) :
  44. _impl_{
  45. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_.time_in_milliseconds_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}}
  46. {
  47. }
  48. struct MoveMsgDefaultTypeInternal
  49. {
  50. PROTOBUF_CONSTEXPR MoveMsgDefaultTypeInternal() :
  51. _instance(::_pbi::ConstantInitialized{})
  52. {
  53. }
  54. ~MoveMsgDefaultTypeInternal()
  55. {
  56. }
  57. union
  58. {
  59. MoveMsg _instance;
  60. };
  61. };
  62. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MoveMsgDefaultTypeInternal _MoveMsg_default_instance_;
  63. PROTOBUF_CONSTEXPR PickMsg::PickMsg(
  64. ::_pbi::ConstantInitialized
  65. ) :
  66. _impl_{
  67. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.prop_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  68. {
  69. }
  70. struct PickMsgDefaultTypeInternal
  71. {
  72. PROTOBUF_CONSTEXPR PickMsgDefaultTypeInternal() :
  73. _instance(::_pbi::ConstantInitialized{})
  74. {
  75. }
  76. ~PickMsgDefaultTypeInternal()
  77. {
  78. }
  79. union
  80. {
  81. PickMsg _instance;
  82. };
  83. };
  84. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PickMsgDefaultTypeInternal _PickMsg_default_instance_;
  85. PROTOBUF_CONSTEXPR SendMsg::SendMsg(
  86. ::_pbi::ConstantInitialized
  87. ) :
  88. _impl_{
  89. /*decltype(_impl_.message_)*/ {&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.to_player_id_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}}
  90. {
  91. }
  92. struct SendMsgDefaultTypeInternal
  93. {
  94. PROTOBUF_CONSTEXPR SendMsgDefaultTypeInternal() :
  95. _instance(::_pbi::ConstantInitialized{})
  96. {
  97. }
  98. ~SendMsgDefaultTypeInternal()
  99. {
  100. }
  101. union
  102. {
  103. SendMsg _instance;
  104. };
  105. };
  106. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SendMsgDefaultTypeInternal _SendMsg_default_instance_;
  107. PROTOBUF_CONSTEXPR AttackMsg::AttackMsg(
  108. ::_pbi::ConstantInitialized
  109. ) :
  110. _impl_{
  111. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  112. {
  113. }
  114. struct AttackMsgDefaultTypeInternal
  115. {
  116. PROTOBUF_CONSTEXPR AttackMsgDefaultTypeInternal() :
  117. _instance(::_pbi::ConstantInitialized{})
  118. {
  119. }
  120. ~AttackMsgDefaultTypeInternal()
  121. {
  122. }
  123. union
  124. {
  125. AttackMsg _instance;
  126. };
  127. };
  128. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AttackMsgDefaultTypeInternal _AttackMsg_default_instance_;
  129. PROTOBUF_CONSTEXPR IDMsg::IDMsg(
  130. ::_pbi::ConstantInitialized
  131. ) :
  132. _impl_{
  133. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}}
  134. {
  135. }
  136. struct IDMsgDefaultTypeInternal
  137. {
  138. PROTOBUF_CONSTEXPR IDMsgDefaultTypeInternal() :
  139. _instance(::_pbi::ConstantInitialized{})
  140. {
  141. }
  142. ~IDMsgDefaultTypeInternal()
  143. {
  144. }
  145. union
  146. {
  147. IDMsg _instance;
  148. };
  149. };
  150. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IDMsgDefaultTypeInternal _IDMsg_default_instance_;
  151. } // namespace protobuf
  152. static ::_pb::Metadata file_level_metadata_Message2Server_2eproto[6];
  153. static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_Message2Server_2eproto = nullptr;
  154. static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_Message2Server_2eproto = nullptr;
  155. const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  156. ~0u, // no _has_bits_
  157. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _internal_metadata_),
  158. ~0u, // no _extensions_
  159. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_._oneof_case_[0]),
  160. ~0u, // no _weak_field_map_
  161. ~0u, // no _inlined_string_donated_
  162. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.player_id_),
  163. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.player_type_),
  164. ::_pbi::kInvalidFieldOffsetTag,
  165. ::_pbi::kInvalidFieldOffsetTag,
  166. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.job_type_),
  167. ~0u, // no _has_bits_
  168. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _internal_metadata_),
  169. ~0u, // no _extensions_
  170. ~0u, // no _oneof_case_
  171. ~0u, // no _weak_field_map_
  172. ~0u, // no _inlined_string_donated_
  173. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.player_id_),
  174. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.angle_),
  175. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.time_in_milliseconds_),
  176. ~0u, // no _has_bits_
  177. PROTOBUF_FIELD_OFFSET(::protobuf::PickMsg, _internal_metadata_),
  178. ~0u, // no _extensions_
  179. ~0u, // no _oneof_case_
  180. ~0u, // no _weak_field_map_
  181. ~0u, // no _inlined_string_donated_
  182. PROTOBUF_FIELD_OFFSET(::protobuf::PickMsg, _impl_.player_id_),
  183. PROTOBUF_FIELD_OFFSET(::protobuf::PickMsg, _impl_.prop_type_),
  184. ~0u, // no _has_bits_
  185. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _internal_metadata_),
  186. ~0u, // no _extensions_
  187. ~0u, // no _oneof_case_
  188. ~0u, // no _weak_field_map_
  189. ~0u, // no _inlined_string_donated_
  190. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.player_id_),
  191. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.to_player_id_),
  192. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.message_),
  193. ~0u, // no _has_bits_
  194. PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _internal_metadata_),
  195. ~0u, // no _extensions_
  196. ~0u, // no _oneof_case_
  197. ~0u, // no _weak_field_map_
  198. ~0u, // no _inlined_string_donated_
  199. PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.player_id_),
  200. PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.angle_),
  201. ~0u, // no _has_bits_
  202. PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _internal_metadata_),
  203. ~0u, // no _extensions_
  204. ~0u, // no _oneof_case_
  205. ~0u, // no _weak_field_map_
  206. ~0u, // no _inlined_string_donated_
  207. PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _impl_.player_id_),
  208. };
  209. static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  210. {0, -1, -1, sizeof(::protobuf::PlayerMsg)},
  211. {11, -1, -1, sizeof(::protobuf::MoveMsg)},
  212. {20, -1, -1, sizeof(::protobuf::PickMsg)},
  213. {28, -1, -1, sizeof(::protobuf::SendMsg)},
  214. {37, -1, -1, sizeof(::protobuf::AttackMsg)},
  215. {45, -1, -1, sizeof(::protobuf::IDMsg)},
  216. };
  217. static const ::_pb::Message* const file_default_instances[] = {
  218. &::protobuf::_PlayerMsg_default_instance_._instance,
  219. &::protobuf::_MoveMsg_default_instance_._instance,
  220. &::protobuf::_PickMsg_default_instance_._instance,
  221. &::protobuf::_SendMsg_default_instance_._instance,
  222. &::protobuf::_AttackMsg_default_instance_._instance,
  223. &::protobuf::_IDMsg_default_instance_._instance,
  224. };
  225. const char descriptor_table_protodef_Message2Server_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  226. "\n\024Message2Server.proto\022\010protobuf\032\021Messag"
  227. "eType.proto\"\257\001\n\tPlayerMsg\022\021\n\tplayer_id\030\001"
  228. " \001(\003\022)\n\013player_type\030\002 \001(\0162\024.protobuf.Pla"
  229. "yerType\022)\n\nhuman_type\030\003 \001(\0162\023.protobuf.H"
  230. "umanTypeH\000\022-\n\014butcher_type\030\004 \001(\0162\025.proto"
  231. "buf.ButcherTypeH\000B\n\n\010job_type\"I\n\007MoveMsg"
  232. "\022\021\n\tplayer_id\030\001 \001(\003\022\r\n\005angle\030\002 \001(\001\022\034\n\024ti"
  233. "me_in_milliseconds\030\003 \001(\003\"C\n\007PickMsg\022\021\n\tp"
  234. "layer_id\030\001 \001(\003\022%\n\tprop_type\030\002 \001(\0162\022.prot"
  235. "obuf.PropType\"C\n\007SendMsg\022\021\n\tplayer_id\030\001 "
  236. "\001(\003\022\024\n\014to_player_id\030\002 \001(\003\022\017\n\007message\030\003 \001"
  237. "(\t\"-\n\tAttackMsg\022\021\n\tplayer_id\030\001 \001(\003\022\r\n\005an"
  238. "gle\030\002 \001(\001\"\032\n\005IDMsg\022\021\n\tplayer_id\030\001 \001(\003b\006p"
  239. "roto3";
  240. static const ::_pbi::DescriptorTable* const descriptor_table_Message2Server_2eproto_deps[1] = {
  241. &::descriptor_table_MessageType_2eproto,
  242. };
  243. static ::_pbi::once_flag descriptor_table_Message2Server_2eproto_once;
  244. const ::_pbi::DescriptorTable descriptor_table_Message2Server_2eproto = {
  245. false,
  246. false,
  247. 525,
  248. descriptor_table_protodef_Message2Server_2eproto,
  249. "Message2Server.proto",
  250. &descriptor_table_Message2Server_2eproto_once,
  251. descriptor_table_Message2Server_2eproto_deps,
  252. 1,
  253. 6,
  254. schemas,
  255. file_default_instances,
  256. TableStruct_Message2Server_2eproto::offsets,
  257. file_level_metadata_Message2Server_2eproto,
  258. file_level_enum_descriptors_Message2Server_2eproto,
  259. file_level_service_descriptors_Message2Server_2eproto,
  260. };
  261. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_Message2Server_2eproto_getter()
  262. {
  263. return &descriptor_table_Message2Server_2eproto;
  264. }
  265. // Force running AddDescriptors() at dynamic initialization time.
  266. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_Message2Server_2eproto(&descriptor_table_Message2Server_2eproto);
  267. namespace protobuf
  268. {
  269. // ===================================================================
  270. class PlayerMsg::_Internal
  271. {
  272. public:
  273. };
  274. PlayerMsg::PlayerMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  275. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  276. {
  277. SharedCtor(arena, is_message_owned);
  278. // @@protoc_insertion_point(arena_constructor:protobuf.PlayerMsg)
  279. }
  280. PlayerMsg::PlayerMsg(const PlayerMsg& from) :
  281. ::PROTOBUF_NAMESPACE_ID::Message()
  282. {
  283. PlayerMsg* const _this = this;
  284. (void)_this;
  285. new (&_impl_) Impl_{
  286. decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.job_type_){}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}};
  287. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  288. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  289. clear_has_job_type();
  290. switch (from.job_type_case())
  291. {
  292. case kHumanType:
  293. {
  294. _this->_internal_set_human_type(from._internal_human_type());
  295. break;
  296. }
  297. case kButcherType:
  298. {
  299. _this->_internal_set_butcher_type(from._internal_butcher_type());
  300. break;
  301. }
  302. case JOB_TYPE_NOT_SET:
  303. {
  304. break;
  305. }
  306. }
  307. // @@protoc_insertion_point(copy_constructor:protobuf.PlayerMsg)
  308. }
  309. inline void PlayerMsg::SharedCtor(
  310. ::_pb::Arena* arena, bool is_message_owned
  311. )
  312. {
  313. (void)arena;
  314. (void)is_message_owned;
  315. new (&_impl_) Impl_{
  316. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.job_type_){}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}};
  317. clear_has_job_type();
  318. }
  319. PlayerMsg::~PlayerMsg()
  320. {
  321. // @@protoc_insertion_point(destructor:protobuf.PlayerMsg)
  322. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  323. {
  324. (void)arena;
  325. return;
  326. }
  327. SharedDtor();
  328. }
  329. inline void PlayerMsg::SharedDtor()
  330. {
  331. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  332. if (has_job_type())
  333. {
  334. clear_job_type();
  335. }
  336. }
  337. void PlayerMsg::SetCachedSize(int size) const
  338. {
  339. _impl_._cached_size_.Set(size);
  340. }
  341. void PlayerMsg::clear_job_type()
  342. {
  343. // @@protoc_insertion_point(one_of_clear_start:protobuf.PlayerMsg)
  344. switch (job_type_case())
  345. {
  346. case kHumanType:
  347. {
  348. // No need to clear
  349. break;
  350. }
  351. case kButcherType:
  352. {
  353. // No need to clear
  354. break;
  355. }
  356. case JOB_TYPE_NOT_SET:
  357. {
  358. break;
  359. }
  360. }
  361. _impl_._oneof_case_[0] = JOB_TYPE_NOT_SET;
  362. }
  363. void PlayerMsg::Clear()
  364. {
  365. // @@protoc_insertion_point(message_clear_start:protobuf.PlayerMsg)
  366. uint32_t cached_has_bits = 0;
  367. // Prevent compiler warnings about cached_has_bits being unused
  368. (void)cached_has_bits;
  369. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  370. clear_job_type();
  371. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  372. }
  373. const char* PlayerMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  374. {
  375. #define CHK_(x) \
  376. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  377. goto failure
  378. while (!ctx->Done(&ptr))
  379. {
  380. uint32_t tag;
  381. ptr = ::_pbi::ReadTag(ptr, &tag);
  382. switch (tag >> 3)
  383. {
  384. // int64 player_id = 1;
  385. case 1:
  386. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  387. {
  388. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  389. CHK_(ptr);
  390. }
  391. else
  392. goto handle_unusual;
  393. continue;
  394. // .protobuf.PlayerType player_type = 2;
  395. case 2:
  396. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  397. {
  398. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  399. CHK_(ptr);
  400. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  401. }
  402. else
  403. goto handle_unusual;
  404. continue;
  405. // .protobuf.HumanType human_type = 3;
  406. case 3:
  407. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
  408. {
  409. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  410. CHK_(ptr);
  411. _internal_set_human_type(static_cast<::protobuf::HumanType>(val));
  412. }
  413. else
  414. goto handle_unusual;
  415. continue;
  416. // .protobuf.ButcherType butcher_type = 4;
  417. case 4:
  418. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32))
  419. {
  420. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  421. CHK_(ptr);
  422. _internal_set_butcher_type(static_cast<::protobuf::ButcherType>(val));
  423. }
  424. else
  425. goto handle_unusual;
  426. continue;
  427. default:
  428. goto handle_unusual;
  429. } // switch
  430. handle_unusual:
  431. if ((tag == 0) || ((tag & 7) == 4))
  432. {
  433. CHK_(ptr);
  434. ctx->SetLastTag(tag);
  435. goto message_done;
  436. }
  437. ptr = UnknownFieldParse(
  438. tag,
  439. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  440. ptr,
  441. ctx
  442. );
  443. CHK_(ptr != nullptr);
  444. } // while
  445. message_done:
  446. return ptr;
  447. failure:
  448. ptr = nullptr;
  449. goto message_done;
  450. #undef CHK_
  451. }
  452. uint8_t* PlayerMsg::_InternalSerialize(
  453. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  454. ) const
  455. {
  456. // @@protoc_insertion_point(serialize_to_array_start:protobuf.PlayerMsg)
  457. uint32_t cached_has_bits = 0;
  458. (void)cached_has_bits;
  459. // int64 player_id = 1;
  460. if (this->_internal_player_id() != 0)
  461. {
  462. target = stream->EnsureSpace(target);
  463. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  464. }
  465. // .protobuf.PlayerType player_type = 2;
  466. if (this->_internal_player_type() != 0)
  467. {
  468. target = stream->EnsureSpace(target);
  469. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  470. 2, this->_internal_player_type(), target
  471. );
  472. }
  473. // .protobuf.HumanType human_type = 3;
  474. if (_internal_has_human_type())
  475. {
  476. target = stream->EnsureSpace(target);
  477. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  478. 3, this->_internal_human_type(), target
  479. );
  480. }
  481. // .protobuf.ButcherType butcher_type = 4;
  482. if (_internal_has_butcher_type())
  483. {
  484. target = stream->EnsureSpace(target);
  485. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  486. 4, this->_internal_butcher_type(), target
  487. );
  488. }
  489. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  490. {
  491. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  492. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  493. );
  494. }
  495. // @@protoc_insertion_point(serialize_to_array_end:protobuf.PlayerMsg)
  496. return target;
  497. }
  498. size_t PlayerMsg::ByteSizeLong() const
  499. {
  500. // @@protoc_insertion_point(message_byte_size_start:protobuf.PlayerMsg)
  501. size_t total_size = 0;
  502. uint32_t cached_has_bits = 0;
  503. // Prevent compiler warnings about cached_has_bits being unused
  504. (void)cached_has_bits;
  505. // int64 player_id = 1;
  506. if (this->_internal_player_id() != 0)
  507. {
  508. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  509. }
  510. // .protobuf.PlayerType player_type = 2;
  511. if (this->_internal_player_type() != 0)
  512. {
  513. total_size += 1 +
  514. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  515. }
  516. switch (job_type_case())
  517. {
  518. // .protobuf.HumanType human_type = 3;
  519. case kHumanType:
  520. {
  521. total_size += 1 +
  522. ::_pbi::WireFormatLite::EnumSize(this->_internal_human_type());
  523. break;
  524. }
  525. // .protobuf.ButcherType butcher_type = 4;
  526. case kButcherType:
  527. {
  528. total_size += 1 +
  529. ::_pbi::WireFormatLite::EnumSize(this->_internal_butcher_type());
  530. break;
  531. }
  532. case JOB_TYPE_NOT_SET:
  533. {
  534. break;
  535. }
  536. }
  537. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  538. }
  539. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PlayerMsg::_class_data_ = {
  540. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  541. PlayerMsg::MergeImpl};
  542. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* PlayerMsg::GetClassData() const
  543. {
  544. return &_class_data_;
  545. }
  546. void PlayerMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  547. {
  548. auto* const _this = static_cast<PlayerMsg*>(&to_msg);
  549. auto& from = static_cast<const PlayerMsg&>(from_msg);
  550. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.PlayerMsg)
  551. GOOGLE_DCHECK_NE(&from, _this);
  552. uint32_t cached_has_bits = 0;
  553. (void)cached_has_bits;
  554. if (from._internal_player_id() != 0)
  555. {
  556. _this->_internal_set_player_id(from._internal_player_id());
  557. }
  558. if (from._internal_player_type() != 0)
  559. {
  560. _this->_internal_set_player_type(from._internal_player_type());
  561. }
  562. switch (from.job_type_case())
  563. {
  564. case kHumanType:
  565. {
  566. _this->_internal_set_human_type(from._internal_human_type());
  567. break;
  568. }
  569. case kButcherType:
  570. {
  571. _this->_internal_set_butcher_type(from._internal_butcher_type());
  572. break;
  573. }
  574. case JOB_TYPE_NOT_SET:
  575. {
  576. break;
  577. }
  578. }
  579. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  580. }
  581. void PlayerMsg::CopyFrom(const PlayerMsg& from)
  582. {
  583. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.PlayerMsg)
  584. if (&from == this)
  585. return;
  586. Clear();
  587. MergeFrom(from);
  588. }
  589. bool PlayerMsg::IsInitialized() const
  590. {
  591. return true;
  592. }
  593. void PlayerMsg::InternalSwap(PlayerMsg* other)
  594. {
  595. using std::swap;
  596. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  597. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  598. PROTOBUF_FIELD_OFFSET(PlayerMsg, _impl_.player_type_) + sizeof(PlayerMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(PlayerMsg, _impl_.player_id_)>(
  599. reinterpret_cast<char*>(&_impl_.player_id_),
  600. reinterpret_cast<char*>(&other->_impl_.player_id_)
  601. );
  602. swap(_impl_.job_type_, other->_impl_.job_type_);
  603. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  604. }
  605. ::PROTOBUF_NAMESPACE_ID::Metadata PlayerMsg::GetMetadata() const
  606. {
  607. return ::_pbi::AssignDescriptors(
  608. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[0]
  609. );
  610. }
  611. // ===================================================================
  612. class MoveMsg::_Internal
  613. {
  614. public:
  615. };
  616. MoveMsg::MoveMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  617. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  618. {
  619. SharedCtor(arena, is_message_owned);
  620. // @@protoc_insertion_point(arena_constructor:protobuf.MoveMsg)
  621. }
  622. MoveMsg::MoveMsg(const MoveMsg& from) :
  623. ::PROTOBUF_NAMESPACE_ID::Message()
  624. {
  625. MoveMsg* const _this = this;
  626. (void)_this;
  627. new (&_impl_) Impl_{
  628. decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, decltype(_impl_.time_in_milliseconds_){}, /*decltype(_impl_._cached_size_)*/ {}};
  629. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  630. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.time_in_milliseconds_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.time_in_milliseconds_));
  631. // @@protoc_insertion_point(copy_constructor:protobuf.MoveMsg)
  632. }
  633. inline void MoveMsg::SharedCtor(
  634. ::_pb::Arena* arena, bool is_message_owned
  635. )
  636. {
  637. (void)arena;
  638. (void)is_message_owned;
  639. new (&_impl_) Impl_{
  640. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, decltype(_impl_.time_in_milliseconds_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}};
  641. }
  642. MoveMsg::~MoveMsg()
  643. {
  644. // @@protoc_insertion_point(destructor:protobuf.MoveMsg)
  645. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  646. {
  647. (void)arena;
  648. return;
  649. }
  650. SharedDtor();
  651. }
  652. inline void MoveMsg::SharedDtor()
  653. {
  654. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  655. }
  656. void MoveMsg::SetCachedSize(int size) const
  657. {
  658. _impl_._cached_size_.Set(size);
  659. }
  660. void MoveMsg::Clear()
  661. {
  662. // @@protoc_insertion_point(message_clear_start:protobuf.MoveMsg)
  663. uint32_t cached_has_bits = 0;
  664. // Prevent compiler warnings about cached_has_bits being unused
  665. (void)cached_has_bits;
  666. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.time_in_milliseconds_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.time_in_milliseconds_));
  667. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  668. }
  669. const char* MoveMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  670. {
  671. #define CHK_(x) \
  672. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  673. goto failure
  674. while (!ctx->Done(&ptr))
  675. {
  676. uint32_t tag;
  677. ptr = ::_pbi::ReadTag(ptr, &tag);
  678. switch (tag >> 3)
  679. {
  680. // int64 player_id = 1;
  681. case 1:
  682. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  683. {
  684. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  685. CHK_(ptr);
  686. }
  687. else
  688. goto handle_unusual;
  689. continue;
  690. // double angle = 2;
  691. case 2:
  692. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17))
  693. {
  694. _impl_.angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
  695. ptr += sizeof(double);
  696. }
  697. else
  698. goto handle_unusual;
  699. continue;
  700. // int64 time_in_milliseconds = 3;
  701. case 3:
  702. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
  703. {
  704. _impl_.time_in_milliseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  705. CHK_(ptr);
  706. }
  707. else
  708. goto handle_unusual;
  709. continue;
  710. default:
  711. goto handle_unusual;
  712. } // switch
  713. handle_unusual:
  714. if ((tag == 0) || ((tag & 7) == 4))
  715. {
  716. CHK_(ptr);
  717. ctx->SetLastTag(tag);
  718. goto message_done;
  719. }
  720. ptr = UnknownFieldParse(
  721. tag,
  722. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  723. ptr,
  724. ctx
  725. );
  726. CHK_(ptr != nullptr);
  727. } // while
  728. message_done:
  729. return ptr;
  730. failure:
  731. ptr = nullptr;
  732. goto message_done;
  733. #undef CHK_
  734. }
  735. uint8_t* MoveMsg::_InternalSerialize(
  736. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  737. ) const
  738. {
  739. // @@protoc_insertion_point(serialize_to_array_start:protobuf.MoveMsg)
  740. uint32_t cached_has_bits = 0;
  741. (void)cached_has_bits;
  742. // int64 player_id = 1;
  743. if (this->_internal_player_id() != 0)
  744. {
  745. target = stream->EnsureSpace(target);
  746. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  747. }
  748. // double angle = 2;
  749. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  750. double tmp_angle = this->_internal_angle();
  751. uint64_t raw_angle;
  752. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  753. if (raw_angle != 0)
  754. {
  755. target = stream->EnsureSpace(target);
  756. target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_angle(), target);
  757. }
  758. // int64 time_in_milliseconds = 3;
  759. if (this->_internal_time_in_milliseconds() != 0)
  760. {
  761. target = stream->EnsureSpace(target);
  762. target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_time_in_milliseconds(), target);
  763. }
  764. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  765. {
  766. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  767. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  768. );
  769. }
  770. // @@protoc_insertion_point(serialize_to_array_end:protobuf.MoveMsg)
  771. return target;
  772. }
  773. size_t MoveMsg::ByteSizeLong() const
  774. {
  775. // @@protoc_insertion_point(message_byte_size_start:protobuf.MoveMsg)
  776. size_t total_size = 0;
  777. uint32_t cached_has_bits = 0;
  778. // Prevent compiler warnings about cached_has_bits being unused
  779. (void)cached_has_bits;
  780. // int64 player_id = 1;
  781. if (this->_internal_player_id() != 0)
  782. {
  783. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  784. }
  785. // double angle = 2;
  786. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  787. double tmp_angle = this->_internal_angle();
  788. uint64_t raw_angle;
  789. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  790. if (raw_angle != 0)
  791. {
  792. total_size += 1 + 8;
  793. }
  794. // int64 time_in_milliseconds = 3;
  795. if (this->_internal_time_in_milliseconds() != 0)
  796. {
  797. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_time_in_milliseconds());
  798. }
  799. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  800. }
  801. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MoveMsg::_class_data_ = {
  802. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  803. MoveMsg::MergeImpl};
  804. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MoveMsg::GetClassData() const
  805. {
  806. return &_class_data_;
  807. }
  808. void MoveMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  809. {
  810. auto* const _this = static_cast<MoveMsg*>(&to_msg);
  811. auto& from = static_cast<const MoveMsg&>(from_msg);
  812. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MoveMsg)
  813. GOOGLE_DCHECK_NE(&from, _this);
  814. uint32_t cached_has_bits = 0;
  815. (void)cached_has_bits;
  816. if (from._internal_player_id() != 0)
  817. {
  818. _this->_internal_set_player_id(from._internal_player_id());
  819. }
  820. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  821. double tmp_angle = from._internal_angle();
  822. uint64_t raw_angle;
  823. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  824. if (raw_angle != 0)
  825. {
  826. _this->_internal_set_angle(from._internal_angle());
  827. }
  828. if (from._internal_time_in_milliseconds() != 0)
  829. {
  830. _this->_internal_set_time_in_milliseconds(from._internal_time_in_milliseconds());
  831. }
  832. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  833. }
  834. void MoveMsg::CopyFrom(const MoveMsg& from)
  835. {
  836. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MoveMsg)
  837. if (&from == this)
  838. return;
  839. Clear();
  840. MergeFrom(from);
  841. }
  842. bool MoveMsg::IsInitialized() const
  843. {
  844. return true;
  845. }
  846. void MoveMsg::InternalSwap(MoveMsg* other)
  847. {
  848. using std::swap;
  849. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  850. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  851. PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.time_in_milliseconds_) + sizeof(MoveMsg::_impl_.time_in_milliseconds_) - PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.player_id_)>(
  852. reinterpret_cast<char*>(&_impl_.player_id_),
  853. reinterpret_cast<char*>(&other->_impl_.player_id_)
  854. );
  855. }
  856. ::PROTOBUF_NAMESPACE_ID::Metadata MoveMsg::GetMetadata() const
  857. {
  858. return ::_pbi::AssignDescriptors(
  859. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[1]
  860. );
  861. }
  862. // ===================================================================
  863. class PickMsg::_Internal
  864. {
  865. public:
  866. };
  867. PickMsg::PickMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  868. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  869. {
  870. SharedCtor(arena, is_message_owned);
  871. // @@protoc_insertion_point(arena_constructor:protobuf.PickMsg)
  872. }
  873. PickMsg::PickMsg(const PickMsg& from) :
  874. ::PROTOBUF_NAMESPACE_ID::Message()
  875. {
  876. PickMsg* const _this = this;
  877. (void)_this;
  878. new (&_impl_) Impl_{
  879. decltype(_impl_.player_id_){}, decltype(_impl_.prop_type_){}, /*decltype(_impl_._cached_size_)*/ {}};
  880. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  881. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.prop_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.prop_type_));
  882. // @@protoc_insertion_point(copy_constructor:protobuf.PickMsg)
  883. }
  884. inline void PickMsg::SharedCtor(
  885. ::_pb::Arena* arena, bool is_message_owned
  886. )
  887. {
  888. (void)arena;
  889. (void)is_message_owned;
  890. new (&_impl_) Impl_{
  891. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.prop_type_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  892. }
  893. PickMsg::~PickMsg()
  894. {
  895. // @@protoc_insertion_point(destructor:protobuf.PickMsg)
  896. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  897. {
  898. (void)arena;
  899. return;
  900. }
  901. SharedDtor();
  902. }
  903. inline void PickMsg::SharedDtor()
  904. {
  905. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  906. }
  907. void PickMsg::SetCachedSize(int size) const
  908. {
  909. _impl_._cached_size_.Set(size);
  910. }
  911. void PickMsg::Clear()
  912. {
  913. // @@protoc_insertion_point(message_clear_start:protobuf.PickMsg)
  914. uint32_t cached_has_bits = 0;
  915. // Prevent compiler warnings about cached_has_bits being unused
  916. (void)cached_has_bits;
  917. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.prop_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.prop_type_));
  918. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  919. }
  920. const char* PickMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  921. {
  922. #define CHK_(x) \
  923. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  924. goto failure
  925. while (!ctx->Done(&ptr))
  926. {
  927. uint32_t tag;
  928. ptr = ::_pbi::ReadTag(ptr, &tag);
  929. switch (tag >> 3)
  930. {
  931. // int64 player_id = 1;
  932. case 1:
  933. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  934. {
  935. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  936. CHK_(ptr);
  937. }
  938. else
  939. goto handle_unusual;
  940. continue;
  941. // .protobuf.PropType prop_type = 2;
  942. case 2:
  943. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  944. {
  945. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  946. CHK_(ptr);
  947. _internal_set_prop_type(static_cast<::protobuf::PropType>(val));
  948. }
  949. else
  950. goto handle_unusual;
  951. continue;
  952. default:
  953. goto handle_unusual;
  954. } // switch
  955. handle_unusual:
  956. if ((tag == 0) || ((tag & 7) == 4))
  957. {
  958. CHK_(ptr);
  959. ctx->SetLastTag(tag);
  960. goto message_done;
  961. }
  962. ptr = UnknownFieldParse(
  963. tag,
  964. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  965. ptr,
  966. ctx
  967. );
  968. CHK_(ptr != nullptr);
  969. } // while
  970. message_done:
  971. return ptr;
  972. failure:
  973. ptr = nullptr;
  974. goto message_done;
  975. #undef CHK_
  976. }
  977. uint8_t* PickMsg::_InternalSerialize(
  978. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  979. ) const
  980. {
  981. // @@protoc_insertion_point(serialize_to_array_start:protobuf.PickMsg)
  982. uint32_t cached_has_bits = 0;
  983. (void)cached_has_bits;
  984. // int64 player_id = 1;
  985. if (this->_internal_player_id() != 0)
  986. {
  987. target = stream->EnsureSpace(target);
  988. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  989. }
  990. // .protobuf.PropType prop_type = 2;
  991. if (this->_internal_prop_type() != 0)
  992. {
  993. target = stream->EnsureSpace(target);
  994. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  995. 2, this->_internal_prop_type(), target
  996. );
  997. }
  998. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  999. {
  1000. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1001. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1002. );
  1003. }
  1004. // @@protoc_insertion_point(serialize_to_array_end:protobuf.PickMsg)
  1005. return target;
  1006. }
  1007. size_t PickMsg::ByteSizeLong() const
  1008. {
  1009. // @@protoc_insertion_point(message_byte_size_start:protobuf.PickMsg)
  1010. size_t total_size = 0;
  1011. uint32_t cached_has_bits = 0;
  1012. // Prevent compiler warnings about cached_has_bits being unused
  1013. (void)cached_has_bits;
  1014. // int64 player_id = 1;
  1015. if (this->_internal_player_id() != 0)
  1016. {
  1017. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1018. }
  1019. // .protobuf.PropType prop_type = 2;
  1020. if (this->_internal_prop_type() != 0)
  1021. {
  1022. total_size += 1 +
  1023. ::_pbi::WireFormatLite::EnumSize(this->_internal_prop_type());
  1024. }
  1025. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1026. }
  1027. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PickMsg::_class_data_ = {
  1028. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1029. PickMsg::MergeImpl};
  1030. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* PickMsg::GetClassData() const
  1031. {
  1032. return &_class_data_;
  1033. }
  1034. void PickMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1035. {
  1036. auto* const _this = static_cast<PickMsg*>(&to_msg);
  1037. auto& from = static_cast<const PickMsg&>(from_msg);
  1038. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.PickMsg)
  1039. GOOGLE_DCHECK_NE(&from, _this);
  1040. uint32_t cached_has_bits = 0;
  1041. (void)cached_has_bits;
  1042. if (from._internal_player_id() != 0)
  1043. {
  1044. _this->_internal_set_player_id(from._internal_player_id());
  1045. }
  1046. if (from._internal_prop_type() != 0)
  1047. {
  1048. _this->_internal_set_prop_type(from._internal_prop_type());
  1049. }
  1050. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1051. }
  1052. void PickMsg::CopyFrom(const PickMsg& from)
  1053. {
  1054. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.PickMsg)
  1055. if (&from == this)
  1056. return;
  1057. Clear();
  1058. MergeFrom(from);
  1059. }
  1060. bool PickMsg::IsInitialized() const
  1061. {
  1062. return true;
  1063. }
  1064. void PickMsg::InternalSwap(PickMsg* other)
  1065. {
  1066. using std::swap;
  1067. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1068. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1069. PROTOBUF_FIELD_OFFSET(PickMsg, _impl_.prop_type_) + sizeof(PickMsg::_impl_.prop_type_) - PROTOBUF_FIELD_OFFSET(PickMsg, _impl_.player_id_)>(
  1070. reinterpret_cast<char*>(&_impl_.player_id_),
  1071. reinterpret_cast<char*>(&other->_impl_.player_id_)
  1072. );
  1073. }
  1074. ::PROTOBUF_NAMESPACE_ID::Metadata PickMsg::GetMetadata() const
  1075. {
  1076. return ::_pbi::AssignDescriptors(
  1077. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[2]
  1078. );
  1079. }
  1080. // ===================================================================
  1081. class SendMsg::_Internal
  1082. {
  1083. public:
  1084. };
  1085. SendMsg::SendMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  1086. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  1087. {
  1088. SharedCtor(arena, is_message_owned);
  1089. // @@protoc_insertion_point(arena_constructor:protobuf.SendMsg)
  1090. }
  1091. SendMsg::SendMsg(const SendMsg& from) :
  1092. ::PROTOBUF_NAMESPACE_ID::Message()
  1093. {
  1094. SendMsg* const _this = this;
  1095. (void)_this;
  1096. new (&_impl_) Impl_{
  1097. decltype(_impl_.message_){}, decltype(_impl_.player_id_){}, decltype(_impl_.to_player_id_){}, /*decltype(_impl_._cached_size_)*/ {}};
  1098. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1099. _impl_.message_.InitDefault();
  1100. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1101. _impl_.message_.Set("", GetArenaForAllocation());
  1102. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1103. if (!from._internal_message().empty())
  1104. {
  1105. _this->_impl_.message_.Set(from._internal_message(), _this->GetArenaForAllocation());
  1106. }
  1107. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.to_player_id_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.to_player_id_));
  1108. // @@protoc_insertion_point(copy_constructor:protobuf.SendMsg)
  1109. }
  1110. inline void SendMsg::SharedCtor(
  1111. ::_pb::Arena* arena, bool is_message_owned
  1112. )
  1113. {
  1114. (void)arena;
  1115. (void)is_message_owned;
  1116. new (&_impl_) Impl_{
  1117. decltype(_impl_.message_){}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.to_player_id_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}};
  1118. _impl_.message_.InitDefault();
  1119. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1120. _impl_.message_.Set("", GetArenaForAllocation());
  1121. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1122. }
  1123. SendMsg::~SendMsg()
  1124. {
  1125. // @@protoc_insertion_point(destructor:protobuf.SendMsg)
  1126. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  1127. {
  1128. (void)arena;
  1129. return;
  1130. }
  1131. SharedDtor();
  1132. }
  1133. inline void SendMsg::SharedDtor()
  1134. {
  1135. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1136. _impl_.message_.Destroy();
  1137. }
  1138. void SendMsg::SetCachedSize(int size) const
  1139. {
  1140. _impl_._cached_size_.Set(size);
  1141. }
  1142. void SendMsg::Clear()
  1143. {
  1144. // @@protoc_insertion_point(message_clear_start:protobuf.SendMsg)
  1145. uint32_t cached_has_bits = 0;
  1146. // Prevent compiler warnings about cached_has_bits being unused
  1147. (void)cached_has_bits;
  1148. _impl_.message_.ClearToEmpty();
  1149. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.to_player_id_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.to_player_id_));
  1150. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1151. }
  1152. const char* SendMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  1153. {
  1154. #define CHK_(x) \
  1155. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  1156. goto failure
  1157. while (!ctx->Done(&ptr))
  1158. {
  1159. uint32_t tag;
  1160. ptr = ::_pbi::ReadTag(ptr, &tag);
  1161. switch (tag >> 3)
  1162. {
  1163. // int64 player_id = 1;
  1164. case 1:
  1165. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  1166. {
  1167. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1168. CHK_(ptr);
  1169. }
  1170. else
  1171. goto handle_unusual;
  1172. continue;
  1173. // int64 to_player_id = 2;
  1174. case 2:
  1175. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  1176. {
  1177. _impl_.to_player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1178. CHK_(ptr);
  1179. }
  1180. else
  1181. goto handle_unusual;
  1182. continue;
  1183. // string message = 3;
  1184. case 3:
  1185. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26))
  1186. {
  1187. auto str = _internal_mutable_message();
  1188. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  1189. CHK_(ptr);
  1190. CHK_(::_pbi::VerifyUTF8(str, "protobuf.SendMsg.message"));
  1191. }
  1192. else
  1193. goto handle_unusual;
  1194. continue;
  1195. default:
  1196. goto handle_unusual;
  1197. } // switch
  1198. handle_unusual:
  1199. if ((tag == 0) || ((tag & 7) == 4))
  1200. {
  1201. CHK_(ptr);
  1202. ctx->SetLastTag(tag);
  1203. goto message_done;
  1204. }
  1205. ptr = UnknownFieldParse(
  1206. tag,
  1207. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1208. ptr,
  1209. ctx
  1210. );
  1211. CHK_(ptr != nullptr);
  1212. } // while
  1213. message_done:
  1214. return ptr;
  1215. failure:
  1216. ptr = nullptr;
  1217. goto message_done;
  1218. #undef CHK_
  1219. }
  1220. uint8_t* SendMsg::_InternalSerialize(
  1221. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  1222. ) const
  1223. {
  1224. // @@protoc_insertion_point(serialize_to_array_start:protobuf.SendMsg)
  1225. uint32_t cached_has_bits = 0;
  1226. (void)cached_has_bits;
  1227. // int64 player_id = 1;
  1228. if (this->_internal_player_id() != 0)
  1229. {
  1230. target = stream->EnsureSpace(target);
  1231. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  1232. }
  1233. // int64 to_player_id = 2;
  1234. if (this->_internal_to_player_id() != 0)
  1235. {
  1236. target = stream->EnsureSpace(target);
  1237. target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_to_player_id(), target);
  1238. }
  1239. // string message = 3;
  1240. if (!this->_internal_message().empty())
  1241. {
  1242. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1243. this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "protobuf.SendMsg.message"
  1244. );
  1245. target = stream->WriteStringMaybeAliased(
  1246. 3, this->_internal_message(), target
  1247. );
  1248. }
  1249. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  1250. {
  1251. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1252. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1253. );
  1254. }
  1255. // @@protoc_insertion_point(serialize_to_array_end:protobuf.SendMsg)
  1256. return target;
  1257. }
  1258. size_t SendMsg::ByteSizeLong() const
  1259. {
  1260. // @@protoc_insertion_point(message_byte_size_start:protobuf.SendMsg)
  1261. size_t total_size = 0;
  1262. uint32_t cached_has_bits = 0;
  1263. // Prevent compiler warnings about cached_has_bits being unused
  1264. (void)cached_has_bits;
  1265. // string message = 3;
  1266. if (!this->_internal_message().empty())
  1267. {
  1268. total_size += 1 +
  1269. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1270. this->_internal_message()
  1271. );
  1272. }
  1273. // int64 player_id = 1;
  1274. if (this->_internal_player_id() != 0)
  1275. {
  1276. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1277. }
  1278. // int64 to_player_id = 2;
  1279. if (this->_internal_to_player_id() != 0)
  1280. {
  1281. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_to_player_id());
  1282. }
  1283. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1284. }
  1285. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SendMsg::_class_data_ = {
  1286. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1287. SendMsg::MergeImpl};
  1288. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* SendMsg::GetClassData() const
  1289. {
  1290. return &_class_data_;
  1291. }
  1292. void SendMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1293. {
  1294. auto* const _this = static_cast<SendMsg*>(&to_msg);
  1295. auto& from = static_cast<const SendMsg&>(from_msg);
  1296. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.SendMsg)
  1297. GOOGLE_DCHECK_NE(&from, _this);
  1298. uint32_t cached_has_bits = 0;
  1299. (void)cached_has_bits;
  1300. if (!from._internal_message().empty())
  1301. {
  1302. _this->_internal_set_message(from._internal_message());
  1303. }
  1304. if (from._internal_player_id() != 0)
  1305. {
  1306. _this->_internal_set_player_id(from._internal_player_id());
  1307. }
  1308. if (from._internal_to_player_id() != 0)
  1309. {
  1310. _this->_internal_set_to_player_id(from._internal_to_player_id());
  1311. }
  1312. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1313. }
  1314. void SendMsg::CopyFrom(const SendMsg& from)
  1315. {
  1316. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.SendMsg)
  1317. if (&from == this)
  1318. return;
  1319. Clear();
  1320. MergeFrom(from);
  1321. }
  1322. bool SendMsg::IsInitialized() const
  1323. {
  1324. return true;
  1325. }
  1326. void SendMsg::InternalSwap(SendMsg* other)
  1327. {
  1328. using std::swap;
  1329. auto* lhs_arena = GetArenaForAllocation();
  1330. auto* rhs_arena = other->GetArenaForAllocation();
  1331. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1332. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1333. &_impl_.message_, lhs_arena, &other->_impl_.message_, rhs_arena
  1334. );
  1335. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1336. PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.to_player_id_) + sizeof(SendMsg::_impl_.to_player_id_) - PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.player_id_)>(
  1337. reinterpret_cast<char*>(&_impl_.player_id_),
  1338. reinterpret_cast<char*>(&other->_impl_.player_id_)
  1339. );
  1340. }
  1341. ::PROTOBUF_NAMESPACE_ID::Metadata SendMsg::GetMetadata() const
  1342. {
  1343. return ::_pbi::AssignDescriptors(
  1344. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[3]
  1345. );
  1346. }
  1347. // ===================================================================
  1348. class AttackMsg::_Internal
  1349. {
  1350. public:
  1351. };
  1352. AttackMsg::AttackMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  1353. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  1354. {
  1355. SharedCtor(arena, is_message_owned);
  1356. // @@protoc_insertion_point(arena_constructor:protobuf.AttackMsg)
  1357. }
  1358. AttackMsg::AttackMsg(const AttackMsg& from) :
  1359. ::PROTOBUF_NAMESPACE_ID::Message()
  1360. {
  1361. AttackMsg* const _this = this;
  1362. (void)_this;
  1363. new (&_impl_) Impl_{
  1364. decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, /*decltype(_impl_._cached_size_)*/ {}};
  1365. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1366. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.angle_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.angle_));
  1367. // @@protoc_insertion_point(copy_constructor:protobuf.AttackMsg)
  1368. }
  1369. inline void AttackMsg::SharedCtor(
  1370. ::_pb::Arena* arena, bool is_message_owned
  1371. )
  1372. {
  1373. (void)arena;
  1374. (void)is_message_owned;
  1375. new (&_impl_) Impl_{
  1376. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  1377. }
  1378. AttackMsg::~AttackMsg()
  1379. {
  1380. // @@protoc_insertion_point(destructor:protobuf.AttackMsg)
  1381. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  1382. {
  1383. (void)arena;
  1384. return;
  1385. }
  1386. SharedDtor();
  1387. }
  1388. inline void AttackMsg::SharedDtor()
  1389. {
  1390. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1391. }
  1392. void AttackMsg::SetCachedSize(int size) const
  1393. {
  1394. _impl_._cached_size_.Set(size);
  1395. }
  1396. void AttackMsg::Clear()
  1397. {
  1398. // @@protoc_insertion_point(message_clear_start:protobuf.AttackMsg)
  1399. uint32_t cached_has_bits = 0;
  1400. // Prevent compiler warnings about cached_has_bits being unused
  1401. (void)cached_has_bits;
  1402. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.angle_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.angle_));
  1403. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1404. }
  1405. const char* AttackMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  1406. {
  1407. #define CHK_(x) \
  1408. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  1409. goto failure
  1410. while (!ctx->Done(&ptr))
  1411. {
  1412. uint32_t tag;
  1413. ptr = ::_pbi::ReadTag(ptr, &tag);
  1414. switch (tag >> 3)
  1415. {
  1416. // int64 player_id = 1;
  1417. case 1:
  1418. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  1419. {
  1420. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1421. CHK_(ptr);
  1422. }
  1423. else
  1424. goto handle_unusual;
  1425. continue;
  1426. // double angle = 2;
  1427. case 2:
  1428. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17))
  1429. {
  1430. _impl_.angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
  1431. ptr += sizeof(double);
  1432. }
  1433. else
  1434. goto handle_unusual;
  1435. continue;
  1436. default:
  1437. goto handle_unusual;
  1438. } // switch
  1439. handle_unusual:
  1440. if ((tag == 0) || ((tag & 7) == 4))
  1441. {
  1442. CHK_(ptr);
  1443. ctx->SetLastTag(tag);
  1444. goto message_done;
  1445. }
  1446. ptr = UnknownFieldParse(
  1447. tag,
  1448. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1449. ptr,
  1450. ctx
  1451. );
  1452. CHK_(ptr != nullptr);
  1453. } // while
  1454. message_done:
  1455. return ptr;
  1456. failure:
  1457. ptr = nullptr;
  1458. goto message_done;
  1459. #undef CHK_
  1460. }
  1461. uint8_t* AttackMsg::_InternalSerialize(
  1462. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  1463. ) const
  1464. {
  1465. // @@protoc_insertion_point(serialize_to_array_start:protobuf.AttackMsg)
  1466. uint32_t cached_has_bits = 0;
  1467. (void)cached_has_bits;
  1468. // int64 player_id = 1;
  1469. if (this->_internal_player_id() != 0)
  1470. {
  1471. target = stream->EnsureSpace(target);
  1472. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  1473. }
  1474. // double angle = 2;
  1475. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  1476. double tmp_angle = this->_internal_angle();
  1477. uint64_t raw_angle;
  1478. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  1479. if (raw_angle != 0)
  1480. {
  1481. target = stream->EnsureSpace(target);
  1482. target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_angle(), target);
  1483. }
  1484. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  1485. {
  1486. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1487. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1488. );
  1489. }
  1490. // @@protoc_insertion_point(serialize_to_array_end:protobuf.AttackMsg)
  1491. return target;
  1492. }
  1493. size_t AttackMsg::ByteSizeLong() const
  1494. {
  1495. // @@protoc_insertion_point(message_byte_size_start:protobuf.AttackMsg)
  1496. size_t total_size = 0;
  1497. uint32_t cached_has_bits = 0;
  1498. // Prevent compiler warnings about cached_has_bits being unused
  1499. (void)cached_has_bits;
  1500. // int64 player_id = 1;
  1501. if (this->_internal_player_id() != 0)
  1502. {
  1503. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1504. }
  1505. // double angle = 2;
  1506. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  1507. double tmp_angle = this->_internal_angle();
  1508. uint64_t raw_angle;
  1509. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  1510. if (raw_angle != 0)
  1511. {
  1512. total_size += 1 + 8;
  1513. }
  1514. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1515. }
  1516. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttackMsg::_class_data_ = {
  1517. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1518. AttackMsg::MergeImpl};
  1519. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* AttackMsg::GetClassData() const
  1520. {
  1521. return &_class_data_;
  1522. }
  1523. void AttackMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1524. {
  1525. auto* const _this = static_cast<AttackMsg*>(&to_msg);
  1526. auto& from = static_cast<const AttackMsg&>(from_msg);
  1527. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.AttackMsg)
  1528. GOOGLE_DCHECK_NE(&from, _this);
  1529. uint32_t cached_has_bits = 0;
  1530. (void)cached_has_bits;
  1531. if (from._internal_player_id() != 0)
  1532. {
  1533. _this->_internal_set_player_id(from._internal_player_id());
  1534. }
  1535. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  1536. double tmp_angle = from._internal_angle();
  1537. uint64_t raw_angle;
  1538. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  1539. if (raw_angle != 0)
  1540. {
  1541. _this->_internal_set_angle(from._internal_angle());
  1542. }
  1543. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1544. }
  1545. void AttackMsg::CopyFrom(const AttackMsg& from)
  1546. {
  1547. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.AttackMsg)
  1548. if (&from == this)
  1549. return;
  1550. Clear();
  1551. MergeFrom(from);
  1552. }
  1553. bool AttackMsg::IsInitialized() const
  1554. {
  1555. return true;
  1556. }
  1557. void AttackMsg::InternalSwap(AttackMsg* other)
  1558. {
  1559. using std::swap;
  1560. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1561. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1562. PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.angle_) + sizeof(AttackMsg::_impl_.angle_) - PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.player_id_)>(
  1563. reinterpret_cast<char*>(&_impl_.player_id_),
  1564. reinterpret_cast<char*>(&other->_impl_.player_id_)
  1565. );
  1566. }
  1567. ::PROTOBUF_NAMESPACE_ID::Metadata AttackMsg::GetMetadata() const
  1568. {
  1569. return ::_pbi::AssignDescriptors(
  1570. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[4]
  1571. );
  1572. }
  1573. // ===================================================================
  1574. class IDMsg::_Internal
  1575. {
  1576. public:
  1577. };
  1578. IDMsg::IDMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  1579. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  1580. {
  1581. SharedCtor(arena, is_message_owned);
  1582. // @@protoc_insertion_point(arena_constructor:protobuf.IDMsg)
  1583. }
  1584. IDMsg::IDMsg(const IDMsg& from) :
  1585. ::PROTOBUF_NAMESPACE_ID::Message()
  1586. {
  1587. IDMsg* const _this = this;
  1588. (void)_this;
  1589. new (&_impl_) Impl_{
  1590. decltype(_impl_.player_id_){}, /*decltype(_impl_._cached_size_)*/ {}};
  1591. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1592. _this->_impl_.player_id_ = from._impl_.player_id_;
  1593. // @@protoc_insertion_point(copy_constructor:protobuf.IDMsg)
  1594. }
  1595. inline void IDMsg::SharedCtor(
  1596. ::_pb::Arena* arena, bool is_message_owned
  1597. )
  1598. {
  1599. (void)arena;
  1600. (void)is_message_owned;
  1601. new (&_impl_) Impl_{
  1602. decltype(_impl_.player_id_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}};
  1603. }
  1604. IDMsg::~IDMsg()
  1605. {
  1606. // @@protoc_insertion_point(destructor:protobuf.IDMsg)
  1607. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  1608. {
  1609. (void)arena;
  1610. return;
  1611. }
  1612. SharedDtor();
  1613. }
  1614. inline void IDMsg::SharedDtor()
  1615. {
  1616. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1617. }
  1618. void IDMsg::SetCachedSize(int size) const
  1619. {
  1620. _impl_._cached_size_.Set(size);
  1621. }
  1622. void IDMsg::Clear()
  1623. {
  1624. // @@protoc_insertion_point(message_clear_start:protobuf.IDMsg)
  1625. uint32_t cached_has_bits = 0;
  1626. // Prevent compiler warnings about cached_has_bits being unused
  1627. (void)cached_has_bits;
  1628. _impl_.player_id_ = int64_t{0};
  1629. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1630. }
  1631. const char* IDMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  1632. {
  1633. #define CHK_(x) \
  1634. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  1635. goto failure
  1636. while (!ctx->Done(&ptr))
  1637. {
  1638. uint32_t tag;
  1639. ptr = ::_pbi::ReadTag(ptr, &tag);
  1640. switch (tag >> 3)
  1641. {
  1642. // int64 player_id = 1;
  1643. case 1:
  1644. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  1645. {
  1646. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1647. CHK_(ptr);
  1648. }
  1649. else
  1650. goto handle_unusual;
  1651. continue;
  1652. default:
  1653. goto handle_unusual;
  1654. } // switch
  1655. handle_unusual:
  1656. if ((tag == 0) || ((tag & 7) == 4))
  1657. {
  1658. CHK_(ptr);
  1659. ctx->SetLastTag(tag);
  1660. goto message_done;
  1661. }
  1662. ptr = UnknownFieldParse(
  1663. tag,
  1664. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1665. ptr,
  1666. ctx
  1667. );
  1668. CHK_(ptr != nullptr);
  1669. } // while
  1670. message_done:
  1671. return ptr;
  1672. failure:
  1673. ptr = nullptr;
  1674. goto message_done;
  1675. #undef CHK_
  1676. }
  1677. uint8_t* IDMsg::_InternalSerialize(
  1678. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  1679. ) const
  1680. {
  1681. // @@protoc_insertion_point(serialize_to_array_start:protobuf.IDMsg)
  1682. uint32_t cached_has_bits = 0;
  1683. (void)cached_has_bits;
  1684. // int64 player_id = 1;
  1685. if (this->_internal_player_id() != 0)
  1686. {
  1687. target = stream->EnsureSpace(target);
  1688. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  1689. }
  1690. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  1691. {
  1692. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1693. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1694. );
  1695. }
  1696. // @@protoc_insertion_point(serialize_to_array_end:protobuf.IDMsg)
  1697. return target;
  1698. }
  1699. size_t IDMsg::ByteSizeLong() const
  1700. {
  1701. // @@protoc_insertion_point(message_byte_size_start:protobuf.IDMsg)
  1702. size_t total_size = 0;
  1703. uint32_t cached_has_bits = 0;
  1704. // Prevent compiler warnings about cached_has_bits being unused
  1705. (void)cached_has_bits;
  1706. // int64 player_id = 1;
  1707. if (this->_internal_player_id() != 0)
  1708. {
  1709. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1710. }
  1711. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1712. }
  1713. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData IDMsg::_class_data_ = {
  1714. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1715. IDMsg::MergeImpl};
  1716. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* IDMsg::GetClassData() const
  1717. {
  1718. return &_class_data_;
  1719. }
  1720. void IDMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1721. {
  1722. auto* const _this = static_cast<IDMsg*>(&to_msg);
  1723. auto& from = static_cast<const IDMsg&>(from_msg);
  1724. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.IDMsg)
  1725. GOOGLE_DCHECK_NE(&from, _this);
  1726. uint32_t cached_has_bits = 0;
  1727. (void)cached_has_bits;
  1728. if (from._internal_player_id() != 0)
  1729. {
  1730. _this->_internal_set_player_id(from._internal_player_id());
  1731. }
  1732. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1733. }
  1734. void IDMsg::CopyFrom(const IDMsg& from)
  1735. {
  1736. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.IDMsg)
  1737. if (&from == this)
  1738. return;
  1739. Clear();
  1740. MergeFrom(from);
  1741. }
  1742. bool IDMsg::IsInitialized() const
  1743. {
  1744. return true;
  1745. }
  1746. void IDMsg::InternalSwap(IDMsg* other)
  1747. {
  1748. using std::swap;
  1749. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1750. swap(_impl_.player_id_, other->_impl_.player_id_);
  1751. }
  1752. ::PROTOBUF_NAMESPACE_ID::Metadata IDMsg::GetMetadata() const
  1753. {
  1754. return ::_pbi::AssignDescriptors(
  1755. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[5]
  1756. );
  1757. }
  1758. // @@protoc_insertion_point(namespace_scope)
  1759. } // namespace protobuf
  1760. PROTOBUF_NAMESPACE_OPEN
  1761. template<>
  1762. PROTOBUF_NOINLINE ::protobuf::PlayerMsg*
  1763. Arena::CreateMaybeMessage<::protobuf::PlayerMsg>(Arena* arena)
  1764. {
  1765. return Arena::CreateMessageInternal<::protobuf::PlayerMsg>(arena);
  1766. }
  1767. template<>
  1768. PROTOBUF_NOINLINE ::protobuf::MoveMsg*
  1769. Arena::CreateMaybeMessage<::protobuf::MoveMsg>(Arena* arena)
  1770. {
  1771. return Arena::CreateMessageInternal<::protobuf::MoveMsg>(arena);
  1772. }
  1773. template<>
  1774. PROTOBUF_NOINLINE ::protobuf::PickMsg*
  1775. Arena::CreateMaybeMessage<::protobuf::PickMsg>(Arena* arena)
  1776. {
  1777. return Arena::CreateMessageInternal<::protobuf::PickMsg>(arena);
  1778. }
  1779. template<>
  1780. PROTOBUF_NOINLINE ::protobuf::SendMsg*
  1781. Arena::CreateMaybeMessage<::protobuf::SendMsg>(Arena* arena)
  1782. {
  1783. return Arena::CreateMessageInternal<::protobuf::SendMsg>(arena);
  1784. }
  1785. template<>
  1786. PROTOBUF_NOINLINE ::protobuf::AttackMsg*
  1787. Arena::CreateMaybeMessage<::protobuf::AttackMsg>(Arena* arena)
  1788. {
  1789. return Arena::CreateMessageInternal<::protobuf::AttackMsg>(arena);
  1790. }
  1791. template<>
  1792. PROTOBUF_NOINLINE ::protobuf::IDMsg*
  1793. Arena::CreateMaybeMessage<::protobuf::IDMsg>(Arena* arena)
  1794. {
  1795. return Arena::CreateMessageInternal<::protobuf::IDMsg>(arena);
  1796. }
  1797. PROTOBUF_NAMESPACE_CLOSE
  1798. // @@protoc_insertion_point(global_scope)
  1799. #include <google/protobuf/port_undef.inc>