levelData.pb.cc 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: levelData.proto
  3. #include "levelData.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/io/zero_copy_stream_impl_lite.h>
  9. // @@protoc_insertion_point(includes)
  10. #include <google/protobuf/port_def.inc>
  11. PROTOBUF_PRAGMA_INIT_SEG
  12. constexpr LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse(
  13. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
  14. struct LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal {
  15. constexpr LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal()
  16. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  17. ~LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal() {}
  18. union {
  19. LevelsIndex_LevelsIndexEntry_DoNotUse _instance;
  20. };
  21. };
  22. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal _LevelsIndex_LevelsIndexEntry_DoNotUse_default_instance_;
  23. constexpr LevelsIndex::LevelsIndex(
  24. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  25. : levelsindex_(){}
  26. struct LevelsIndexDefaultTypeInternal {
  27. constexpr LevelsIndexDefaultTypeInternal()
  28. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  29. ~LevelsIndexDefaultTypeInternal() {}
  30. union {
  31. LevelsIndex _instance;
  32. };
  33. };
  34. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelsIndexDefaultTypeInternal _LevelsIndex_default_instance_;
  35. constexpr t_offeset_len::t_offeset_len(
  36. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  37. : offset_(0)
  38. , len_(0){}
  39. struct t_offeset_lenDefaultTypeInternal {
  40. constexpr t_offeset_lenDefaultTypeInternal()
  41. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  42. ~t_offeset_lenDefaultTypeInternal() {}
  43. union {
  44. t_offeset_len _instance;
  45. };
  46. };
  47. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_offeset_lenDefaultTypeInternal _t_offeset_len_default_instance_;
  48. constexpr LevelData::LevelData(
  49. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  50. : tiles_()
  51. , stacks_()
  52. , tilewidth_(0)
  53. , tileheight_(0){}
  54. struct LevelDataDefaultTypeInternal {
  55. constexpr LevelDataDefaultTypeInternal()
  56. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  57. ~LevelDataDefaultTypeInternal() {}
  58. union {
  59. LevelData _instance;
  60. };
  61. };
  62. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelDataDefaultTypeInternal _LevelData_default_instance_;
  63. constexpr t_tile::t_tile(
  64. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  65. : tiledata_(nullptr)
  66. , x_(0)
  67. , y_(0)
  68. , z_(0){}
  69. struct t_tileDefaultTypeInternal {
  70. constexpr t_tileDefaultTypeInternal()
  71. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  72. ~t_tileDefaultTypeInternal() {}
  73. union {
  74. t_tile _instance;
  75. };
  76. };
  77. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_tileDefaultTypeInternal _t_tile_default_instance_;
  78. constexpr t_tile_data::t_tile_data(
  79. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  80. : type_(0)
  81. , subtype_(0)
  82. , id_(0)
  83. , zv_(0)
  84. , weight_(0){}
  85. struct t_tile_dataDefaultTypeInternal {
  86. constexpr t_tile_dataDefaultTypeInternal()
  87. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  88. ~t_tile_dataDefaultTypeInternal() {}
  89. union {
  90. t_tile_data _instance;
  91. };
  92. };
  93. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_tile_dataDefaultTypeInternal _t_tile_data_default_instance_;
  94. constexpr t_stack::t_stack(
  95. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  96. : tiledatas_()
  97. , x_(0)
  98. , y_(0)
  99. , direction_(0)
  100. , depth_(0){}
  101. struct t_stackDefaultTypeInternal {
  102. constexpr t_stackDefaultTypeInternal()
  103. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  104. ~t_stackDefaultTypeInternal() {}
  105. union {
  106. t_stack _instance;
  107. };
  108. };
  109. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_stackDefaultTypeInternal _t_stack_default_instance_;
  110. // ===================================================================
  111. LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse() {}
  112. LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  113. : SuperType(arena) {}
  114. void LevelsIndex_LevelsIndexEntry_DoNotUse::MergeFrom(const LevelsIndex_LevelsIndexEntry_DoNotUse& other) {
  115. MergeFromInternal(other);
  116. }
  117. // ===================================================================
  118. class LevelsIndex::_Internal {
  119. public:
  120. };
  121. LevelsIndex::LevelsIndex(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  122. : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
  123. levelsindex_(arena) {
  124. SharedCtor();
  125. RegisterArenaDtor(arena);
  126. // @@protoc_insertion_point(arena_constructor:LevelsIndex)
  127. }
  128. LevelsIndex::LevelsIndex(const LevelsIndex& from)
  129. : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  130. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  131. levelsindex_.MergeFrom(from.levelsindex_);
  132. // @@protoc_insertion_point(copy_constructor:LevelsIndex)
  133. }
  134. void LevelsIndex::SharedCtor() {
  135. }
  136. LevelsIndex::~LevelsIndex() {
  137. // @@protoc_insertion_point(destructor:LevelsIndex)
  138. SharedDtor();
  139. _internal_metadata_.Delete<std::string>();
  140. }
  141. void LevelsIndex::SharedDtor() {
  142. GOOGLE_DCHECK(GetArena() == nullptr);
  143. }
  144. void LevelsIndex::ArenaDtor(void* object) {
  145. LevelsIndex* _this = reinterpret_cast< LevelsIndex* >(object);
  146. (void)_this;
  147. }
  148. void LevelsIndex::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  149. }
  150. void LevelsIndex::SetCachedSize(int size) const {
  151. _cached_size_.Set(size);
  152. }
  153. void LevelsIndex::Clear() {
  154. // @@protoc_insertion_point(message_clear_start:LevelsIndex)
  155. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  156. // Prevent compiler warnings about cached_has_bits being unused
  157. (void) cached_has_bits;
  158. levelsindex_.Clear();
  159. _internal_metadata_.Clear<std::string>();
  160. }
  161. const char* LevelsIndex::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  162. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  163. while (!ctx->Done(&ptr)) {
  164. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  165. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  166. CHK_(ptr);
  167. switch (tag >> 3) {
  168. // map<string, .t_offeset_len> LevelsIndex = 1;
  169. case 1:
  170. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  171. ptr -= 1;
  172. do {
  173. ptr += 1;
  174. ptr = ctx->ParseMessage(&levelsindex_, ptr);
  175. CHK_(ptr);
  176. if (!ctx->DataAvailable(ptr)) break;
  177. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  178. } else goto handle_unusual;
  179. continue;
  180. default: {
  181. handle_unusual:
  182. if ((tag & 7) == 4 || tag == 0) {
  183. ctx->SetLastTag(tag);
  184. goto success;
  185. }
  186. ptr = UnknownFieldParse(tag,
  187. _internal_metadata_.mutable_unknown_fields<std::string>(),
  188. ptr, ctx);
  189. CHK_(ptr != nullptr);
  190. continue;
  191. }
  192. } // switch
  193. } // while
  194. success:
  195. return ptr;
  196. failure:
  197. ptr = nullptr;
  198. goto success;
  199. #undef CHK_
  200. }
  201. ::PROTOBUF_NAMESPACE_ID::uint8* LevelsIndex::_InternalSerialize(
  202. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  203. // @@protoc_insertion_point(serialize_to_array_start:LevelsIndex)
  204. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  205. (void) cached_has_bits;
  206. // map<string, .t_offeset_len> LevelsIndex = 1;
  207. if (!this->_internal_levelsindex().empty()) {
  208. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_pointer
  209. ConstPtr;
  210. typedef ConstPtr SortItem;
  211. typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
  212. struct Utf8Check {
  213. static void Check(ConstPtr p) {
  214. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  215. p->first.data(), static_cast<int>(p->first.length()),
  216. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  217. "LevelsIndex.LevelsIndexEntry.key");
  218. }
  219. };
  220. if (stream->IsSerializationDeterministic() &&
  221. this->_internal_levelsindex().size() > 1) {
  222. ::std::unique_ptr<SortItem[]> items(
  223. new SortItem[this->_internal_levelsindex().size()]);
  224. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::size_type size_type;
  225. size_type n = 0;
  226. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
  227. it = this->_internal_levelsindex().begin();
  228. it != this->_internal_levelsindex().end(); ++it, ++n) {
  229. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  230. }
  231. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  232. for (size_type i = 0; i < n; i++) {
  233. target = LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
  234. Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
  235. }
  236. } else {
  237. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
  238. it = this->_internal_levelsindex().begin();
  239. it != this->_internal_levelsindex().end(); ++it) {
  240. target = LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream);
  241. Utf8Check::Check(&(*it));
  242. }
  243. }
  244. }
  245. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  246. target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
  247. static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  248. }
  249. // @@protoc_insertion_point(serialize_to_array_end:LevelsIndex)
  250. return target;
  251. }
  252. size_t LevelsIndex::ByteSizeLong() const {
  253. // @@protoc_insertion_point(message_byte_size_start:LevelsIndex)
  254. size_t total_size = 0;
  255. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  256. // Prevent compiler warnings about cached_has_bits being unused
  257. (void) cached_has_bits;
  258. // map<string, .t_offeset_len> LevelsIndex = 1;
  259. total_size += 1 *
  260. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_levelsindex_size());
  261. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
  262. it = this->_internal_levelsindex().begin();
  263. it != this->_internal_levelsindex().end(); ++it) {
  264. total_size += LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  265. }
  266. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  267. total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  268. }
  269. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  270. SetCachedSize(cached_size);
  271. return total_size;
  272. }
  273. void LevelsIndex::CheckTypeAndMergeFrom(
  274. const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  275. MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const LevelsIndex*>(
  276. &from));
  277. }
  278. void LevelsIndex::MergeFrom(const LevelsIndex& from) {
  279. // @@protoc_insertion_point(class_specific_merge_from_start:LevelsIndex)
  280. GOOGLE_DCHECK_NE(&from, this);
  281. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  282. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  283. (void) cached_has_bits;
  284. levelsindex_.MergeFrom(from.levelsindex_);
  285. }
  286. void LevelsIndex::CopyFrom(const LevelsIndex& from) {
  287. // @@protoc_insertion_point(class_specific_copy_from_start:LevelsIndex)
  288. if (&from == this) return;
  289. Clear();
  290. MergeFrom(from);
  291. }
  292. bool LevelsIndex::IsInitialized() const {
  293. return true;
  294. }
  295. void LevelsIndex::InternalSwap(LevelsIndex* other) {
  296. using std::swap;
  297. _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  298. levelsindex_.Swap(&other->levelsindex_);
  299. }
  300. std::string LevelsIndex::GetTypeName() const {
  301. return "LevelsIndex";
  302. }
  303. // ===================================================================
  304. class t_offeset_len::_Internal {
  305. public:
  306. };
  307. t_offeset_len::t_offeset_len(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  308. : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  309. SharedCtor();
  310. RegisterArenaDtor(arena);
  311. // @@protoc_insertion_point(arena_constructor:t_offeset_len)
  312. }
  313. t_offeset_len::t_offeset_len(const t_offeset_len& from)
  314. : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  315. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  316. ::memcpy(&offset_, &from.offset_,
  317. static_cast<size_t>(reinterpret_cast<char*>(&len_) -
  318. reinterpret_cast<char*>(&offset_)) + sizeof(len_));
  319. // @@protoc_insertion_point(copy_constructor:t_offeset_len)
  320. }
  321. void t_offeset_len::SharedCtor() {
  322. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  323. reinterpret_cast<char*>(&offset_) - reinterpret_cast<char*>(this)),
  324. 0, static_cast<size_t>(reinterpret_cast<char*>(&len_) -
  325. reinterpret_cast<char*>(&offset_)) + sizeof(len_));
  326. }
  327. t_offeset_len::~t_offeset_len() {
  328. // @@protoc_insertion_point(destructor:t_offeset_len)
  329. SharedDtor();
  330. _internal_metadata_.Delete<std::string>();
  331. }
  332. void t_offeset_len::SharedDtor() {
  333. GOOGLE_DCHECK(GetArena() == nullptr);
  334. }
  335. void t_offeset_len::ArenaDtor(void* object) {
  336. t_offeset_len* _this = reinterpret_cast< t_offeset_len* >(object);
  337. (void)_this;
  338. }
  339. void t_offeset_len::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  340. }
  341. void t_offeset_len::SetCachedSize(int size) const {
  342. _cached_size_.Set(size);
  343. }
  344. void t_offeset_len::Clear() {
  345. // @@protoc_insertion_point(message_clear_start:t_offeset_len)
  346. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  347. // Prevent compiler warnings about cached_has_bits being unused
  348. (void) cached_has_bits;
  349. ::memset(&offset_, 0, static_cast<size_t>(
  350. reinterpret_cast<char*>(&len_) -
  351. reinterpret_cast<char*>(&offset_)) + sizeof(len_));
  352. _internal_metadata_.Clear<std::string>();
  353. }
  354. const char* t_offeset_len::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  355. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  356. while (!ctx->Done(&ptr)) {
  357. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  358. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  359. CHK_(ptr);
  360. switch (tag >> 3) {
  361. // int32 offset = 1;
  362. case 1:
  363. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  364. offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  365. CHK_(ptr);
  366. } else goto handle_unusual;
  367. continue;
  368. // int32 len = 2;
  369. case 2:
  370. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
  371. len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  372. CHK_(ptr);
  373. } else goto handle_unusual;
  374. continue;
  375. default: {
  376. handle_unusual:
  377. if ((tag & 7) == 4 || tag == 0) {
  378. ctx->SetLastTag(tag);
  379. goto success;
  380. }
  381. ptr = UnknownFieldParse(tag,
  382. _internal_metadata_.mutable_unknown_fields<std::string>(),
  383. ptr, ctx);
  384. CHK_(ptr != nullptr);
  385. continue;
  386. }
  387. } // switch
  388. } // while
  389. success:
  390. return ptr;
  391. failure:
  392. ptr = nullptr;
  393. goto success;
  394. #undef CHK_
  395. }
  396. ::PROTOBUF_NAMESPACE_ID::uint8* t_offeset_len::_InternalSerialize(
  397. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  398. // @@protoc_insertion_point(serialize_to_array_start:t_offeset_len)
  399. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  400. (void) cached_has_bits;
  401. // int32 offset = 1;
  402. if (this->offset() != 0) {
  403. target = stream->EnsureSpace(target);
  404. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_offset(), target);
  405. }
  406. // int32 len = 2;
  407. if (this->len() != 0) {
  408. target = stream->EnsureSpace(target);
  409. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_len(), target);
  410. }
  411. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  412. target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
  413. static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  414. }
  415. // @@protoc_insertion_point(serialize_to_array_end:t_offeset_len)
  416. return target;
  417. }
  418. size_t t_offeset_len::ByteSizeLong() const {
  419. // @@protoc_insertion_point(message_byte_size_start:t_offeset_len)
  420. size_t total_size = 0;
  421. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  422. // Prevent compiler warnings about cached_has_bits being unused
  423. (void) cached_has_bits;
  424. // int32 offset = 1;
  425. if (this->offset() != 0) {
  426. total_size += 1 +
  427. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  428. this->_internal_offset());
  429. }
  430. // int32 len = 2;
  431. if (this->len() != 0) {
  432. total_size += 1 +
  433. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  434. this->_internal_len());
  435. }
  436. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  437. total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  438. }
  439. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  440. SetCachedSize(cached_size);
  441. return total_size;
  442. }
  443. void t_offeset_len::CheckTypeAndMergeFrom(
  444. const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  445. MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_offeset_len*>(
  446. &from));
  447. }
  448. void t_offeset_len::MergeFrom(const t_offeset_len& from) {
  449. // @@protoc_insertion_point(class_specific_merge_from_start:t_offeset_len)
  450. GOOGLE_DCHECK_NE(&from, this);
  451. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  452. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  453. (void) cached_has_bits;
  454. if (from.offset() != 0) {
  455. _internal_set_offset(from._internal_offset());
  456. }
  457. if (from.len() != 0) {
  458. _internal_set_len(from._internal_len());
  459. }
  460. }
  461. void t_offeset_len::CopyFrom(const t_offeset_len& from) {
  462. // @@protoc_insertion_point(class_specific_copy_from_start:t_offeset_len)
  463. if (&from == this) return;
  464. Clear();
  465. MergeFrom(from);
  466. }
  467. bool t_offeset_len::IsInitialized() const {
  468. return true;
  469. }
  470. void t_offeset_len::InternalSwap(t_offeset_len* other) {
  471. using std::swap;
  472. _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  473. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  474. PROTOBUF_FIELD_OFFSET(t_offeset_len, len_)
  475. + sizeof(t_offeset_len::len_)
  476. - PROTOBUF_FIELD_OFFSET(t_offeset_len, offset_)>(
  477. reinterpret_cast<char*>(&offset_),
  478. reinterpret_cast<char*>(&other->offset_));
  479. }
  480. std::string t_offeset_len::GetTypeName() const {
  481. return "t_offeset_len";
  482. }
  483. // ===================================================================
  484. class LevelData::_Internal {
  485. public:
  486. using HasBits = decltype(std::declval<LevelData>()._has_bits_);
  487. static void set_has_tilewidth(HasBits* has_bits) {
  488. (*has_bits)[0] |= 1u;
  489. }
  490. static void set_has_tileheight(HasBits* has_bits) {
  491. (*has_bits)[0] |= 2u;
  492. }
  493. };
  494. LevelData::LevelData(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  495. : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
  496. tiles_(arena),
  497. stacks_(arena) {
  498. SharedCtor();
  499. RegisterArenaDtor(arena);
  500. // @@protoc_insertion_point(arena_constructor:LevelData)
  501. }
  502. LevelData::LevelData(const LevelData& from)
  503. : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
  504. _has_bits_(from._has_bits_),
  505. tiles_(from.tiles_),
  506. stacks_(from.stacks_) {
  507. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  508. ::memcpy(&tilewidth_, &from.tilewidth_,
  509. static_cast<size_t>(reinterpret_cast<char*>(&tileheight_) -
  510. reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
  511. // @@protoc_insertion_point(copy_constructor:LevelData)
  512. }
  513. void LevelData::SharedCtor() {
  514. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  515. reinterpret_cast<char*>(&tilewidth_) - reinterpret_cast<char*>(this)),
  516. 0, static_cast<size_t>(reinterpret_cast<char*>(&tileheight_) -
  517. reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
  518. }
  519. LevelData::~LevelData() {
  520. // @@protoc_insertion_point(destructor:LevelData)
  521. SharedDtor();
  522. _internal_metadata_.Delete<std::string>();
  523. }
  524. void LevelData::SharedDtor() {
  525. GOOGLE_DCHECK(GetArena() == nullptr);
  526. }
  527. void LevelData::ArenaDtor(void* object) {
  528. LevelData* _this = reinterpret_cast< LevelData* >(object);
  529. (void)_this;
  530. }
  531. void LevelData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  532. }
  533. void LevelData::SetCachedSize(int size) const {
  534. _cached_size_.Set(size);
  535. }
  536. void LevelData::Clear() {
  537. // @@protoc_insertion_point(message_clear_start:LevelData)
  538. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  539. // Prevent compiler warnings about cached_has_bits being unused
  540. (void) cached_has_bits;
  541. tiles_.Clear();
  542. stacks_.Clear();
  543. cached_has_bits = _has_bits_[0];
  544. if (cached_has_bits & 0x00000003u) {
  545. ::memset(&tilewidth_, 0, static_cast<size_t>(
  546. reinterpret_cast<char*>(&tileheight_) -
  547. reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
  548. }
  549. _has_bits_.Clear();
  550. _internal_metadata_.Clear<std::string>();
  551. }
  552. const char* LevelData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  553. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  554. _Internal::HasBits has_bits{};
  555. while (!ctx->Done(&ptr)) {
  556. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  557. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  558. CHK_(ptr);
  559. switch (tag >> 3) {
  560. // repeated .t_tile tiles = 1;
  561. case 1:
  562. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  563. ptr -= 1;
  564. do {
  565. ptr += 1;
  566. ptr = ctx->ParseMessage(_internal_add_tiles(), ptr);
  567. CHK_(ptr);
  568. if (!ctx->DataAvailable(ptr)) break;
  569. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  570. } else goto handle_unusual;
  571. continue;
  572. // repeated .t_stack stacks = 2;
  573. case 2:
  574. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  575. ptr -= 1;
  576. do {
  577. ptr += 1;
  578. ptr = ctx->ParseMessage(_internal_add_stacks(), ptr);
  579. CHK_(ptr);
  580. if (!ctx->DataAvailable(ptr)) break;
  581. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
  582. } else goto handle_unusual;
  583. continue;
  584. // int32 tileWidth = 3;
  585. case 3:
  586. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  587. _Internal::set_has_tilewidth(&has_bits);
  588. tilewidth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  589. CHK_(ptr);
  590. } else goto handle_unusual;
  591. continue;
  592. // int32 tileHeight = 4;
  593. case 4:
  594. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  595. _Internal::set_has_tileheight(&has_bits);
  596. tileheight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  597. CHK_(ptr);
  598. } else goto handle_unusual;
  599. continue;
  600. default: {
  601. handle_unusual:
  602. if ((tag & 7) == 4 || tag == 0) {
  603. ctx->SetLastTag(tag);
  604. goto success;
  605. }
  606. ptr = UnknownFieldParse(tag,
  607. _internal_metadata_.mutable_unknown_fields<std::string>(),
  608. ptr, ctx);
  609. CHK_(ptr != nullptr);
  610. continue;
  611. }
  612. } // switch
  613. } // while
  614. success:
  615. _has_bits_.Or(has_bits);
  616. return ptr;
  617. failure:
  618. ptr = nullptr;
  619. goto success;
  620. #undef CHK_
  621. }
  622. ::PROTOBUF_NAMESPACE_ID::uint8* LevelData::_InternalSerialize(
  623. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  624. // @@protoc_insertion_point(serialize_to_array_start:LevelData)
  625. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  626. (void) cached_has_bits;
  627. // repeated .t_tile tiles = 1;
  628. for (unsigned int i = 0,
  629. n = static_cast<unsigned int>(this->_internal_tiles_size()); i < n; i++) {
  630. target = stream->EnsureSpace(target);
  631. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  632. InternalWriteMessage(1, this->_internal_tiles(i), target, stream);
  633. }
  634. // repeated .t_stack stacks = 2;
  635. for (unsigned int i = 0,
  636. n = static_cast<unsigned int>(this->_internal_stacks_size()); i < n; i++) {
  637. target = stream->EnsureSpace(target);
  638. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  639. InternalWriteMessage(2, this->_internal_stacks(i), target, stream);
  640. }
  641. // int32 tileWidth = 3;
  642. if (_internal_has_tilewidth()) {
  643. target = stream->EnsureSpace(target);
  644. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_tilewidth(), target);
  645. }
  646. // int32 tileHeight = 4;
  647. if (_internal_has_tileheight()) {
  648. target = stream->EnsureSpace(target);
  649. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_tileheight(), target);
  650. }
  651. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  652. target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
  653. static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  654. }
  655. // @@protoc_insertion_point(serialize_to_array_end:LevelData)
  656. return target;
  657. }
  658. size_t LevelData::ByteSizeLong() const {
  659. // @@protoc_insertion_point(message_byte_size_start:LevelData)
  660. size_t total_size = 0;
  661. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  662. // Prevent compiler warnings about cached_has_bits being unused
  663. (void) cached_has_bits;
  664. // repeated .t_tile tiles = 1;
  665. total_size += 1UL * this->_internal_tiles_size();
  666. for (const auto& msg : this->tiles_) {
  667. total_size +=
  668. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  669. }
  670. // repeated .t_stack stacks = 2;
  671. total_size += 1UL * this->_internal_stacks_size();
  672. for (const auto& msg : this->stacks_) {
  673. total_size +=
  674. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  675. }
  676. cached_has_bits = _has_bits_[0];
  677. if (cached_has_bits & 0x00000003u) {
  678. // int32 tileWidth = 3;
  679. if (cached_has_bits & 0x00000001u) {
  680. total_size += 1 +
  681. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  682. this->_internal_tilewidth());
  683. }
  684. // int32 tileHeight = 4;
  685. if (cached_has_bits & 0x00000002u) {
  686. total_size += 1 +
  687. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  688. this->_internal_tileheight());
  689. }
  690. }
  691. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  692. total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  693. }
  694. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  695. SetCachedSize(cached_size);
  696. return total_size;
  697. }
  698. void LevelData::CheckTypeAndMergeFrom(
  699. const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  700. MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const LevelData*>(
  701. &from));
  702. }
  703. void LevelData::MergeFrom(const LevelData& from) {
  704. // @@protoc_insertion_point(class_specific_merge_from_start:LevelData)
  705. GOOGLE_DCHECK_NE(&from, this);
  706. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  707. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  708. (void) cached_has_bits;
  709. tiles_.MergeFrom(from.tiles_);
  710. stacks_.MergeFrom(from.stacks_);
  711. cached_has_bits = from._has_bits_[0];
  712. if (cached_has_bits & 0x00000003u) {
  713. if (cached_has_bits & 0x00000001u) {
  714. tilewidth_ = from.tilewidth_;
  715. }
  716. if (cached_has_bits & 0x00000002u) {
  717. tileheight_ = from.tileheight_;
  718. }
  719. _has_bits_[0] |= cached_has_bits;
  720. }
  721. }
  722. void LevelData::CopyFrom(const LevelData& from) {
  723. // @@protoc_insertion_point(class_specific_copy_from_start:LevelData)
  724. if (&from == this) return;
  725. Clear();
  726. MergeFrom(from);
  727. }
  728. bool LevelData::IsInitialized() const {
  729. return true;
  730. }
  731. void LevelData::InternalSwap(LevelData* other) {
  732. using std::swap;
  733. _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  734. swap(_has_bits_[0], other->_has_bits_[0]);
  735. tiles_.InternalSwap(&other->tiles_);
  736. stacks_.InternalSwap(&other->stacks_);
  737. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  738. PROTOBUF_FIELD_OFFSET(LevelData, tileheight_)
  739. + sizeof(LevelData::tileheight_)
  740. - PROTOBUF_FIELD_OFFSET(LevelData, tilewidth_)>(
  741. reinterpret_cast<char*>(&tilewidth_),
  742. reinterpret_cast<char*>(&other->tilewidth_));
  743. }
  744. std::string LevelData::GetTypeName() const {
  745. return "LevelData";
  746. }
  747. // ===================================================================
  748. class t_tile::_Internal {
  749. public:
  750. using HasBits = decltype(std::declval<t_tile>()._has_bits_);
  751. static void set_has_x(HasBits* has_bits) {
  752. (*has_bits)[0] |= 2u;
  753. }
  754. static void set_has_y(HasBits* has_bits) {
  755. (*has_bits)[0] |= 4u;
  756. }
  757. static void set_has_z(HasBits* has_bits) {
  758. (*has_bits)[0] |= 8u;
  759. }
  760. static const ::t_tile_data& tiledata(const t_tile* msg);
  761. static void set_has_tiledata(HasBits* has_bits) {
  762. (*has_bits)[0] |= 1u;
  763. }
  764. };
  765. const ::t_tile_data&
  766. t_tile::_Internal::tiledata(const t_tile* msg) {
  767. return *msg->tiledata_;
  768. }
  769. t_tile::t_tile(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  770. : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  771. SharedCtor();
  772. RegisterArenaDtor(arena);
  773. // @@protoc_insertion_point(arena_constructor:t_tile)
  774. }
  775. t_tile::t_tile(const t_tile& from)
  776. : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
  777. _has_bits_(from._has_bits_) {
  778. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  779. if (from._internal_has_tiledata()) {
  780. tiledata_ = new ::t_tile_data(*from.tiledata_);
  781. } else {
  782. tiledata_ = nullptr;
  783. }
  784. ::memcpy(&x_, &from.x_,
  785. static_cast<size_t>(reinterpret_cast<char*>(&z_) -
  786. reinterpret_cast<char*>(&x_)) + sizeof(z_));
  787. // @@protoc_insertion_point(copy_constructor:t_tile)
  788. }
  789. void t_tile::SharedCtor() {
  790. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  791. reinterpret_cast<char*>(&tiledata_) - reinterpret_cast<char*>(this)),
  792. 0, static_cast<size_t>(reinterpret_cast<char*>(&z_) -
  793. reinterpret_cast<char*>(&tiledata_)) + sizeof(z_));
  794. }
  795. t_tile::~t_tile() {
  796. // @@protoc_insertion_point(destructor:t_tile)
  797. SharedDtor();
  798. _internal_metadata_.Delete<std::string>();
  799. }
  800. void t_tile::SharedDtor() {
  801. GOOGLE_DCHECK(GetArena() == nullptr);
  802. if (this != internal_default_instance()) delete tiledata_;
  803. }
  804. void t_tile::ArenaDtor(void* object) {
  805. t_tile* _this = reinterpret_cast< t_tile* >(object);
  806. (void)_this;
  807. }
  808. void t_tile::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  809. }
  810. void t_tile::SetCachedSize(int size) const {
  811. _cached_size_.Set(size);
  812. }
  813. void t_tile::Clear() {
  814. // @@protoc_insertion_point(message_clear_start:t_tile)
  815. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  816. // Prevent compiler warnings about cached_has_bits being unused
  817. (void) cached_has_bits;
  818. cached_has_bits = _has_bits_[0];
  819. if (cached_has_bits & 0x00000001u) {
  820. if (GetArena() == nullptr && tiledata_ != nullptr) {
  821. delete tiledata_;
  822. }
  823. tiledata_ = nullptr;
  824. }
  825. if (cached_has_bits & 0x0000000eu) {
  826. ::memset(&x_, 0, static_cast<size_t>(
  827. reinterpret_cast<char*>(&z_) -
  828. reinterpret_cast<char*>(&x_)) + sizeof(z_));
  829. }
  830. _has_bits_.Clear();
  831. _internal_metadata_.Clear<std::string>();
  832. }
  833. const char* t_tile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  834. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  835. _Internal::HasBits has_bits{};
  836. while (!ctx->Done(&ptr)) {
  837. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  838. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  839. CHK_(ptr);
  840. switch (tag >> 3) {
  841. // int32 x = 1;
  842. case 1:
  843. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  844. _Internal::set_has_x(&has_bits);
  845. x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  846. CHK_(ptr);
  847. } else goto handle_unusual;
  848. continue;
  849. // int32 y = 2;
  850. case 2:
  851. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
  852. _Internal::set_has_y(&has_bits);
  853. y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  854. CHK_(ptr);
  855. } else goto handle_unusual;
  856. continue;
  857. // int32 z = 3;
  858. case 3:
  859. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  860. _Internal::set_has_z(&has_bits);
  861. z_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  862. CHK_(ptr);
  863. } else goto handle_unusual;
  864. continue;
  865. // .t_tile_data tileData = 4;
  866. case 4:
  867. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  868. ptr = ctx->ParseMessage(_internal_mutable_tiledata(), ptr);
  869. CHK_(ptr);
  870. } else goto handle_unusual;
  871. continue;
  872. default: {
  873. handle_unusual:
  874. if ((tag & 7) == 4 || tag == 0) {
  875. ctx->SetLastTag(tag);
  876. goto success;
  877. }
  878. ptr = UnknownFieldParse(tag,
  879. _internal_metadata_.mutable_unknown_fields<std::string>(),
  880. ptr, ctx);
  881. CHK_(ptr != nullptr);
  882. continue;
  883. }
  884. } // switch
  885. } // while
  886. success:
  887. _has_bits_.Or(has_bits);
  888. return ptr;
  889. failure:
  890. ptr = nullptr;
  891. goto success;
  892. #undef CHK_
  893. }
  894. ::PROTOBUF_NAMESPACE_ID::uint8* t_tile::_InternalSerialize(
  895. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  896. // @@protoc_insertion_point(serialize_to_array_start:t_tile)
  897. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  898. (void) cached_has_bits;
  899. // int32 x = 1;
  900. if (_internal_has_x()) {
  901. target = stream->EnsureSpace(target);
  902. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_x(), target);
  903. }
  904. // int32 y = 2;
  905. if (_internal_has_y()) {
  906. target = stream->EnsureSpace(target);
  907. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_y(), target);
  908. }
  909. // int32 z = 3;
  910. if (_internal_has_z()) {
  911. target = stream->EnsureSpace(target);
  912. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_z(), target);
  913. }
  914. // .t_tile_data tileData = 4;
  915. if (_internal_has_tiledata()) {
  916. target = stream->EnsureSpace(target);
  917. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  918. InternalWriteMessage(
  919. 4, _Internal::tiledata(this), target, stream);
  920. }
  921. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  922. target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
  923. static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  924. }
  925. // @@protoc_insertion_point(serialize_to_array_end:t_tile)
  926. return target;
  927. }
  928. size_t t_tile::ByteSizeLong() const {
  929. // @@protoc_insertion_point(message_byte_size_start:t_tile)
  930. size_t total_size = 0;
  931. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  932. // Prevent compiler warnings about cached_has_bits being unused
  933. (void) cached_has_bits;
  934. cached_has_bits = _has_bits_[0];
  935. if (cached_has_bits & 0x0000000fu) {
  936. // .t_tile_data tileData = 4;
  937. if (cached_has_bits & 0x00000001u) {
  938. total_size += 1 +
  939. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  940. *tiledata_);
  941. }
  942. // int32 x = 1;
  943. if (cached_has_bits & 0x00000002u) {
  944. total_size += 1 +
  945. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  946. this->_internal_x());
  947. }
  948. // int32 y = 2;
  949. if (cached_has_bits & 0x00000004u) {
  950. total_size += 1 +
  951. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  952. this->_internal_y());
  953. }
  954. // int32 z = 3;
  955. if (cached_has_bits & 0x00000008u) {
  956. total_size += 1 +
  957. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  958. this->_internal_z());
  959. }
  960. }
  961. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  962. total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  963. }
  964. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  965. SetCachedSize(cached_size);
  966. return total_size;
  967. }
  968. void t_tile::CheckTypeAndMergeFrom(
  969. const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  970. MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_tile*>(
  971. &from));
  972. }
  973. void t_tile::MergeFrom(const t_tile& from) {
  974. // @@protoc_insertion_point(class_specific_merge_from_start:t_tile)
  975. GOOGLE_DCHECK_NE(&from, this);
  976. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  977. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  978. (void) cached_has_bits;
  979. cached_has_bits = from._has_bits_[0];
  980. if (cached_has_bits & 0x0000000fu) {
  981. if (cached_has_bits & 0x00000001u) {
  982. _internal_mutable_tiledata()->::t_tile_data::MergeFrom(from._internal_tiledata());
  983. }
  984. if (cached_has_bits & 0x00000002u) {
  985. x_ = from.x_;
  986. }
  987. if (cached_has_bits & 0x00000004u) {
  988. y_ = from.y_;
  989. }
  990. if (cached_has_bits & 0x00000008u) {
  991. z_ = from.z_;
  992. }
  993. _has_bits_[0] |= cached_has_bits;
  994. }
  995. }
  996. void t_tile::CopyFrom(const t_tile& from) {
  997. // @@protoc_insertion_point(class_specific_copy_from_start:t_tile)
  998. if (&from == this) return;
  999. Clear();
  1000. MergeFrom(from);
  1001. }
  1002. bool t_tile::IsInitialized() const {
  1003. return true;
  1004. }
  1005. void t_tile::InternalSwap(t_tile* other) {
  1006. using std::swap;
  1007. _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  1008. swap(_has_bits_[0], other->_has_bits_[0]);
  1009. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1010. PROTOBUF_FIELD_OFFSET(t_tile, z_)
  1011. + sizeof(t_tile::z_)
  1012. - PROTOBUF_FIELD_OFFSET(t_tile, tiledata_)>(
  1013. reinterpret_cast<char*>(&tiledata_),
  1014. reinterpret_cast<char*>(&other->tiledata_));
  1015. }
  1016. std::string t_tile::GetTypeName() const {
  1017. return "t_tile";
  1018. }
  1019. // ===================================================================
  1020. class t_tile_data::_Internal {
  1021. public:
  1022. using HasBits = decltype(std::declval<t_tile_data>()._has_bits_);
  1023. static void set_has_type(HasBits* has_bits) {
  1024. (*has_bits)[0] |= 1u;
  1025. }
  1026. static void set_has_subtype(HasBits* has_bits) {
  1027. (*has_bits)[0] |= 2u;
  1028. }
  1029. static void set_has_id(HasBits* has_bits) {
  1030. (*has_bits)[0] |= 4u;
  1031. }
  1032. static void set_has_zv(HasBits* has_bits) {
  1033. (*has_bits)[0] |= 8u;
  1034. }
  1035. static void set_has_weight(HasBits* has_bits) {
  1036. (*has_bits)[0] |= 16u;
  1037. }
  1038. };
  1039. t_tile_data::t_tile_data(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  1040. : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  1041. SharedCtor();
  1042. RegisterArenaDtor(arena);
  1043. // @@protoc_insertion_point(arena_constructor:t_tile_data)
  1044. }
  1045. t_tile_data::t_tile_data(const t_tile_data& from)
  1046. : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
  1047. _has_bits_(from._has_bits_) {
  1048. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  1049. ::memcpy(&type_, &from.type_,
  1050. static_cast<size_t>(reinterpret_cast<char*>(&weight_) -
  1051. reinterpret_cast<char*>(&type_)) + sizeof(weight_));
  1052. // @@protoc_insertion_point(copy_constructor:t_tile_data)
  1053. }
  1054. void t_tile_data::SharedCtor() {
  1055. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  1056. reinterpret_cast<char*>(&type_) - reinterpret_cast<char*>(this)),
  1057. 0, static_cast<size_t>(reinterpret_cast<char*>(&weight_) -
  1058. reinterpret_cast<char*>(&type_)) + sizeof(weight_));
  1059. }
  1060. t_tile_data::~t_tile_data() {
  1061. // @@protoc_insertion_point(destructor:t_tile_data)
  1062. SharedDtor();
  1063. _internal_metadata_.Delete<std::string>();
  1064. }
  1065. void t_tile_data::SharedDtor() {
  1066. GOOGLE_DCHECK(GetArena() == nullptr);
  1067. }
  1068. void t_tile_data::ArenaDtor(void* object) {
  1069. t_tile_data* _this = reinterpret_cast< t_tile_data* >(object);
  1070. (void)_this;
  1071. }
  1072. void t_tile_data::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  1073. }
  1074. void t_tile_data::SetCachedSize(int size) const {
  1075. _cached_size_.Set(size);
  1076. }
  1077. void t_tile_data::Clear() {
  1078. // @@protoc_insertion_point(message_clear_start:t_tile_data)
  1079. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1080. // Prevent compiler warnings about cached_has_bits being unused
  1081. (void) cached_has_bits;
  1082. cached_has_bits = _has_bits_[0];
  1083. if (cached_has_bits & 0x0000001fu) {
  1084. ::memset(&type_, 0, static_cast<size_t>(
  1085. reinterpret_cast<char*>(&weight_) -
  1086. reinterpret_cast<char*>(&type_)) + sizeof(weight_));
  1087. }
  1088. _has_bits_.Clear();
  1089. _internal_metadata_.Clear<std::string>();
  1090. }
  1091. const char* t_tile_data::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1092. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1093. _Internal::HasBits has_bits{};
  1094. while (!ctx->Done(&ptr)) {
  1095. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1096. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1097. CHK_(ptr);
  1098. switch (tag >> 3) {
  1099. // int32 type = 1;
  1100. case 1:
  1101. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  1102. _Internal::set_has_type(&has_bits);
  1103. type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1104. CHK_(ptr);
  1105. } else goto handle_unusual;
  1106. continue;
  1107. // int32 subtype = 2;
  1108. case 2:
  1109. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
  1110. _Internal::set_has_subtype(&has_bits);
  1111. subtype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1112. CHK_(ptr);
  1113. } else goto handle_unusual;
  1114. continue;
  1115. // int32 id = 3;
  1116. case 3:
  1117. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  1118. _Internal::set_has_id(&has_bits);
  1119. id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1120. CHK_(ptr);
  1121. } else goto handle_unusual;
  1122. continue;
  1123. // int32 zv = 4;
  1124. case 4:
  1125. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  1126. _Internal::set_has_zv(&has_bits);
  1127. zv_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1128. CHK_(ptr);
  1129. } else goto handle_unusual;
  1130. continue;
  1131. // int32 weight = 5;
  1132. case 5:
  1133. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
  1134. _Internal::set_has_weight(&has_bits);
  1135. weight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1136. CHK_(ptr);
  1137. } else goto handle_unusual;
  1138. continue;
  1139. default: {
  1140. handle_unusual:
  1141. if ((tag & 7) == 4 || tag == 0) {
  1142. ctx->SetLastTag(tag);
  1143. goto success;
  1144. }
  1145. ptr = UnknownFieldParse(tag,
  1146. _internal_metadata_.mutable_unknown_fields<std::string>(),
  1147. ptr, ctx);
  1148. CHK_(ptr != nullptr);
  1149. continue;
  1150. }
  1151. } // switch
  1152. } // while
  1153. success:
  1154. _has_bits_.Or(has_bits);
  1155. return ptr;
  1156. failure:
  1157. ptr = nullptr;
  1158. goto success;
  1159. #undef CHK_
  1160. }
  1161. ::PROTOBUF_NAMESPACE_ID::uint8* t_tile_data::_InternalSerialize(
  1162. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1163. // @@protoc_insertion_point(serialize_to_array_start:t_tile_data)
  1164. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1165. (void) cached_has_bits;
  1166. // int32 type = 1;
  1167. if (_internal_has_type()) {
  1168. target = stream->EnsureSpace(target);
  1169. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_type(), target);
  1170. }
  1171. // int32 subtype = 2;
  1172. if (_internal_has_subtype()) {
  1173. target = stream->EnsureSpace(target);
  1174. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_subtype(), target);
  1175. }
  1176. // int32 id = 3;
  1177. if (_internal_has_id()) {
  1178. target = stream->EnsureSpace(target);
  1179. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_id(), target);
  1180. }
  1181. // int32 zv = 4;
  1182. if (_internal_has_zv()) {
  1183. target = stream->EnsureSpace(target);
  1184. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_zv(), target);
  1185. }
  1186. // int32 weight = 5;
  1187. if (_internal_has_weight()) {
  1188. target = stream->EnsureSpace(target);
  1189. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_weight(), target);
  1190. }
  1191. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1192. target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
  1193. static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  1194. }
  1195. // @@protoc_insertion_point(serialize_to_array_end:t_tile_data)
  1196. return target;
  1197. }
  1198. size_t t_tile_data::ByteSizeLong() const {
  1199. // @@protoc_insertion_point(message_byte_size_start:t_tile_data)
  1200. size_t total_size = 0;
  1201. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1202. // Prevent compiler warnings about cached_has_bits being unused
  1203. (void) cached_has_bits;
  1204. cached_has_bits = _has_bits_[0];
  1205. if (cached_has_bits & 0x0000001fu) {
  1206. // int32 type = 1;
  1207. if (cached_has_bits & 0x00000001u) {
  1208. total_size += 1 +
  1209. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1210. this->_internal_type());
  1211. }
  1212. // int32 subtype = 2;
  1213. if (cached_has_bits & 0x00000002u) {
  1214. total_size += 1 +
  1215. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1216. this->_internal_subtype());
  1217. }
  1218. // int32 id = 3;
  1219. if (cached_has_bits & 0x00000004u) {
  1220. total_size += 1 +
  1221. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1222. this->_internal_id());
  1223. }
  1224. // int32 zv = 4;
  1225. if (cached_has_bits & 0x00000008u) {
  1226. total_size += 1 +
  1227. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1228. this->_internal_zv());
  1229. }
  1230. // int32 weight = 5;
  1231. if (cached_has_bits & 0x00000010u) {
  1232. total_size += 1 +
  1233. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1234. this->_internal_weight());
  1235. }
  1236. }
  1237. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1238. total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  1239. }
  1240. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  1241. SetCachedSize(cached_size);
  1242. return total_size;
  1243. }
  1244. void t_tile_data::CheckTypeAndMergeFrom(
  1245. const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  1246. MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_tile_data*>(
  1247. &from));
  1248. }
  1249. void t_tile_data::MergeFrom(const t_tile_data& from) {
  1250. // @@protoc_insertion_point(class_specific_merge_from_start:t_tile_data)
  1251. GOOGLE_DCHECK_NE(&from, this);
  1252. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  1253. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1254. (void) cached_has_bits;
  1255. cached_has_bits = from._has_bits_[0];
  1256. if (cached_has_bits & 0x0000001fu) {
  1257. if (cached_has_bits & 0x00000001u) {
  1258. type_ = from.type_;
  1259. }
  1260. if (cached_has_bits & 0x00000002u) {
  1261. subtype_ = from.subtype_;
  1262. }
  1263. if (cached_has_bits & 0x00000004u) {
  1264. id_ = from.id_;
  1265. }
  1266. if (cached_has_bits & 0x00000008u) {
  1267. zv_ = from.zv_;
  1268. }
  1269. if (cached_has_bits & 0x00000010u) {
  1270. weight_ = from.weight_;
  1271. }
  1272. _has_bits_[0] |= cached_has_bits;
  1273. }
  1274. }
  1275. void t_tile_data::CopyFrom(const t_tile_data& from) {
  1276. // @@protoc_insertion_point(class_specific_copy_from_start:t_tile_data)
  1277. if (&from == this) return;
  1278. Clear();
  1279. MergeFrom(from);
  1280. }
  1281. bool t_tile_data::IsInitialized() const {
  1282. return true;
  1283. }
  1284. void t_tile_data::InternalSwap(t_tile_data* other) {
  1285. using std::swap;
  1286. _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  1287. swap(_has_bits_[0], other->_has_bits_[0]);
  1288. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1289. PROTOBUF_FIELD_OFFSET(t_tile_data, weight_)
  1290. + sizeof(t_tile_data::weight_)
  1291. - PROTOBUF_FIELD_OFFSET(t_tile_data, type_)>(
  1292. reinterpret_cast<char*>(&type_),
  1293. reinterpret_cast<char*>(&other->type_));
  1294. }
  1295. std::string t_tile_data::GetTypeName() const {
  1296. return "t_tile_data";
  1297. }
  1298. // ===================================================================
  1299. class t_stack::_Internal {
  1300. public:
  1301. using HasBits = decltype(std::declval<t_stack>()._has_bits_);
  1302. static void set_has_x(HasBits* has_bits) {
  1303. (*has_bits)[0] |= 1u;
  1304. }
  1305. static void set_has_y(HasBits* has_bits) {
  1306. (*has_bits)[0] |= 2u;
  1307. }
  1308. static void set_has_direction(HasBits* has_bits) {
  1309. (*has_bits)[0] |= 4u;
  1310. }
  1311. static void set_has_depth(HasBits* has_bits) {
  1312. (*has_bits)[0] |= 8u;
  1313. }
  1314. };
  1315. t_stack::t_stack(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  1316. : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
  1317. tiledatas_(arena) {
  1318. SharedCtor();
  1319. RegisterArenaDtor(arena);
  1320. // @@protoc_insertion_point(arena_constructor:t_stack)
  1321. }
  1322. t_stack::t_stack(const t_stack& from)
  1323. : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
  1324. _has_bits_(from._has_bits_),
  1325. tiledatas_(from.tiledatas_) {
  1326. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  1327. ::memcpy(&x_, &from.x_,
  1328. static_cast<size_t>(reinterpret_cast<char*>(&depth_) -
  1329. reinterpret_cast<char*>(&x_)) + sizeof(depth_));
  1330. // @@protoc_insertion_point(copy_constructor:t_stack)
  1331. }
  1332. void t_stack::SharedCtor() {
  1333. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  1334. reinterpret_cast<char*>(&x_) - reinterpret_cast<char*>(this)),
  1335. 0, static_cast<size_t>(reinterpret_cast<char*>(&depth_) -
  1336. reinterpret_cast<char*>(&x_)) + sizeof(depth_));
  1337. }
  1338. t_stack::~t_stack() {
  1339. // @@protoc_insertion_point(destructor:t_stack)
  1340. SharedDtor();
  1341. _internal_metadata_.Delete<std::string>();
  1342. }
  1343. void t_stack::SharedDtor() {
  1344. GOOGLE_DCHECK(GetArena() == nullptr);
  1345. }
  1346. void t_stack::ArenaDtor(void* object) {
  1347. t_stack* _this = reinterpret_cast< t_stack* >(object);
  1348. (void)_this;
  1349. }
  1350. void t_stack::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  1351. }
  1352. void t_stack::SetCachedSize(int size) const {
  1353. _cached_size_.Set(size);
  1354. }
  1355. void t_stack::Clear() {
  1356. // @@protoc_insertion_point(message_clear_start:t_stack)
  1357. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1358. // Prevent compiler warnings about cached_has_bits being unused
  1359. (void) cached_has_bits;
  1360. tiledatas_.Clear();
  1361. cached_has_bits = _has_bits_[0];
  1362. if (cached_has_bits & 0x0000000fu) {
  1363. ::memset(&x_, 0, static_cast<size_t>(
  1364. reinterpret_cast<char*>(&depth_) -
  1365. reinterpret_cast<char*>(&x_)) + sizeof(depth_));
  1366. }
  1367. _has_bits_.Clear();
  1368. _internal_metadata_.Clear<std::string>();
  1369. }
  1370. const char* t_stack::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1371. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1372. _Internal::HasBits has_bits{};
  1373. while (!ctx->Done(&ptr)) {
  1374. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1375. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1376. CHK_(ptr);
  1377. switch (tag >> 3) {
  1378. // repeated .t_tile_data tileDatas = 1;
  1379. case 1:
  1380. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  1381. ptr -= 1;
  1382. do {
  1383. ptr += 1;
  1384. ptr = ctx->ParseMessage(_internal_add_tiledatas(), ptr);
  1385. CHK_(ptr);
  1386. if (!ctx->DataAvailable(ptr)) break;
  1387. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  1388. } else goto handle_unusual;
  1389. continue;
  1390. // int32 x = 2;
  1391. case 2:
  1392. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
  1393. _Internal::set_has_x(&has_bits);
  1394. x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1395. CHK_(ptr);
  1396. } else goto handle_unusual;
  1397. continue;
  1398. // int32 y = 3;
  1399. case 3:
  1400. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  1401. _Internal::set_has_y(&has_bits);
  1402. y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1403. CHK_(ptr);
  1404. } else goto handle_unusual;
  1405. continue;
  1406. // int32 direction = 4;
  1407. case 4:
  1408. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  1409. _Internal::set_has_direction(&has_bits);
  1410. direction_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1411. CHK_(ptr);
  1412. } else goto handle_unusual;
  1413. continue;
  1414. // int32 depth = 5;
  1415. case 5:
  1416. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
  1417. _Internal::set_has_depth(&has_bits);
  1418. depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1419. CHK_(ptr);
  1420. } else goto handle_unusual;
  1421. continue;
  1422. default: {
  1423. handle_unusual:
  1424. if ((tag & 7) == 4 || tag == 0) {
  1425. ctx->SetLastTag(tag);
  1426. goto success;
  1427. }
  1428. ptr = UnknownFieldParse(tag,
  1429. _internal_metadata_.mutable_unknown_fields<std::string>(),
  1430. ptr, ctx);
  1431. CHK_(ptr != nullptr);
  1432. continue;
  1433. }
  1434. } // switch
  1435. } // while
  1436. success:
  1437. _has_bits_.Or(has_bits);
  1438. return ptr;
  1439. failure:
  1440. ptr = nullptr;
  1441. goto success;
  1442. #undef CHK_
  1443. }
  1444. ::PROTOBUF_NAMESPACE_ID::uint8* t_stack::_InternalSerialize(
  1445. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1446. // @@protoc_insertion_point(serialize_to_array_start:t_stack)
  1447. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1448. (void) cached_has_bits;
  1449. // repeated .t_tile_data tileDatas = 1;
  1450. for (unsigned int i = 0,
  1451. n = static_cast<unsigned int>(this->_internal_tiledatas_size()); i < n; i++) {
  1452. target = stream->EnsureSpace(target);
  1453. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1454. InternalWriteMessage(1, this->_internal_tiledatas(i), target, stream);
  1455. }
  1456. // int32 x = 2;
  1457. if (_internal_has_x()) {
  1458. target = stream->EnsureSpace(target);
  1459. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_x(), target);
  1460. }
  1461. // int32 y = 3;
  1462. if (_internal_has_y()) {
  1463. target = stream->EnsureSpace(target);
  1464. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_y(), target);
  1465. }
  1466. // int32 direction = 4;
  1467. if (_internal_has_direction()) {
  1468. target = stream->EnsureSpace(target);
  1469. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_direction(), target);
  1470. }
  1471. // int32 depth = 5;
  1472. if (_internal_has_depth()) {
  1473. target = stream->EnsureSpace(target);
  1474. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_depth(), target);
  1475. }
  1476. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1477. target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
  1478. static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  1479. }
  1480. // @@protoc_insertion_point(serialize_to_array_end:t_stack)
  1481. return target;
  1482. }
  1483. size_t t_stack::ByteSizeLong() const {
  1484. // @@protoc_insertion_point(message_byte_size_start:t_stack)
  1485. size_t total_size = 0;
  1486. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1487. // Prevent compiler warnings about cached_has_bits being unused
  1488. (void) cached_has_bits;
  1489. // repeated .t_tile_data tileDatas = 1;
  1490. total_size += 1UL * this->_internal_tiledatas_size();
  1491. for (const auto& msg : this->tiledatas_) {
  1492. total_size +=
  1493. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  1494. }
  1495. cached_has_bits = _has_bits_[0];
  1496. if (cached_has_bits & 0x0000000fu) {
  1497. // int32 x = 2;
  1498. if (cached_has_bits & 0x00000001u) {
  1499. total_size += 1 +
  1500. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1501. this->_internal_x());
  1502. }
  1503. // int32 y = 3;
  1504. if (cached_has_bits & 0x00000002u) {
  1505. total_size += 1 +
  1506. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1507. this->_internal_y());
  1508. }
  1509. // int32 direction = 4;
  1510. if (cached_has_bits & 0x00000004u) {
  1511. total_size += 1 +
  1512. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1513. this->_internal_direction());
  1514. }
  1515. // int32 depth = 5;
  1516. if (cached_has_bits & 0x00000008u) {
  1517. total_size += 1 +
  1518. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  1519. this->_internal_depth());
  1520. }
  1521. }
  1522. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1523. total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  1524. }
  1525. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  1526. SetCachedSize(cached_size);
  1527. return total_size;
  1528. }
  1529. void t_stack::CheckTypeAndMergeFrom(
  1530. const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  1531. MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_stack*>(
  1532. &from));
  1533. }
  1534. void t_stack::MergeFrom(const t_stack& from) {
  1535. // @@protoc_insertion_point(class_specific_merge_from_start:t_stack)
  1536. GOOGLE_DCHECK_NE(&from, this);
  1537. _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  1538. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1539. (void) cached_has_bits;
  1540. tiledatas_.MergeFrom(from.tiledatas_);
  1541. cached_has_bits = from._has_bits_[0];
  1542. if (cached_has_bits & 0x0000000fu) {
  1543. if (cached_has_bits & 0x00000001u) {
  1544. x_ = from.x_;
  1545. }
  1546. if (cached_has_bits & 0x00000002u) {
  1547. y_ = from.y_;
  1548. }
  1549. if (cached_has_bits & 0x00000004u) {
  1550. direction_ = from.direction_;
  1551. }
  1552. if (cached_has_bits & 0x00000008u) {
  1553. depth_ = from.depth_;
  1554. }
  1555. _has_bits_[0] |= cached_has_bits;
  1556. }
  1557. }
  1558. void t_stack::CopyFrom(const t_stack& from) {
  1559. // @@protoc_insertion_point(class_specific_copy_from_start:t_stack)
  1560. if (&from == this) return;
  1561. Clear();
  1562. MergeFrom(from);
  1563. }
  1564. bool t_stack::IsInitialized() const {
  1565. return true;
  1566. }
  1567. void t_stack::InternalSwap(t_stack* other) {
  1568. using std::swap;
  1569. _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  1570. swap(_has_bits_[0], other->_has_bits_[0]);
  1571. tiledatas_.InternalSwap(&other->tiledatas_);
  1572. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1573. PROTOBUF_FIELD_OFFSET(t_stack, depth_)
  1574. + sizeof(t_stack::depth_)
  1575. - PROTOBUF_FIELD_OFFSET(t_stack, x_)>(
  1576. reinterpret_cast<char*>(&x_),
  1577. reinterpret_cast<char*>(&other->x_));
  1578. }
  1579. std::string t_stack::GetTypeName() const {
  1580. return "t_stack";
  1581. }
  1582. // @@protoc_insertion_point(namespace_scope)
  1583. PROTOBUF_NAMESPACE_OPEN
  1584. template<> PROTOBUF_NOINLINE ::LevelsIndex_LevelsIndexEntry_DoNotUse* Arena::CreateMaybeMessage< ::LevelsIndex_LevelsIndexEntry_DoNotUse >(Arena* arena) {
  1585. return Arena::CreateMessageInternal< ::LevelsIndex_LevelsIndexEntry_DoNotUse >(arena);
  1586. }
  1587. template<> PROTOBUF_NOINLINE ::LevelsIndex* Arena::CreateMaybeMessage< ::LevelsIndex >(Arena* arena) {
  1588. return Arena::CreateMessageInternal< ::LevelsIndex >(arena);
  1589. }
  1590. template<> PROTOBUF_NOINLINE ::t_offeset_len* Arena::CreateMaybeMessage< ::t_offeset_len >(Arena* arena) {
  1591. return Arena::CreateMessageInternal< ::t_offeset_len >(arena);
  1592. }
  1593. template<> PROTOBUF_NOINLINE ::LevelData* Arena::CreateMaybeMessage< ::LevelData >(Arena* arena) {
  1594. return Arena::CreateMessageInternal< ::LevelData >(arena);
  1595. }
  1596. template<> PROTOBUF_NOINLINE ::t_tile* Arena::CreateMaybeMessage< ::t_tile >(Arena* arena) {
  1597. return Arena::CreateMessageInternal< ::t_tile >(arena);
  1598. }
  1599. template<> PROTOBUF_NOINLINE ::t_tile_data* Arena::CreateMaybeMessage< ::t_tile_data >(Arena* arena) {
  1600. return Arena::CreateMessageInternal< ::t_tile_data >(arena);
  1601. }
  1602. template<> PROTOBUF_NOINLINE ::t_stack* Arena::CreateMaybeMessage< ::t_stack >(Arena* arena) {
  1603. return Arena::CreateMessageInternal< ::t_stack >(arena);
  1604. }
  1605. PROTOBUF_NAMESPACE_CLOSE
  1606. // @@protoc_insertion_point(global_scope)
  1607. #include <google/protobuf/port_undef.inc>