r5sdk/r5dev/protoc/sig_map.pb.cc
Kawe Mazidjatari 188cbf8359 Update protobuf to latest
Updated to v21.12.
2023-01-26 03:15:10 +01:00

277 lines
9.1 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: sig_map.proto
#include "sig_map.pb.h"
#include <algorithm>
#include <thirdparty/protobuf/io/coded_stream.h>
#include <thirdparty/protobuf/extension_set.h>
#include <thirdparty/protobuf/wire_format_lite.h>
#include <thirdparty/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <thirdparty/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;
PROTOBUF_CONSTEXPR SigMap_Pb_SMapEntry_DoNotUse::SigMap_Pb_SMapEntry_DoNotUse(
::_pbi::ConstantInitialized) {}
struct SigMap_Pb_SMapEntry_DoNotUseDefaultTypeInternal {
PROTOBUF_CONSTEXPR SigMap_Pb_SMapEntry_DoNotUseDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~SigMap_Pb_SMapEntry_DoNotUseDefaultTypeInternal() {}
union {
SigMap_Pb_SMapEntry_DoNotUse _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SigMap_Pb_SMapEntry_DoNotUseDefaultTypeInternal _SigMap_Pb_SMapEntry_DoNotUse_default_instance_;
PROTOBUF_CONSTEXPR SigMap_Pb::SigMap_Pb(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.smap_)*/{}
, /*decltype(_impl_._cached_size_)*/{}} {}
struct SigMap_PbDefaultTypeInternal {
PROTOBUF_CONSTEXPR SigMap_PbDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~SigMap_PbDefaultTypeInternal() {}
union {
SigMap_Pb _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SigMap_PbDefaultTypeInternal _SigMap_Pb_default_instance_;
// ===================================================================
SigMap_Pb_SMapEntry_DoNotUse::SigMap_Pb_SMapEntry_DoNotUse() {}
SigMap_Pb_SMapEntry_DoNotUse::SigMap_Pb_SMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: SuperType(arena) {}
void SigMap_Pb_SMapEntry_DoNotUse::MergeFrom(const SigMap_Pb_SMapEntry_DoNotUse& other) {
MergeFromInternal(other);
}
// ===================================================================
class SigMap_Pb::_Internal {
public:
};
SigMap_Pb::SigMap_Pb(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:SigMap_Pb)
}
SigMap_Pb::SigMap_Pb(const SigMap_Pb& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
SigMap_Pb* const _this = this; (void)_this;
new (&_impl_) Impl_{
/*decltype(_impl_.smap_)*/{}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_this->_impl_.smap_.MergeFrom(from._impl_.smap_);
// @@protoc_insertion_point(copy_constructor:SigMap_Pb)
}
inline void SigMap_Pb::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
/*decltype(_impl_.smap_)*/{::_pbi::ArenaInitialized(), arena}
, /*decltype(_impl_._cached_size_)*/{}
};
}
SigMap_Pb::~SigMap_Pb() {
// @@protoc_insertion_point(destructor:SigMap_Pb)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void SigMap_Pb::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.smap_.Destruct();
_impl_.smap_.~MapFieldLite();
}
void SigMap_Pb::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void SigMap_Pb::Clear() {
// @@protoc_insertion_point(message_clear_start:SigMap_Pb)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.smap_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* SigMap_Pb::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// map<string, uint64> sMap = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(&_impl_.smap_, ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SigMap_Pb::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:SigMap_Pb)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// map<string, uint64> sMap = 1;
if (!this->_internal_smap().empty()) {
using MapType = ::_pb::Map<std::string, uint64_t>;
using WireHelper = SigMap_Pb_SMapEntry_DoNotUse::Funcs;
const auto& map_field = this->_internal_smap();
auto check_utf8 = [](const MapType::value_type& entry) {
(void)entry;
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
entry.first.data(), static_cast<int>(entry.first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"SigMap_Pb.SMapEntry.key");
};
if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
check_utf8(entry);
}
} else {
for (const auto& entry : map_field) {
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
check_utf8(entry);
}
}
}
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:SigMap_Pb)
return target;
}
size_t SigMap_Pb::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:SigMap_Pb)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// map<string, uint64> sMap = 1;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_smap_size());
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, uint64_t >::const_iterator
it = this->_internal_smap().begin();
it != this->_internal_smap().end(); ++it) {
total_size += SigMap_Pb_SMapEntry_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 = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void SigMap_Pb::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const SigMap_Pb*>(
&from));
}
void SigMap_Pb::MergeFrom(const SigMap_Pb& from) {
SigMap_Pb* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:SigMap_Pb)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.smap_.MergeFrom(from._impl_.smap_);
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void SigMap_Pb::CopyFrom(const SigMap_Pb& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:SigMap_Pb)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SigMap_Pb::IsInitialized() const {
return true;
}
void SigMap_Pb::InternalSwap(SigMap_Pb* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.smap_.InternalSwap(&other->_impl_.smap_);
}
std::string SigMap_Pb::GetTypeName() const {
return "SigMap_Pb";
}
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::SigMap_Pb_SMapEntry_DoNotUse*
Arena::CreateMaybeMessage< ::SigMap_Pb_SMapEntry_DoNotUse >(Arena* arena) {
return Arena::CreateMessageInternal< ::SigMap_Pb_SMapEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::SigMap_Pb*
Arena::CreateMaybeMessage< ::SigMap_Pb >(Arena* arena) {
return Arena::CreateMessageInternal< ::SigMap_Pb >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <thirdparty/protobuf/port_undef.inc>