840 lines
32 KiB
C++
840 lines
32 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: hello.proto
|
|
|
|
#include "hello.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 control {
|
|
PROTOBUF_CONSTEXPR Header::Header(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.meta_)*/nullptr
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct HeaderDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR HeaderDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~HeaderDefaultTypeInternal() {}
|
|
union {
|
|
Header _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderDefaultTypeInternal _Header_default_instance_;
|
|
PROTOBUF_CONSTEXPR Meta::Meta(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.rpcname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct MetaDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR MetaDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~MetaDefaultTypeInternal() {}
|
|
union {
|
|
Meta _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaDefaultTypeInternal _Meta_default_instance_;
|
|
PROTOBUF_CONSTEXPR Hello::Hello(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
|
, /*decltype(_impl_.meta_)*/nullptr
|
|
, /*decltype(_impl_.id_)*/0
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct HelloDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR HelloDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~HelloDefaultTypeInternal() {}
|
|
union {
|
|
Hello _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HelloDefaultTypeInternal _Hello_default_instance_;
|
|
} // namespace control
|
|
static ::_pb::Metadata file_level_metadata_hello_2eproto[3];
|
|
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_hello_2eproto = nullptr;
|
|
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_hello_2eproto = nullptr;
|
|
|
|
const uint32_t TableStruct_hello_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::control::Header, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::control::Header, _impl_.meta_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::control::Meta, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::control::Meta, _impl_.rpcname_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::control::Hello, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::control::Hello, _impl_.meta_),
|
|
PROTOBUF_FIELD_OFFSET(::control::Hello, _impl_.id_),
|
|
PROTOBUF_FIELD_OFFSET(::control::Hello, _impl_.name_),
|
|
};
|
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
{ 0, -1, -1, sizeof(::control::Header)},
|
|
{ 7, -1, -1, sizeof(::control::Meta)},
|
|
{ 14, -1, -1, sizeof(::control::Hello)},
|
|
};
|
|
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::control::_Header_default_instance_._instance,
|
|
&::control::_Meta_default_instance_._instance,
|
|
&::control::_Hello_default_instance_._instance,
|
|
};
|
|
|
|
const char descriptor_table_protodef_hello_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
|
"\n\013hello.proto\022\007control\"%\n\006Header\022\033\n\004meta"
|
|
"\030\001 \001(\0132\r.control.Meta\"\027\n\004Meta\022\017\n\007rpcname"
|
|
"\030\001 \001(\t\">\n\005Hello\022\033\n\004meta\030\001 \001(\0132\r.control."
|
|
"Meta\022\n\n\002id\030\002 \001(\005\022\014\n\004name\030\003 \001(\tb\006proto3"
|
|
;
|
|
static ::_pbi::once_flag descriptor_table_hello_2eproto_once;
|
|
const ::_pbi::DescriptorTable descriptor_table_hello_2eproto = {
|
|
false, false, 158, descriptor_table_protodef_hello_2eproto,
|
|
"hello.proto",
|
|
&descriptor_table_hello_2eproto_once, nullptr, 0, 3,
|
|
schemas, file_default_instances, TableStruct_hello_2eproto::offsets,
|
|
file_level_metadata_hello_2eproto, file_level_enum_descriptors_hello_2eproto,
|
|
file_level_service_descriptors_hello_2eproto,
|
|
};
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_hello_2eproto_getter() {
|
|
return &descriptor_table_hello_2eproto;
|
|
}
|
|
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_hello_2eproto(&descriptor_table_hello_2eproto);
|
|
namespace control {
|
|
|
|
// ===================================================================
|
|
|
|
class Header::_Internal {
|
|
public:
|
|
static const ::control::Meta& meta(const Header* msg);
|
|
};
|
|
|
|
const ::control::Meta&
|
|
Header::_Internal::meta(const Header* msg) {
|
|
return *msg->_impl_.meta_;
|
|
}
|
|
Header::Header(::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:control.Header)
|
|
}
|
|
Header::Header(const Header& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
Header* const _this = this;
|
|
(void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.meta_) {
|
|
nullptr
|
|
}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
if (from._internal_has_meta()) {
|
|
_this->_impl_.meta_ = new ::control::Meta(*from._impl_.meta_);
|
|
}
|
|
// @@protoc_insertion_point(copy_constructor:control.Header)
|
|
}
|
|
|
|
inline void Header::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.meta_) {
|
|
nullptr
|
|
}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
Header::~Header() {
|
|
// @@protoc_insertion_point(destructor:control.Header)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Header::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
if (this != internal_default_instance()) delete _impl_.meta_;
|
|
}
|
|
|
|
void Header::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void Header::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:control.Header)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
if (GetArenaForAllocation() == nullptr && _impl_.meta_ != nullptr) {
|
|
delete _impl_.meta_;
|
|
}
|
|
_impl_.meta_ = nullptr;
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Header::_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) {
|
|
// .control.Meta meta = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_meta(), 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:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* Header::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:control.Header)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// .control.Meta meta = 1;
|
|
if (this->_internal_has_meta()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, _Internal::meta(this),
|
|
_Internal::meta(this).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:control.Header)
|
|
return target;
|
|
}
|
|
|
|
size_t Header::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:control.Header)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// .control.Meta meta = 1;
|
|
if (this->_internal_has_meta()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.meta_);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Header::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
Header::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Header::GetClassData() const {
|
|
return &_class_data_;
|
|
}
|
|
|
|
|
|
void Header::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<Header*>(&to_msg);
|
|
auto& from = static_cast<const Header&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:control.Header)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (from._internal_has_meta()) {
|
|
_this->_internal_mutable_meta()->::control::Meta::MergeFrom(
|
|
from._internal_meta());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Header::CopyFrom(const Header& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:control.Header)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Header::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Header::InternalSwap(Header* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_.meta_, other->_impl_.meta_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Header::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_hello_2eproto_getter, &descriptor_table_hello_2eproto_once,
|
|
file_level_metadata_hello_2eproto[0]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Meta::_Internal {
|
|
public:
|
|
};
|
|
|
|
Meta::Meta(::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:control.Meta)
|
|
}
|
|
Meta::Meta(const Meta& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
Meta* const _this = this;
|
|
(void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.rpcname_) {}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
_impl_.rpcname_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.rpcname_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_rpcname().empty()) {
|
|
_this->_impl_.rpcname_.Set(from._internal_rpcname(),
|
|
_this->GetArenaForAllocation());
|
|
}
|
|
// @@protoc_insertion_point(copy_constructor:control.Meta)
|
|
}
|
|
|
|
inline void Meta::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.rpcname_) {}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
_impl_.rpcname_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.rpcname_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
}
|
|
|
|
Meta::~Meta() {
|
|
// @@protoc_insertion_point(destructor:control.Meta)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Meta::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.rpcname_.Destroy();
|
|
}
|
|
|
|
void Meta::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void Meta::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:control.Meta)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.rpcname_.ClearToEmpty();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Meta::_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 rpcname = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
auto str = _internal_mutable_rpcname();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "control.Meta.rpcname"));
|
|
} 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* Meta::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:control.Meta)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// string rpcname = 1;
|
|
if (!this->_internal_rpcname().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_rpcname().data(), static_cast<int>(this->_internal_rpcname().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"control.Meta.rpcname");
|
|
target = stream->WriteStringMaybeAliased(
|
|
1, this->_internal_rpcname(), 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:control.Meta)
|
|
return target;
|
|
}
|
|
|
|
size_t Meta::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:control.Meta)
|
|
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 rpcname = 1;
|
|
if (!this->_internal_rpcname().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_rpcname());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Meta::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
Meta::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Meta::GetClassData() const {
|
|
return &_class_data_;
|
|
}
|
|
|
|
|
|
void Meta::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<Meta*>(&to_msg);
|
|
auto& from = static_cast<const Meta&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:control.Meta)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_rpcname().empty()) {
|
|
_this->_internal_set_rpcname(from._internal_rpcname());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Meta::CopyFrom(const Meta& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:control.Meta)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Meta::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Meta::InternalSwap(Meta* 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_.rpcname_, lhs_arena,
|
|
&other->_impl_.rpcname_, rhs_arena
|
|
);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Meta::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_hello_2eproto_getter, &descriptor_table_hello_2eproto_once,
|
|
file_level_metadata_hello_2eproto[1]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Hello::_Internal {
|
|
public:
|
|
static const ::control::Meta& meta(const Hello* msg);
|
|
};
|
|
|
|
const ::control::Meta&
|
|
Hello::_Internal::meta(const Hello* msg) {
|
|
return *msg->_impl_.meta_;
|
|
}
|
|
Hello::Hello(::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:control.Hello)
|
|
}
|
|
Hello::Hello(const Hello& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
Hello* const _this = this;
|
|
(void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.name_) {}
|
|
, decltype(_impl_.meta_) {
|
|
nullptr
|
|
}
|
|
, decltype(_impl_.id_) {}
|
|
, /*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());
|
|
}
|
|
if (from._internal_has_meta()) {
|
|
_this->_impl_.meta_ = new ::control::Meta(*from._impl_.meta_);
|
|
}
|
|
_this->_impl_.id_ = from._impl_.id_;
|
|
// @@protoc_insertion_point(copy_constructor:control.Hello)
|
|
}
|
|
|
|
inline void Hello::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.name_) {}
|
|
, decltype(_impl_.meta_) {
|
|
nullptr
|
|
}
|
|
, decltype(_impl_.id_) {
|
|
0
|
|
}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
_impl_.name_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.name_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
}
|
|
|
|
Hello::~Hello() {
|
|
// @@protoc_insertion_point(destructor:control.Hello)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Hello::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.name_.Destroy();
|
|
if (this != internal_default_instance()) delete _impl_.meta_;
|
|
}
|
|
|
|
void Hello::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void Hello::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:control.Hello)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.name_.ClearToEmpty();
|
|
if (GetArenaForAllocation() == nullptr && _impl_.meta_ != nullptr) {
|
|
delete _impl_.meta_;
|
|
}
|
|
_impl_.meta_ = nullptr;
|
|
_impl_.id_ = 0;
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Hello::_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) {
|
|
// .control.Meta meta = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_meta(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int32 id = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
|
_impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// string name = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
auto str = _internal_mutable_name();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "control.Hello.name"));
|
|
} 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* Hello::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:control.Hello)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// .control.Meta meta = 1;
|
|
if (this->_internal_has_meta()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, _Internal::meta(this),
|
|
_Internal::meta(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// int32 id = 2;
|
|
if (this->_internal_id() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_id(), target);
|
|
}
|
|
|
|
// string name = 3;
|
|
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,
|
|
"control.Hello.name");
|
|
target = stream->WriteStringMaybeAliased(
|
|
3, this->_internal_name(), 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:control.Hello)
|
|
return target;
|
|
}
|
|
|
|
size_t Hello::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:control.Hello)
|
|
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 name = 3;
|
|
if (!this->_internal_name().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_name());
|
|
}
|
|
|
|
// .control.Meta meta = 1;
|
|
if (this->_internal_has_meta()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.meta_);
|
|
}
|
|
|
|
// int32 id = 2;
|
|
if (this->_internal_id() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Hello::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
Hello::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Hello::GetClassData() const {
|
|
return &_class_data_;
|
|
}
|
|
|
|
|
|
void Hello::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<Hello*>(&to_msg);
|
|
auto& from = static_cast<const Hello&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:control.Hello)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_name().empty()) {
|
|
_this->_internal_set_name(from._internal_name());
|
|
}
|
|
if (from._internal_has_meta()) {
|
|
_this->_internal_mutable_meta()->::control::Meta::MergeFrom(
|
|
from._internal_meta());
|
|
}
|
|
if (from._internal_id() != 0) {
|
|
_this->_internal_set_id(from._internal_id());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Hello::CopyFrom(const Hello& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:control.Hello)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Hello::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Hello::InternalSwap(Hello* 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_.name_, lhs_arena,
|
|
&other->_impl_.name_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Hello, _impl_.id_)
|
|
+ sizeof(Hello::_impl_.id_)
|
|
- PROTOBUF_FIELD_OFFSET(Hello, _impl_.meta_)>(
|
|
reinterpret_cast<char*>(&_impl_.meta_),
|
|
reinterpret_cast<char*>(&other->_impl_.meta_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Hello::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_hello_2eproto_getter, &descriptor_table_hello_2eproto_once,
|
|
file_level_metadata_hello_2eproto[2]);
|
|
}
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace control
|
|
PROTOBUF_NAMESPACE_OPEN
|
|
template<> PROTOBUF_NOINLINE ::control::Header*
|
|
Arena::CreateMaybeMessage< ::control::Header >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::control::Header >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::control::Meta*
|
|
Arena::CreateMaybeMessage< ::control::Meta >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::control::Meta >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::control::Hello*
|
|
Arena::CreateMaybeMessage< ::control::Hello >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::control::Hello >(arena);
|
|
}
|
|
PROTOBUF_NAMESPACE_CLOSE
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include <google/protobuf/port_undef.inc>
|