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

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