Program Listing for File connection_item.pb.cc
↰ Return to documentation for file (src/core/services/generated/connection_item.pb.cc
)
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: connection_item.proto
#include "connection_item.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 _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;
namespace holoscan {
namespace service {
PROTOBUF_CONSTEXPR ConnectorArg::ConnectorArg(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.value_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_._oneof_case_)*/{}} {}
struct ConnectorArgDefaultTypeInternal {
PROTOBUF_CONSTEXPR ConnectorArgDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ConnectorArgDefaultTypeInternal() {}
union {
ConnectorArg _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConnectorArgDefaultTypeInternal _ConnectorArg_default_instance_;
PROTOBUF_CONSTEXPR ConnectionItem::ConnectionItem(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.args_)*/{}
, /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.io_type_)*/0
, /*decltype(_impl_.connector_type_)*/0
, /*decltype(_impl_._cached_size_)*/{}} {}
struct ConnectionItemDefaultTypeInternal {
PROTOBUF_CONSTEXPR ConnectionItemDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ConnectionItemDefaultTypeInternal() {}
union {
ConnectionItem _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConnectionItemDefaultTypeInternal _ConnectionItem_default_instance_;
} // namespace service
} // namespace holoscan
static ::_pb::Metadata file_level_metadata_connection_5fitem_2eproto[2];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_connection_5fitem_2eproto[2];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_connection_5fitem_2eproto = nullptr;
const uint32_t TableStruct_connection_5fitem_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectorArg, _internal_metadata_),
~0u, // no _extensions_
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectorArg, _impl_._oneof_case_[0]),
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectorArg, _impl_.key_),
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectorArg, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectionItem, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectionItem, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectionItem, _impl_.io_type_),
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectionItem, _impl_.connector_type_),
PROTOBUF_FIELD_OFFSET(::holoscan::service::ConnectionItem, _impl_.args_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::holoscan::service::ConnectorArg)},
{ 11, -1, -1, sizeof(::holoscan::service::ConnectionItem)},
};
static const ::_pb::Message* const file_default_instances[] = {
&::holoscan::service::_ConnectorArg_default_instance_._instance,
&::holoscan::service::_ConnectionItem_default_instance_._instance,
};
const char descriptor_table_protodef_connection_5fitem_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\025connection_item.proto\022\020holoscan.servic"
"e\"f\n\014ConnectorArg\022\013\n\003key\030\001\001(\t\022\023\n\tstr_va"
"lue\030\002\001(\tH\000\022\023\n\tint_value\030\003\001(\005H\000\022\026\n\014doub"
"le_value\030\004\001(\001H\000B\007\n\005value\"\260\001\n\016Connection"
"Item\022\014\n\004name\030\001\001(\t\022)\n\007io_type\030\002\001(\0162\030.ho"
"loscan.service.IOType\0227\n\016connector_type\030"
"\003\001(\0162\037.holoscan.service.ConnectorType\022,"
"\n\004args\030\004\003(\0132\036.holoscan.service.Connecto"
"rArg*\037\n\006IOType\022\t\n\005INPUT\020\000\022\n\n\006OUTPUT\020\001*8\n"
"\rConnectorType\022\013\n\007DEFAULT\020\000\022\021\n\rDOUBLE_BU"
"FFER\020\001\022\007\n\003UCX\020\002b\006proto3"
;
static ::_pbi::once_flag descriptor_table_connection_5fitem_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_connection_5fitem_2eproto = {
false, false, 423, descriptor_table_protodef_connection_5fitem_2eproto,
"connection_item.proto",
&descriptor_table_connection_5fitem_2eproto_once, nullptr, 0, 2,
schemas, file_default_instances, TableStruct_connection_5fitem_2eproto::offsets,
file_level_metadata_connection_5fitem_2eproto, file_level_enum_descriptors_connection_5fitem_2eproto,
file_level_service_descriptors_connection_5fitem_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_connection_5fitem_2eproto_getter() {
return &descriptor_table_connection_5fitem_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_connection_5fitem_2eproto(&descriptor_table_connection_5fitem_2eproto);
namespace holoscan {
namespace service {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IOType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_connection_5fitem_2eproto);
return file_level_enum_descriptors_connection_5fitem_2eproto[0];
}
bool IOType_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ConnectorType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_connection_5fitem_2eproto);
return file_level_enum_descriptors_connection_5fitem_2eproto[1];
}
bool ConnectorType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
// ===================================================================
class ConnectorArg::_Internal {
public:
};
ConnectorArg::ConnectorArg(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:holoscan.service.ConnectorArg)
}
ConnectorArg::ConnectorArg(const ConnectorArg& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
ConnectorArg* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.key_){}
, decltype(_impl_.value_){}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_._oneof_case_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_.key_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.key_.Set("", GetArenaForAllocation());
#endif// PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_key().empty()) {
_this->_impl_.key_.Set(from._internal_key(),
_this->GetArenaForAllocation());
}
clear_has_value();
switch (from.value_case()) {
case kStrValue: {
_this->_internal_set_str_value(from._internal_str_value());
break;
}
case kIntValue: {
_this->_internal_set_int_value(from._internal_int_value());
break;
}
case kDoubleValue: {
_this->_internal_set_double_value(from._internal_double_value());
break;
}
case VALUE_NOT_SET: {
break;
}
}
// @@protoc_insertion_point(copy_constructor:holoscan.service.ConnectorArg)
}
inline void ConnectorArg::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.key_){}
, decltype(_impl_.value_){}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_._oneof_case_)*/{}
};
_impl_.key_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.key_.Set("", GetArenaForAllocation());
#endif// PROTOBUF_FORCE_COPY_DEFAULT_STRING
clear_has_value();
}
ConnectorArg::~ConnectorArg() {
// @@protoc_insertion_point(destructor:holoscan.service.ConnectorArg)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ConnectorArg::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.key_.Destroy();
if (has_value()) {
clear_value();
}
}
void ConnectorArg::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ConnectorArg::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:holoscan.service.ConnectorArg)
switch (value_case()) {
case kStrValue: {
_impl_.value_.str_value_.Destroy();
break;
}
case kIntValue: {
// No need to clear
break;
}
case kDoubleValue: {
// No need to clear
break;
}
case VALUE_NOT_SET: {
break;
}
}
_impl_._oneof_case_[0] = VALUE_NOT_SET;
}
void ConnectorArg::Clear() {
// @@protoc_insertion_point(message_clear_start:holoscan.service.ConnectorArg)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.key_.ClearToEmpty();
clear_value();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ConnectorArg::_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) {
// string key = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_key();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "holoscan.service.ConnectorArg.key"));
} else
goto handle_unusual;
continue;
// string str_value = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_str_value();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "holoscan.service.ConnectorArg.str_value"));
} else
goto handle_unusual;
continue;
// int32 int_value = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_internal_set_int_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
} else
goto handle_unusual;
continue;
// double double_value = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 33)) {
_internal_set_double_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
ptr += sizeof(double);
} 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:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ConnectorArg::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:holoscan.service.ConnectorArg)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string key = 1;
if (!this->_internal_key().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_key().data(), static_cast<int>(this->_internal_key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"holoscan.service.ConnectorArg.key");
target = stream->WriteStringMaybeAliased(
1, this->_internal_key(), target);
}
// string str_value = 2;
if (_internal_has_str_value()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_str_value().data(), static_cast<int>(this->_internal_str_value().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"holoscan.service.ConnectorArg.str_value");
target = stream->WriteStringMaybeAliased(
2, this->_internal_str_value(), target);
}
// int32 int_value = 3;
if (_internal_has_int_value()) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_int_value(), target);
}
// double double_value = 4;
if (_internal_has_double_value()) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_double_value(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::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:holoscan.service.ConnectorArg)
return target;
}
size_t ConnectorArg::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:holoscan.service.ConnectorArg)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string key = 1;
if (!this->_internal_key().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_key());
}
switch (value_case()) {
// string str_value = 2;
case kStrValue: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_str_value());
break;
}
// int32 int_value = 3;
case kIntValue: {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_int_value());
break;
}
// double double_value = 4;
case kDoubleValue: {
total_size += 1 + 8;
break;
}
case VALUE_NOT_SET: {
break;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ConnectorArg::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
ConnectorArg::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ConnectorArg::GetClassData() const { return &_class_data_; }
void ConnectorArg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<ConnectorArg*>(&to_msg);
auto& from = static_cast<const ConnectorArg&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:holoscan.service.ConnectorArg)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_key().empty()) {
_this->_internal_set_key(from._internal_key());
}
switch (from.value_case()) {
case kStrValue: {
_this->_internal_set_str_value(from._internal_str_value());
break;
}
case kIntValue: {
_this->_internal_set_int_value(from._internal_int_value());
break;
}
case kDoubleValue: {
_this->_internal_set_double_value(from._internal_double_value());
break;
}
case VALUE_NOT_SET: {
break;
}
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ConnectorArg::CopyFrom(const ConnectorArg& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:holoscan.service.ConnectorArg)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ConnectorArg::IsInitialized() const {
return true;
}
void ConnectorArg::InternalSwap(ConnectorArg* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.key_, lhs_arena,
&other->_impl_.key_, rhs_arena
);
swap(_impl_.value_, other->_impl_.value_);
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}
::PROTOBUF_NAMESPACE_ID::Metadata ConnectorArg::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_connection_5fitem_2eproto_getter, &descriptor_table_connection_5fitem_2eproto_once,
file_level_metadata_connection_5fitem_2eproto[0]);
}
// ===================================================================
class ConnectionItem::_Internal {
public:
};
ConnectionItem::ConnectionItem(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:holoscan.service.ConnectionItem)
}
ConnectionItem::ConnectionItem(const ConnectionItem& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
ConnectionItem* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.args_){from._impl_.args_}
, decltype(_impl_.name_){}
, decltype(_impl_.io_type_){}
, decltype(_impl_.connector_type_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif// PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
_this->_impl_.name_.Set(from._internal_name(),
_this->GetArenaForAllocation());
}
::memcpy(&_impl_.io_type_, &from._impl_.io_type_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.connector_type_) -
reinterpret_cast<char*>(&_impl_.io_type_)) + sizeof(_impl_.connector_type_));
// @@protoc_insertion_point(copy_constructor:holoscan.service.ConnectionItem)
}
inline void ConnectionItem::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.args_){arena}
, decltype(_impl_.name_){}
, decltype(_impl_.io_type_){0}
, decltype(_impl_.connector_type_){0}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif// PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ConnectionItem::~ConnectionItem() {
// @@protoc_insertion_point(destructor:holoscan.service.ConnectionItem)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ConnectionItem::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.args_.~RepeatedPtrField();
_impl_.name_.Destroy();
}
void ConnectionItem::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ConnectionItem::Clear() {
// @@protoc_insertion_point(message_clear_start:holoscan.service.ConnectionItem)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.args_.Clear();
_impl_.name_.ClearToEmpty();
::memset(&_impl_.io_type_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.connector_type_) -
reinterpret_cast<char*>(&_impl_.io_type_)) + sizeof(_impl_.connector_type_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ConnectionItem::_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) {
// string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "holoscan.service.ConnectionItem.name"));
} else
goto handle_unusual;
continue;
// .holoscan.service.IOType io_type = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_io_type(static_cast<::holoscan::service::IOType>(val));
} else
goto handle_unusual;
continue;
// .holoscan.service.ConnectorType connector_type = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_connector_type(static_cast<::holoscan::service::ConnectorType>(val));
} else
goto handle_unusual;
continue;
// repeated .holoscan.service.ConnectorArg args = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_args(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(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:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ConnectionItem::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:holoscan.service.ConnectionItem)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"holoscan.service.ConnectionItem.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// .holoscan.service.IOType io_type = 2;
if (this->_internal_io_type() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
2, this->_internal_io_type(), target);
}
// .holoscan.service.ConnectorType connector_type = 3;
if (this->_internal_connector_type() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
3, this->_internal_connector_type(), target);
}
// repeated .holoscan.service.ConnectorArg args = 4;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_args_size()); i < n; i++) {
const auto& repfield = this->_internal_args(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::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:holoscan.service.ConnectionItem)
return target;
}
size_t ConnectionItem::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:holoscan.service.ConnectionItem)
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 .holoscan.service.ConnectorArg args = 4;
total_size += 1UL * this->_internal_args_size();
for (const auto& msg : this->_impl_.args_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// .holoscan.service.IOType io_type = 2;
if (this->_internal_io_type() != 0) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_io_type());
}
// .holoscan.service.ConnectorType connector_type = 3;
if (this->_internal_connector_type() != 0) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_connector_type());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ConnectionItem::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
ConnectionItem::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ConnectionItem::GetClassData() const { return &_class_data_; }
void ConnectionItem::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<ConnectionItem*>(&to_msg);
auto& from = static_cast<const ConnectionItem&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:holoscan.service.ConnectionItem)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.args_.MergeFrom(from._impl_.args_);
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if (from._internal_io_type() != 0) {
_this->_internal_set_io_type(from._internal_io_type());
}
if (from._internal_connector_type() != 0) {
_this->_internal_set_connector_type(from._internal_connector_type());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ConnectionItem::CopyFrom(const ConnectionItem& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:holoscan.service.ConnectionItem)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ConnectionItem::IsInitialized() const {
return true;
}
void ConnectionItem::InternalSwap(ConnectionItem* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.args_.InternalSwap(&other->_impl_.args_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ConnectionItem, _impl_.connector_type_)
+ sizeof(ConnectionItem::_impl_.connector_type_)
- PROTOBUF_FIELD_OFFSET(ConnectionItem, _impl_.io_type_)>(
reinterpret_cast<char*>(&_impl_.io_type_),
reinterpret_cast<char*>(&other->_impl_.io_type_));
}
::PROTOBUF_NAMESPACE_ID::Metadata ConnectionItem::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_connection_5fitem_2eproto_getter, &descriptor_table_connection_5fitem_2eproto_once,
file_level_metadata_connection_5fitem_2eproto[1]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace service
} // namespace holoscan
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::holoscan::service::ConnectorArg*
Arena::CreateMaybeMessage< ::holoscan::service::ConnectorArg >(Arena* arena) {
return Arena::CreateMessageInternal< ::holoscan::service::ConnectorArg >(arena);
}
template<> PROTOBUF_NOINLINE ::holoscan::service::ConnectionItem*
Arena::CreateMaybeMessage< ::holoscan::service::ConnectionItem >(Arena* arena) {
return Arena::CreateMessageInternal< ::holoscan::service::ConnectionItem >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>