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 73 kB

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