12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: levelData.proto
- #include "levelData.pb.h"
- #include <algorithm>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/extension_set.h>
- #include <google/protobuf/wire_format_lite.h>
- #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
- // @@protoc_insertion_point(includes)
- #include <google/protobuf/port_def.inc>
- PROTOBUF_PRAGMA_INIT_SEG
- constexpr LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
- struct LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal {
- constexpr LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal() {}
- union {
- LevelsIndex_LevelsIndexEntry_DoNotUse _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal _LevelsIndex_LevelsIndexEntry_DoNotUse_default_instance_;
- constexpr LevelsIndex::LevelsIndex(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : levelsindex_(){}
- struct LevelsIndexDefaultTypeInternal {
- constexpr LevelsIndexDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~LevelsIndexDefaultTypeInternal() {}
- union {
- LevelsIndex _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelsIndexDefaultTypeInternal _LevelsIndex_default_instance_;
- constexpr t_offeset_len::t_offeset_len(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : offset_(0)
- , len_(0){}
- struct t_offeset_lenDefaultTypeInternal {
- constexpr t_offeset_lenDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~t_offeset_lenDefaultTypeInternal() {}
- union {
- t_offeset_len _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_offeset_lenDefaultTypeInternal _t_offeset_len_default_instance_;
- constexpr LevelData::LevelData(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : tiles_()
- , stacks_()
- , tilewidth_(0)
- , tileheight_(0){}
- struct LevelDataDefaultTypeInternal {
- constexpr LevelDataDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~LevelDataDefaultTypeInternal() {}
- union {
- LevelData _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelDataDefaultTypeInternal _LevelData_default_instance_;
- constexpr t_tile::t_tile(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : tiledata_(nullptr)
- , x_(0)
- , y_(0)
- , z_(0){}
- struct t_tileDefaultTypeInternal {
- constexpr t_tileDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~t_tileDefaultTypeInternal() {}
- union {
- t_tile _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_tileDefaultTypeInternal _t_tile_default_instance_;
- constexpr t_tile_data::t_tile_data(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : type_(0)
- , subtype_(0)
- , id_(0)
- , zv_(0)
- , weight_(0){}
- struct t_tile_dataDefaultTypeInternal {
- constexpr t_tile_dataDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~t_tile_dataDefaultTypeInternal() {}
- union {
- t_tile_data _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_tile_dataDefaultTypeInternal _t_tile_data_default_instance_;
- constexpr t_stack::t_stack(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : tiledatas_()
- , x_(0)
- , y_(0)
- , direction_(0)
- , depth_(0){}
- struct t_stackDefaultTypeInternal {
- constexpr t_stackDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~t_stackDefaultTypeInternal() {}
- union {
- t_stack _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_stackDefaultTypeInternal _t_stack_default_instance_;
- // ===================================================================
- LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse() {}
- LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : SuperType(arena) {}
- void LevelsIndex_LevelsIndexEntry_DoNotUse::MergeFrom(const LevelsIndex_LevelsIndexEntry_DoNotUse& other) {
- MergeFromInternal(other);
- }
- // ===================================================================
- class LevelsIndex::_Internal {
- public:
- };
- LevelsIndex::LevelsIndex(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
- levelsindex_(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:LevelsIndex)
- }
- LevelsIndex::LevelsIndex(const LevelsIndex& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- levelsindex_.MergeFrom(from.levelsindex_);
- // @@protoc_insertion_point(copy_constructor:LevelsIndex)
- }
- void LevelsIndex::SharedCtor() {
- }
- LevelsIndex::~LevelsIndex() {
- // @@protoc_insertion_point(destructor:LevelsIndex)
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
- }
- void LevelsIndex::SharedDtor() {
- GOOGLE_DCHECK(GetArena() == nullptr);
- }
- void LevelsIndex::ArenaDtor(void* object) {
- LevelsIndex* _this = reinterpret_cast< LevelsIndex* >(object);
- (void)_this;
- }
- void LevelsIndex::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void LevelsIndex::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void LevelsIndex::Clear() {
- // @@protoc_insertion_point(message_clear_start:LevelsIndex)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- levelsindex_.Clear();
- _internal_metadata_.Clear<std::string>();
- }
- const char* LevelsIndex::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // map<string, .t_offeset_len> LevelsIndex = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(&levelsindex_, ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag,
- _internal_metadata_.mutable_unknown_fields<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* LevelsIndex::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:LevelsIndex)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // map<string, .t_offeset_len> LevelsIndex = 1;
- if (!this->_internal_levelsindex().empty()) {
- typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_pointer
- ConstPtr;
- typedef ConstPtr SortItem;
- typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
- struct Utf8Check {
- static void Check(ConstPtr p) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), static_cast<int>(p->first.length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "LevelsIndex.LevelsIndexEntry.key");
- }
- };
- if (stream->IsSerializationDeterministic() &&
- this->_internal_levelsindex().size() > 1) {
- ::std::unique_ptr<SortItem[]> items(
- new SortItem[this->_internal_levelsindex().size()]);
- typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::size_type size_type;
- size_type n = 0;
- for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
- it = this->_internal_levelsindex().begin();
- it != this->_internal_levelsindex().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
- }
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- for (size_type i = 0; i < n; i++) {
- target = LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
- Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
- }
- } else {
- for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
- it = this->_internal_levelsindex().begin();
- it != this->_internal_levelsindex().end(); ++it) {
- target = LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream);
- Utf8Check::Check(&(*it));
- }
- }
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:LevelsIndex)
- return target;
- }
- size_t LevelsIndex::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:LevelsIndex)
- size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // map<string, .t_offeset_len> LevelsIndex = 1;
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_levelsindex_size());
- for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
- it = this->_internal_levelsindex().begin();
- it != this->_internal_levelsindex().end(); ++it) {
- total_size += LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void LevelsIndex::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const LevelsIndex*>(
- &from));
- }
- void LevelsIndex::MergeFrom(const LevelsIndex& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:LevelsIndex)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- levelsindex_.MergeFrom(from.levelsindex_);
- }
- void LevelsIndex::CopyFrom(const LevelsIndex& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:LevelsIndex)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool LevelsIndex::IsInitialized() const {
- return true;
- }
- void LevelsIndex::InternalSwap(LevelsIndex* other) {
- using std::swap;
- _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
- levelsindex_.Swap(&other->levelsindex_);
- }
- std::string LevelsIndex::GetTypeName() const {
- return "LevelsIndex";
- }
- // ===================================================================
- class t_offeset_len::_Internal {
- public:
- };
- t_offeset_len::t_offeset_len(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:t_offeset_len)
- }
- t_offeset_len::t_offeset_len(const t_offeset_len& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::memcpy(&offset_, &from.offset_,
- static_cast<size_t>(reinterpret_cast<char*>(&len_) -
- reinterpret_cast<char*>(&offset_)) + sizeof(len_));
- // @@protoc_insertion_point(copy_constructor:t_offeset_len)
- }
- void t_offeset_len::SharedCtor() {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&offset_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&len_) -
- reinterpret_cast<char*>(&offset_)) + sizeof(len_));
- }
- t_offeset_len::~t_offeset_len() {
- // @@protoc_insertion_point(destructor:t_offeset_len)
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
- }
- void t_offeset_len::SharedDtor() {
- GOOGLE_DCHECK(GetArena() == nullptr);
- }
- void t_offeset_len::ArenaDtor(void* object) {
- t_offeset_len* _this = reinterpret_cast< t_offeset_len* >(object);
- (void)_this;
- }
- void t_offeset_len::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void t_offeset_len::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void t_offeset_len::Clear() {
- // @@protoc_insertion_point(message_clear_start:t_offeset_len)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- ::memset(&offset_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&len_) -
- reinterpret_cast<char*>(&offset_)) + sizeof(len_));
- _internal_metadata_.Clear<std::string>();
- }
- const char* t_offeset_len::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // int32 offset = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 len = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag,
- _internal_metadata_.mutable_unknown_fields<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* t_offeset_len::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:t_offeset_len)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 offset = 1;
- if (this->offset() != 0) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_offset(), target);
- }
- // int32 len = 2;
- if (this->len() != 0) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_len(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:t_offeset_len)
- return target;
- }
- size_t t_offeset_len::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:t_offeset_len)
- size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // int32 offset = 1;
- if (this->offset() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_offset());
- }
- // int32 len = 2;
- if (this->len() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_len());
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void t_offeset_len::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_offeset_len*>(
- &from));
- }
- void t_offeset_len::MergeFrom(const t_offeset_len& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:t_offeset_len)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.offset() != 0) {
- _internal_set_offset(from._internal_offset());
- }
- if (from.len() != 0) {
- _internal_set_len(from._internal_len());
- }
- }
- void t_offeset_len::CopyFrom(const t_offeset_len& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:t_offeset_len)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool t_offeset_len::IsInitialized() const {
- return true;
- }
- void t_offeset_len::InternalSwap(t_offeset_len* other) {
- using std::swap;
- _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(t_offeset_len, len_)
- + sizeof(t_offeset_len::len_)
- - PROTOBUF_FIELD_OFFSET(t_offeset_len, offset_)>(
- reinterpret_cast<char*>(&offset_),
- reinterpret_cast<char*>(&other->offset_));
- }
- std::string t_offeset_len::GetTypeName() const {
- return "t_offeset_len";
- }
- // ===================================================================
- class LevelData::_Internal {
- public:
- using HasBits = decltype(std::declval<LevelData>()._has_bits_);
- static void set_has_tilewidth(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_tileheight(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- };
- LevelData::LevelData(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
- tiles_(arena),
- stacks_(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:LevelData)
- }
- LevelData::LevelData(const LevelData& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
- _has_bits_(from._has_bits_),
- tiles_(from.tiles_),
- stacks_(from.stacks_) {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::memcpy(&tilewidth_, &from.tilewidth_,
- static_cast<size_t>(reinterpret_cast<char*>(&tileheight_) -
- reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
- // @@protoc_insertion_point(copy_constructor:LevelData)
- }
- void LevelData::SharedCtor() {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&tilewidth_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&tileheight_) -
- reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
- }
- LevelData::~LevelData() {
- // @@protoc_insertion_point(destructor:LevelData)
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
- }
- void LevelData::SharedDtor() {
- GOOGLE_DCHECK(GetArena() == nullptr);
- }
- void LevelData::ArenaDtor(void* object) {
- LevelData* _this = reinterpret_cast< LevelData* >(object);
- (void)_this;
- }
- void LevelData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void LevelData::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void LevelData::Clear() {
- // @@protoc_insertion_point(message_clear_start:LevelData)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- tiles_.Clear();
- stacks_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- ::memset(&tilewidth_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&tileheight_) -
- reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<std::string>();
- }
- const char* LevelData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // repeated .t_tile tiles = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_tiles(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
- } else goto handle_unusual;
- continue;
- // repeated .t_stack stacks = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_stacks(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
- } else goto handle_unusual;
- continue;
- // int32 tileWidth = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
- _Internal::set_has_tilewidth(&has_bits);
- tilewidth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 tileHeight = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- _Internal::set_has_tileheight(&has_bits);
- tileheight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag,
- _internal_metadata_.mutable_unknown_fields<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* LevelData::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:LevelData)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .t_tile tiles = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_tiles_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(1, this->_internal_tiles(i), target, stream);
- }
- // repeated .t_stack stacks = 2;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_stacks_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(2, this->_internal_stacks(i), target, stream);
- }
- // int32 tileWidth = 3;
- if (_internal_has_tilewidth()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_tilewidth(), target);
- }
- // int32 tileHeight = 4;
- if (_internal_has_tileheight()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_tileheight(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:LevelData)
- return target;
- }
- size_t LevelData::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:LevelData)
- size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .t_tile tiles = 1;
- total_size += 1UL * this->_internal_tiles_size();
- for (const auto& msg : this->tiles_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // repeated .t_stack stacks = 2;
- total_size += 1UL * this->_internal_stacks_size();
- for (const auto& msg : this->stacks_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- // int32 tileWidth = 3;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_tilewidth());
- }
- // int32 tileHeight = 4;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_tileheight());
- }
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void LevelData::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const LevelData*>(
- &from));
- }
- void LevelData::MergeFrom(const LevelData& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:LevelData)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- tiles_.MergeFrom(from.tiles_);
- stacks_.MergeFrom(from.stacks_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- tilewidth_ = from.tilewidth_;
- }
- if (cached_has_bits & 0x00000002u) {
- tileheight_ = from.tileheight_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void LevelData::CopyFrom(const LevelData& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:LevelData)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool LevelData::IsInitialized() const {
- return true;
- }
- void LevelData::InternalSwap(LevelData* other) {
- using std::swap;
- _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- tiles_.InternalSwap(&other->tiles_);
- stacks_.InternalSwap(&other->stacks_);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(LevelData, tileheight_)
- + sizeof(LevelData::tileheight_)
- - PROTOBUF_FIELD_OFFSET(LevelData, tilewidth_)>(
- reinterpret_cast<char*>(&tilewidth_),
- reinterpret_cast<char*>(&other->tilewidth_));
- }
- std::string LevelData::GetTypeName() const {
- return "LevelData";
- }
- // ===================================================================
- class t_tile::_Internal {
- public:
- using HasBits = decltype(std::declval<t_tile>()._has_bits_);
- static void set_has_x(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static void set_has_y(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_z(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static const ::t_tile_data& tiledata(const t_tile* msg);
- static void set_has_tiledata(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- };
- const ::t_tile_data&
- t_tile::_Internal::tiledata(const t_tile* msg) {
- return *msg->tiledata_;
- }
- t_tile::t_tile(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:t_tile)
- }
- t_tile::t_tile(const t_tile& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- if (from._internal_has_tiledata()) {
- tiledata_ = new ::t_tile_data(*from.tiledata_);
- } else {
- tiledata_ = nullptr;
- }
- ::memcpy(&x_, &from.x_,
- static_cast<size_t>(reinterpret_cast<char*>(&z_) -
- reinterpret_cast<char*>(&x_)) + sizeof(z_));
- // @@protoc_insertion_point(copy_constructor:t_tile)
- }
- void t_tile::SharedCtor() {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&tiledata_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&z_) -
- reinterpret_cast<char*>(&tiledata_)) + sizeof(z_));
- }
- t_tile::~t_tile() {
- // @@protoc_insertion_point(destructor:t_tile)
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
- }
- void t_tile::SharedDtor() {
- GOOGLE_DCHECK(GetArena() == nullptr);
- if (this != internal_default_instance()) delete tiledata_;
- }
- void t_tile::ArenaDtor(void* object) {
- t_tile* _this = reinterpret_cast< t_tile* >(object);
- (void)_this;
- }
- void t_tile::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void t_tile::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void t_tile::Clear() {
- // @@protoc_insertion_point(message_clear_start:t_tile)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- if (GetArena() == nullptr && tiledata_ != nullptr) {
- delete tiledata_;
- }
- tiledata_ = nullptr;
- }
- if (cached_has_bits & 0x0000000eu) {
- ::memset(&x_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&z_) -
- reinterpret_cast<char*>(&x_)) + sizeof(z_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<std::string>();
- }
- const char* t_tile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // int32 x = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- _Internal::set_has_x(&has_bits);
- x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 y = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- _Internal::set_has_y(&has_bits);
- y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 z = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
- _Internal::set_has_z(&has_bits);
- z_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // .t_tile_data tileData = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
- ptr = ctx->ParseMessage(_internal_mutable_tiledata(), ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag,
- _internal_metadata_.mutable_unknown_fields<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* t_tile::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:t_tile)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 x = 1;
- if (_internal_has_x()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_x(), target);
- }
- // int32 y = 2;
- if (_internal_has_y()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_y(), target);
- }
- // int32 z = 3;
- if (_internal_has_z()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_z(), target);
- }
- // .t_tile_data tileData = 4;
- if (_internal_has_tiledata()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 4, _Internal::tiledata(this), target, stream);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:t_tile)
- return target;
- }
- size_t t_tile::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:t_tile)
- size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- // .t_tile_data tileData = 4;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *tiledata_);
- }
- // int32 x = 1;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_x());
- }
- // int32 y = 2;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_y());
- }
- // int32 z = 3;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_z());
- }
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void t_tile::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_tile*>(
- &from));
- }
- void t_tile::MergeFrom(const t_tile& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:t_tile)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- _internal_mutable_tiledata()->::t_tile_data::MergeFrom(from._internal_tiledata());
- }
- if (cached_has_bits & 0x00000002u) {
- x_ = from.x_;
- }
- if (cached_has_bits & 0x00000004u) {
- y_ = from.y_;
- }
- if (cached_has_bits & 0x00000008u) {
- z_ = from.z_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void t_tile::CopyFrom(const t_tile& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:t_tile)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool t_tile::IsInitialized() const {
- return true;
- }
- void t_tile::InternalSwap(t_tile* other) {
- using std::swap;
- _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(t_tile, z_)
- + sizeof(t_tile::z_)
- - PROTOBUF_FIELD_OFFSET(t_tile, tiledata_)>(
- reinterpret_cast<char*>(&tiledata_),
- reinterpret_cast<char*>(&other->tiledata_));
- }
- std::string t_tile::GetTypeName() const {
- return "t_tile";
- }
- // ===================================================================
- class t_tile_data::_Internal {
- public:
- using HasBits = decltype(std::declval<t_tile_data>()._has_bits_);
- static void set_has_type(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_subtype(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static void set_has_id(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_zv(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static void set_has_weight(HasBits* has_bits) {
- (*has_bits)[0] |= 16u;
- }
- };
- t_tile_data::t_tile_data(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:t_tile_data)
- }
- t_tile_data::t_tile_data(const t_tile_data& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::memcpy(&type_, &from.type_,
- static_cast<size_t>(reinterpret_cast<char*>(&weight_) -
- reinterpret_cast<char*>(&type_)) + sizeof(weight_));
- // @@protoc_insertion_point(copy_constructor:t_tile_data)
- }
- void t_tile_data::SharedCtor() {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&type_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&weight_) -
- reinterpret_cast<char*>(&type_)) + sizeof(weight_));
- }
- t_tile_data::~t_tile_data() {
- // @@protoc_insertion_point(destructor:t_tile_data)
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
- }
- void t_tile_data::SharedDtor() {
- GOOGLE_DCHECK(GetArena() == nullptr);
- }
- void t_tile_data::ArenaDtor(void* object) {
- t_tile_data* _this = reinterpret_cast< t_tile_data* >(object);
- (void)_this;
- }
- void t_tile_data::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void t_tile_data::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void t_tile_data::Clear() {
- // @@protoc_insertion_point(message_clear_start:t_tile_data)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000001fu) {
- ::memset(&type_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&weight_) -
- reinterpret_cast<char*>(&type_)) + sizeof(weight_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<std::string>();
- }
- const char* t_tile_data::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // int32 type = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- _Internal::set_has_type(&has_bits);
- type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 subtype = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- _Internal::set_has_subtype(&has_bits);
- subtype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 id = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
- _Internal::set_has_id(&has_bits);
- id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 zv = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- _Internal::set_has_zv(&has_bits);
- zv_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 weight = 5;
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
- _Internal::set_has_weight(&has_bits);
- weight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag,
- _internal_metadata_.mutable_unknown_fields<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* t_tile_data::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:t_tile_data)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 type = 1;
- if (_internal_has_type()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_type(), target);
- }
- // int32 subtype = 2;
- if (_internal_has_subtype()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_subtype(), target);
- }
- // int32 id = 3;
- if (_internal_has_id()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_id(), target);
- }
- // int32 zv = 4;
- if (_internal_has_zv()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_zv(), target);
- }
- // int32 weight = 5;
- if (_internal_has_weight()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_weight(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:t_tile_data)
- return target;
- }
- size_t t_tile_data::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:t_tile_data)
- size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000001fu) {
- // int32 type = 1;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_type());
- }
- // int32 subtype = 2;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_subtype());
- }
- // int32 id = 3;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_id());
- }
- // int32 zv = 4;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_zv());
- }
- // int32 weight = 5;
- if (cached_has_bits & 0x00000010u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_weight());
- }
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void t_tile_data::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_tile_data*>(
- &from));
- }
- void t_tile_data::MergeFrom(const t_tile_data& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:t_tile_data)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x0000001fu) {
- if (cached_has_bits & 0x00000001u) {
- type_ = from.type_;
- }
- if (cached_has_bits & 0x00000002u) {
- subtype_ = from.subtype_;
- }
- if (cached_has_bits & 0x00000004u) {
- id_ = from.id_;
- }
- if (cached_has_bits & 0x00000008u) {
- zv_ = from.zv_;
- }
- if (cached_has_bits & 0x00000010u) {
- weight_ = from.weight_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void t_tile_data::CopyFrom(const t_tile_data& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:t_tile_data)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool t_tile_data::IsInitialized() const {
- return true;
- }
- void t_tile_data::InternalSwap(t_tile_data* other) {
- using std::swap;
- _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(t_tile_data, weight_)
- + sizeof(t_tile_data::weight_)
- - PROTOBUF_FIELD_OFFSET(t_tile_data, type_)>(
- reinterpret_cast<char*>(&type_),
- reinterpret_cast<char*>(&other->type_));
- }
- std::string t_tile_data::GetTypeName() const {
- return "t_tile_data";
- }
- // ===================================================================
- class t_stack::_Internal {
- public:
- using HasBits = decltype(std::declval<t_stack>()._has_bits_);
- static void set_has_x(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_y(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static void set_has_direction(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_depth(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- };
- t_stack::t_stack(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
- tiledatas_(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:t_stack)
- }
- t_stack::t_stack(const t_stack& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
- _has_bits_(from._has_bits_),
- tiledatas_(from.tiledatas_) {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::memcpy(&x_, &from.x_,
- static_cast<size_t>(reinterpret_cast<char*>(&depth_) -
- reinterpret_cast<char*>(&x_)) + sizeof(depth_));
- // @@protoc_insertion_point(copy_constructor:t_stack)
- }
- void t_stack::SharedCtor() {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&x_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&depth_) -
- reinterpret_cast<char*>(&x_)) + sizeof(depth_));
- }
- t_stack::~t_stack() {
- // @@protoc_insertion_point(destructor:t_stack)
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
- }
- void t_stack::SharedDtor() {
- GOOGLE_DCHECK(GetArena() == nullptr);
- }
- void t_stack::ArenaDtor(void* object) {
- t_stack* _this = reinterpret_cast< t_stack* >(object);
- (void)_this;
- }
- void t_stack::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void t_stack::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void t_stack::Clear() {
- // @@protoc_insertion_point(message_clear_start:t_stack)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- tiledatas_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- ::memset(&x_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&depth_) -
- reinterpret_cast<char*>(&x_)) + sizeof(depth_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<std::string>();
- }
- const char* t_stack::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // repeated .t_tile_data tileDatas = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_tiledatas(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
- } else goto handle_unusual;
- continue;
- // int32 x = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- _Internal::set_has_x(&has_bits);
- x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 y = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
- _Internal::set_has_y(&has_bits);
- y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 direction = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- _Internal::set_has_direction(&has_bits);
- direction_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // int32 depth = 5;
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
- _Internal::set_has_depth(&has_bits);
- depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag,
- _internal_metadata_.mutable_unknown_fields<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* t_stack::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:t_stack)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .t_tile_data tileDatas = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_tiledatas_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(1, this->_internal_tiledatas(i), target, stream);
- }
- // int32 x = 2;
- if (_internal_has_x()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_x(), target);
- }
- // int32 y = 3;
- if (_internal_has_y()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_y(), target);
- }
- // int32 direction = 4;
- if (_internal_has_direction()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_direction(), target);
- }
- // int32 depth = 5;
- if (_internal_has_depth()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_depth(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:t_stack)
- return target;
- }
- size_t t_stack::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:t_stack)
- size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .t_tile_data tileDatas = 1;
- total_size += 1UL * this->_internal_tiledatas_size();
- for (const auto& msg : this->tiledatas_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- // int32 x = 2;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_x());
- }
- // int32 y = 3;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_y());
- }
- // int32 direction = 4;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_direction());
- }
- // int32 depth = 5;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_depth());
- }
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void t_stack::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_stack*>(
- &from));
- }
- void t_stack::MergeFrom(const t_stack& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:t_stack)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- tiledatas_.MergeFrom(from.tiledatas_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- x_ = from.x_;
- }
- if (cached_has_bits & 0x00000002u) {
- y_ = from.y_;
- }
- if (cached_has_bits & 0x00000004u) {
- direction_ = from.direction_;
- }
- if (cached_has_bits & 0x00000008u) {
- depth_ = from.depth_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void t_stack::CopyFrom(const t_stack& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:t_stack)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool t_stack::IsInitialized() const {
- return true;
- }
- void t_stack::InternalSwap(t_stack* other) {
- using std::swap;
- _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- tiledatas_.InternalSwap(&other->tiledatas_);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(t_stack, depth_)
- + sizeof(t_stack::depth_)
- - PROTOBUF_FIELD_OFFSET(t_stack, x_)>(
- reinterpret_cast<char*>(&x_),
- reinterpret_cast<char*>(&other->x_));
- }
- std::string t_stack::GetTypeName() const {
- return "t_stack";
- }
- // @@protoc_insertion_point(namespace_scope)
- PROTOBUF_NAMESPACE_OPEN
- template<> PROTOBUF_NOINLINE ::LevelsIndex_LevelsIndexEntry_DoNotUse* Arena::CreateMaybeMessage< ::LevelsIndex_LevelsIndexEntry_DoNotUse >(Arena* arena) {
- return Arena::CreateMessageInternal< ::LevelsIndex_LevelsIndexEntry_DoNotUse >(arena);
- }
- template<> PROTOBUF_NOINLINE ::LevelsIndex* Arena::CreateMaybeMessage< ::LevelsIndex >(Arena* arena) {
- return Arena::CreateMessageInternal< ::LevelsIndex >(arena);
- }
- template<> PROTOBUF_NOINLINE ::t_offeset_len* Arena::CreateMaybeMessage< ::t_offeset_len >(Arena* arena) {
- return Arena::CreateMessageInternal< ::t_offeset_len >(arena);
- }
- template<> PROTOBUF_NOINLINE ::LevelData* Arena::CreateMaybeMessage< ::LevelData >(Arena* arena) {
- return Arena::CreateMessageInternal< ::LevelData >(arena);
- }
- template<> PROTOBUF_NOINLINE ::t_tile* Arena::CreateMaybeMessage< ::t_tile >(Arena* arena) {
- return Arena::CreateMessageInternal< ::t_tile >(arena);
- }
- template<> PROTOBUF_NOINLINE ::t_tile_data* Arena::CreateMaybeMessage< ::t_tile_data >(Arena* arena) {
- return Arena::CreateMessageInternal< ::t_tile_data >(arena);
- }
- template<> PROTOBUF_NOINLINE ::t_stack* Arena::CreateMaybeMessage< ::t_stack >(Arena* arena) {
- return Arena::CreateMessageInternal< ::t_stack >(arena);
- }
- PROTOBUF_NAMESPACE_CLOSE
- // @@protoc_insertion_point(global_scope)
- #include <google/protobuf/port_undef.inc>
|