File locus.pb.cc
File List > annotation > locus.pb.cc
Go to the documentation of this file
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/framework/formats/annotation/locus.proto
#include "mediapipe/framework/formats/annotation/locus.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/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace mediapipe {
constexpr Locus::Locus(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: component_locus_()
, bounding_box_(nullptr)
, region_(nullptr)
, locus_id_(uint64_t{0u})
, locus_id_seed_(uint64_t{0u})
, timestamp_(-1)
, locus_type_(1)
, concatenatable_(true){}
struct LocusDefaultTypeInternal {
constexpr LocusDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~LocusDefaultTypeInternal() {}
union {
Locus _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LocusDefaultTypeInternal _Locus_default_instance_;
constexpr BoundingBox::BoundingBox(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: left_x_(0)
, upper_y_(0)
, right_x_(0)
, lower_y_(0){}
struct BoundingBoxDefaultTypeInternal {
constexpr BoundingBoxDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~BoundingBoxDefaultTypeInternal() {}
union {
BoundingBox _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BoundingBoxDefaultTypeInternal _BoundingBox_default_instance_;
} // namespace mediapipe
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto[2];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto = nullptr;
const uint32_t TableStruct_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, _has_bits_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, locus_type_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, locus_id_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, locus_id_seed_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, concatenatable_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, bounding_box_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, timestamp_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, region_),
PROTOBUF_FIELD_OFFSET(::mediapipe::Locus, component_locus_),
5,
2,
3,
6,
0,
4,
1,
~0u,
PROTOBUF_FIELD_OFFSET(::mediapipe::BoundingBox, _has_bits_),
PROTOBUF_FIELD_OFFSET(::mediapipe::BoundingBox, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::mediapipe::BoundingBox, left_x_),
PROTOBUF_FIELD_OFFSET(::mediapipe::BoundingBox, upper_y_),
PROTOBUF_FIELD_OFFSET(::mediapipe::BoundingBox, right_x_),
PROTOBUF_FIELD_OFFSET(::mediapipe::BoundingBox, lower_y_),
0,
1,
2,
3,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 14, -1, sizeof(::mediapipe::Locus)},
{ 22, 32, -1, sizeof(::mediapipe::BoundingBox)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_Locus_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_BoundingBox_default_instance_),
};
const char descriptor_table_protodef_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n2mediapipe/framework/formats/annotation"
"/locus.proto\022\tmediapipe\032:mediapipe/frame"
"work/formats/annotation/rasterization.pr"
"oto\"\337\002\n\005Locus\022.\n\nlocus_type\030\001 \001(\0162\032.medi"
"apipe.Locus.LocusType\022\020\n\010locus_id\030\002 \001(\006\022"
"\025\n\rlocus_id_seed\030\006 \001(\006\022\034\n\016concatenatable"
"\030\005 \001(\010:\004true\022,\n\014bounding_box\030\003 \001(\0132\026.med"
"iapipe.BoundingBox\022\025\n\ttimestamp\030\007 \001(\005:\002-"
"1\022(\n\006region\030\004 \001(\0132\030.mediapipe.Rasterizat"
"ion\022)\n\017component_locus\030\010 \003(\0132\020.mediapipe"
".Locus\"E\n\tLocusType\022\n\n\006GLOBAL\020\001\022\020\n\014BOUND"
"ING_BOX\020\002\022\n\n\006REGION\020\003\022\016\n\nVIDEO_TUBE\020\004\"P\n"
"\013BoundingBox\022\016\n\006left_x\030\001 \001(\005\022\017\n\007upper_y\030"
"\002 \001(\005\022\017\n\007right_x\030\003 \001(\005\022\017\n\007lower_y\030\004 \001(\005B"
"\003\370\001\001"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_deps[1] = {
&::descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2frasterization_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto = {
false, false, 564, descriptor_table_protodef_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto, "mediapipe/framework/formats/annotation/locus.proto",
&descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_once, descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_deps, 1, 2,
schemas, file_default_instances, TableStruct_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto::offsets,
file_level_metadata_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto, file_level_enum_descriptors_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto, file_level_service_descriptors_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_getter() {
return &descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto(&descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto);
namespace mediapipe {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Locus_LocusType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto);
return file_level_enum_descriptors_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto[0];
}
bool Locus_LocusType_IsValid(int value) {
switch (value) {
case 1:
case 2:
case 3:
case 4:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Locus_LocusType Locus::GLOBAL;
constexpr Locus_LocusType Locus::BOUNDING_BOX;
constexpr Locus_LocusType Locus::REGION;
constexpr Locus_LocusType Locus::VIDEO_TUBE;
constexpr Locus_LocusType Locus::LocusType_MIN;
constexpr Locus_LocusType Locus::LocusType_MAX;
constexpr int Locus::LocusType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
// ===================================================================
class Locus::_Internal {
public:
using HasBits = decltype(std::declval<Locus>()._has_bits_);
static void set_has_locus_type(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_locus_id(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_locus_id_seed(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_concatenatable(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static const ::mediapipe::BoundingBox& bounding_box(const Locus* msg);
static void set_has_bounding_box(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_timestamp(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::mediapipe::Rasterization& region(const Locus* msg);
static void set_has_region(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
const ::mediapipe::BoundingBox&
Locus::_Internal::bounding_box(const Locus* msg) {
return *msg->bounding_box_;
}
const ::mediapipe::Rasterization&
Locus::_Internal::region(const Locus* msg) {
return *msg->region_;
}
void Locus::clear_region() {
if (region_ != nullptr) region_->Clear();
_has_bits_[0] &= ~0x00000002u;
}
Locus::Locus(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
component_locus_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:mediapipe.Locus)
}
Locus::Locus(const Locus& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
component_locus_(from.component_locus_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_bounding_box()) {
bounding_box_ = new ::mediapipe::BoundingBox(*from.bounding_box_);
} else {
bounding_box_ = nullptr;
}
if (from._internal_has_region()) {
region_ = new ::mediapipe::Rasterization(*from.region_);
} else {
region_ = nullptr;
}
::memcpy(&locus_id_, &from.locus_id_,
static_cast<size_t>(reinterpret_cast<char*>(&concatenatable_) -
reinterpret_cast<char*>(&locus_id_)) + sizeof(concatenatable_));
// @@protoc_insertion_point(copy_constructor:mediapipe.Locus)
}
inline void Locus::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&bounding_box_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&locus_id_seed_) -
reinterpret_cast<char*>(&bounding_box_)) + sizeof(locus_id_seed_));
timestamp_ = -1;
locus_type_ = 1;
concatenatable_ = true;
}
Locus::~Locus() {
// @@protoc_insertion_point(destructor:mediapipe.Locus)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void Locus::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete bounding_box_;
if (this != internal_default_instance()) delete region_;
}
void Locus::ArenaDtor(void* object) {
Locus* _this = reinterpret_cast< Locus* >(object);
(void)_this;
}
void Locus::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Locus::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void Locus::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.Locus)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
component_locus_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(bounding_box_ != nullptr);
bounding_box_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(region_ != nullptr);
region_->Clear();
}
}
if (cached_has_bits & 0x0000007cu) {
::memset(&locus_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&locus_id_seed_) -
reinterpret_cast<char*>(&locus_id_)) + sizeof(locus_id_seed_));
timestamp_ = -1;
locus_type_ = 1;
concatenatable_ = true;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* Locus::_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)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .mediapipe.Locus.LocusType locus_type = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::mediapipe::Locus_LocusType_IsValid(val))) {
_internal_set_locus_type(static_cast<::mediapipe::Locus_LocusType>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional fixed64 locus_id = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
_Internal::set_has_locus_id(&has_bits);
locus_id_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
ptr += sizeof(uint64_t);
} else
goto handle_unusual;
continue;
// optional .mediapipe.BoundingBox bounding_box = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_bounding_box(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .mediapipe.Rasterization region = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_region(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool concatenatable = 5 [default = true];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_concatenatable(&has_bits);
concatenatable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional fixed64 locus_id_seed = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 49)) {
_Internal::set_has_locus_id_seed(&has_bits);
locus_id_seed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
ptr += sizeof(uint64_t);
} else
goto handle_unusual;
continue;
// optional int32 timestamp = 7 [default = -1];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_timestamp(&has_bits);
timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .mediapipe.Locus component_locus = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_component_locus(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* Locus::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:mediapipe.Locus)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .mediapipe.Locus.LocusType locus_type = 1;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_locus_type(), target);
}
// optional fixed64 locus_id = 2;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(2, this->_internal_locus_id(), target);
}
// optional .mediapipe.BoundingBox bounding_box = 3;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
3, _Internal::bounding_box(this), target, stream);
}
// optional .mediapipe.Rasterization region = 4;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
4, _Internal::region(this), target, stream);
}
// optional bool concatenatable = 5 [default = true];
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_concatenatable(), target);
}
// optional fixed64 locus_id_seed = 6;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(6, this->_internal_locus_id_seed(), target);
}
// optional int32 timestamp = 7 [default = -1];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_timestamp(), target);
}
// repeated .mediapipe.Locus component_locus = 8;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_component_locus_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(8, this->_internal_component_locus(i), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:mediapipe.Locus)
return target;
}
size_t Locus::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.Locus)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .mediapipe.Locus component_locus = 8;
total_size += 1UL * this->_internal_component_locus_size();
for (const auto& msg : this->component_locus_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
// optional .mediapipe.BoundingBox bounding_box = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bounding_box_);
}
// optional .mediapipe.Rasterization region = 4;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*region_);
}
// optional fixed64 locus_id = 2;
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 8;
}
// optional fixed64 locus_id_seed = 6;
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 8;
}
// optional int32 timestamp = 7 [default = -1];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_timestamp());
}
// optional .mediapipe.Locus.LocusType locus_type = 1;
if (cached_has_bits & 0x00000020u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_locus_type());
}
// optional bool concatenatable = 5 [default = true];
if (cached_has_bits & 0x00000040u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Locus::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
Locus::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Locus::GetClassData() const { return &_class_data_; }
void Locus::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<Locus *>(to)->MergeFrom(
static_cast<const Locus &>(from));
}
void Locus::MergeFrom(const Locus& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.Locus)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
component_locus_.MergeFrom(from.component_locus_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_bounding_box()->::mediapipe::BoundingBox::MergeFrom(from._internal_bounding_box());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_region()->::mediapipe::Rasterization::MergeFrom(from._internal_region());
}
if (cached_has_bits & 0x00000004u) {
locus_id_ = from.locus_id_;
}
if (cached_has_bits & 0x00000008u) {
locus_id_seed_ = from.locus_id_seed_;
}
if (cached_has_bits & 0x00000010u) {
timestamp_ = from.timestamp_;
}
if (cached_has_bits & 0x00000020u) {
locus_type_ = from.locus_type_;
}
if (cached_has_bits & 0x00000040u) {
concatenatable_ = from.concatenatable_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Locus::CopyFrom(const Locus& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.Locus)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Locus::IsInitialized() const {
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(component_locus_))
return false;
if (_internal_has_region()) {
if (!region_->IsInitialized()) return false;
}
return true;
}
void Locus::InternalSwap(Locus* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
component_locus_.InternalSwap(&other->component_locus_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Locus, locus_id_seed_)
+ sizeof(Locus::locus_id_seed_)
- PROTOBUF_FIELD_OFFSET(Locus, bounding_box_)>(
reinterpret_cast<char*>(&bounding_box_),
reinterpret_cast<char*>(&other->bounding_box_));
swap(timestamp_, other->timestamp_);
swap(locus_type_, other->locus_type_);
swap(concatenatable_, other->concatenatable_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Locus::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_once,
file_level_metadata_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto[0]);
}
// ===================================================================
class BoundingBox::_Internal {
public:
using HasBits = decltype(std::declval<BoundingBox>()._has_bits_);
static void set_has_left_x(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_upper_y(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_right_x(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_lower_y(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
BoundingBox::BoundingBox(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:mediapipe.BoundingBox)
}
BoundingBox::BoundingBox(const BoundingBox& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&left_x_, &from.left_x_,
static_cast<size_t>(reinterpret_cast<char*>(&lower_y_) -
reinterpret_cast<char*>(&left_x_)) + sizeof(lower_y_));
// @@protoc_insertion_point(copy_constructor:mediapipe.BoundingBox)
}
inline void BoundingBox::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&left_x_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&lower_y_) -
reinterpret_cast<char*>(&left_x_)) + sizeof(lower_y_));
}
BoundingBox::~BoundingBox() {
// @@protoc_insertion_point(destructor:mediapipe.BoundingBox)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void BoundingBox::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void BoundingBox::ArenaDtor(void* object) {
BoundingBox* _this = reinterpret_cast< BoundingBox* >(object);
(void)_this;
}
void BoundingBox::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BoundingBox::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void BoundingBox::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.BoundingBox)
uint32_t 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) {
::memset(&left_x_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&lower_y_) -
reinterpret_cast<char*>(&left_x_)) + sizeof(lower_y_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* BoundingBox::_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)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 left_x = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_left_x(&has_bits);
left_x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 upper_y = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_upper_y(&has_bits);
upper_y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 right_x = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_right_x(&has_bits);
right_x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 lower_y = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_lower_y(&has_bits);
lower_y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BoundingBox::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:mediapipe.BoundingBox)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 left_x = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_left_x(), target);
}
// optional int32 upper_y = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_upper_y(), target);
}
// optional int32 right_x = 3;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_right_x(), target);
}
// optional int32 lower_y = 4;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_lower_y(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:mediapipe.BoundingBox)
return target;
}
size_t BoundingBox::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.BoundingBox)
size_t total_size = 0;
uint32_t 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) {
// optional int32 left_x = 1;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_left_x());
}
// optional int32 upper_y = 2;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_upper_y());
}
// optional int32 right_x = 3;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_right_x());
}
// optional int32 lower_y = 4;
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_lower_y());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BoundingBox::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
BoundingBox::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BoundingBox::GetClassData() const { return &_class_data_; }
void BoundingBox::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<BoundingBox *>(to)->MergeFrom(
static_cast<const BoundingBox &>(from));
}
void BoundingBox::MergeFrom(const BoundingBox& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.BoundingBox)
GOOGLE_DCHECK_NE(&from, this);
uint32_t 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) {
left_x_ = from.left_x_;
}
if (cached_has_bits & 0x00000002u) {
upper_y_ = from.upper_y_;
}
if (cached_has_bits & 0x00000004u) {
right_x_ = from.right_x_;
}
if (cached_has_bits & 0x00000008u) {
lower_y_ = from.lower_y_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BoundingBox::CopyFrom(const BoundingBox& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.BoundingBox)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BoundingBox::IsInitialized() const {
return true;
}
void BoundingBox::InternalSwap(BoundingBox* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(BoundingBox, lower_y_)
+ sizeof(BoundingBox::lower_y_)
- PROTOBUF_FIELD_OFFSET(BoundingBox, left_x_)>(
reinterpret_cast<char*>(&left_x_),
reinterpret_cast<char*>(&other->left_x_));
}
::PROTOBUF_NAMESPACE_ID::Metadata BoundingBox::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto_once,
file_level_metadata_mediapipe_2fframework_2fformats_2fannotation_2flocus_2eproto[1]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace mediapipe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mediapipe::Locus* Arena::CreateMaybeMessage< ::mediapipe::Locus >(Arena* arena) {
return Arena::CreateMessageInternal< ::mediapipe::Locus >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::BoundingBox* Arena::CreateMaybeMessage< ::mediapipe::BoundingBox >(Arena* arena) {
return Arena::CreateMessageInternal< ::mediapipe::BoundingBox >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>