working commit
This commit is contained in:
+71
-41
@@ -23,7 +23,8 @@ namespace _pbi = _pb::internal;
|
||||
namespace control {
|
||||
PROTOBUF_CONSTEXPR ReqMeta::ReqMeta(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.rpcname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
/*decltype(_impl_.kind_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.rpc_)*/false
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct ReqMetaDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR ReqMetaDefaultTypeInternal()
|
||||
@@ -114,7 +115,8 @@ const uint32_t TableStruct_control_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(::control::ReqMeta, _impl_.rpcname_),
|
||||
PROTOBUF_FIELD_OFFSET(::control::ReqMeta, _impl_.kind_),
|
||||
PROTOBUF_FIELD_OFFSET(::control::ReqMeta, _impl_.rpc_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::control::ResMeta, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@@ -156,11 +158,11 @@ const uint32_t TableStruct_control_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
|
||||
};
|
||||
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(::control::ReqMeta)},
|
||||
{ 7, -1, -1, sizeof(::control::ResMeta)},
|
||||
{ 15, -1, -1, sizeof(::control::Request)},
|
||||
{ 22, -1, -1, sizeof(::control::Result)},
|
||||
{ 29, -1, -1, sizeof(::control::HelloRequest)},
|
||||
{ 37, -1, -1, sizeof(::control::HelloResult)},
|
||||
{ 8, -1, -1, sizeof(::control::ResMeta)},
|
||||
{ 16, -1, -1, sizeof(::control::Request)},
|
||||
{ 23, -1, -1, sizeof(::control::Result)},
|
||||
{ 30, -1, -1, sizeof(::control::HelloRequest)},
|
||||
{ 38, -1, -1, sizeof(::control::HelloResult)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -173,18 +175,19 @@ static const ::_pb::Message* const file_default_instances[] = {
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_control_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
"\n\rcontrol.proto\022\007control\"\032\n\007ReqMeta\022\017\n\007r"
|
||||
"pcname\030\001 \001(\t\")\n\007ResMeta\022\r\n\005error\030\001 \001(\010\022\017"
|
||||
"\n\007message\030\002 \001(\t\")\n\007Request\022\036\n\004meta\030\001 \001(\013"
|
||||
"2\020.control.ReqMeta\"(\n\006Result\022\036\n\004meta\030\001 \001"
|
||||
"(\0132\020.control.ResMeta\"\?\n\014HelloRequest\022\036\n\004"
|
||||
"meta\030\001 \001(\0132\020.control.ReqMeta\022\017\n\007message\030"
|
||||
"\002 \001(\t\">\n\013HelloResult\022\036\n\004meta\030\001 \001(\0132\020.con"
|
||||
"trol.ResMeta\022\017\n\007message\030\002 \001(\tb\006proto3"
|
||||
"\n\rcontrol.proto\022\007control\"$\n\007ReqMeta\022\014\n\004k"
|
||||
"ind\030\001 \001(\t\022\013\n\003rpc\030\002 \001(\010\")\n\007ResMeta\022\r\n\005err"
|
||||
"or\030\001 \001(\010\022\017\n\007message\030\002 \001(\t\")\n\007Request\022\036\n\004"
|
||||
"meta\030\001 \001(\0132\020.control.ReqMeta\"(\n\006Result\022\036"
|
||||
"\n\004meta\030\001 \001(\0132\020.control.ResMeta\"\?\n\014HelloR"
|
||||
"equest\022\036\n\004meta\030\001 \001(\0132\020.control.ReqMeta\022\017"
|
||||
"\n\007message\030\002 \001(\t\">\n\013HelloResult\022\036\n\004meta\030\001"
|
||||
" \001(\0132\020.control.ResMeta\022\017\n\007message\030\002 \001(\tb"
|
||||
"\006proto3"
|
||||
;
|
||||
static ::_pbi::once_flag descriptor_table_control_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_control_2eproto = {
|
||||
false, false, 317, descriptor_table_protodef_control_2eproto,
|
||||
false, false, 327, descriptor_table_protodef_control_2eproto,
|
||||
"control.proto",
|
||||
&descriptor_table_control_2eproto_once, nullptr, 0, 6,
|
||||
schemas, file_default_instances, TableStruct_control_2eproto::offsets,
|
||||
@@ -215,18 +218,20 @@ ReqMeta::ReqMeta(const ReqMeta& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||
ReqMeta* const _this = this; (void)_this;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.rpcname_){}
|
||||
decltype(_impl_.kind_){}
|
||||
, decltype(_impl_.rpc_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
_impl_.rpcname_.InitDefault();
|
||||
_impl_.kind_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.rpcname_.Set("", GetArenaForAllocation());
|
||||
_impl_.kind_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (!from._internal_rpcname().empty()) {
|
||||
_this->_impl_.rpcname_.Set(from._internal_rpcname(),
|
||||
if (!from._internal_kind().empty()) {
|
||||
_this->_impl_.kind_.Set(from._internal_kind(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
_this->_impl_.rpc_ = from._impl_.rpc_;
|
||||
// @@protoc_insertion_point(copy_constructor:control.ReqMeta)
|
||||
}
|
||||
|
||||
@@ -235,12 +240,13 @@ inline void ReqMeta::SharedCtor(
|
||||
(void)arena;
|
||||
(void)is_message_owned;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.rpcname_){}
|
||||
decltype(_impl_.kind_){}
|
||||
, decltype(_impl_.rpc_){false}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
_impl_.rpcname_.InitDefault();
|
||||
_impl_.kind_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.rpcname_.Set("", GetArenaForAllocation());
|
||||
_impl_.kind_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
}
|
||||
|
||||
@@ -255,7 +261,7 @@ ReqMeta::~ReqMeta() {
|
||||
|
||||
inline void ReqMeta::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
_impl_.rpcname_.Destroy();
|
||||
_impl_.kind_.Destroy();
|
||||
}
|
||||
|
||||
void ReqMeta::SetCachedSize(int size) const {
|
||||
@@ -268,7 +274,8 @@ void ReqMeta::Clear() {
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
_impl_.rpcname_.ClearToEmpty();
|
||||
_impl_.kind_.ClearToEmpty();
|
||||
_impl_.rpc_ = false;
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@@ -278,13 +285,21 @@ const char* ReqMeta::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
|
||||
uint32_t tag;
|
||||
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||||
switch (tag >> 3) {
|
||||
// string rpcname = 1;
|
||||
// string kind = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
||||
auto str = _internal_mutable_rpcname();
|
||||
auto str = _internal_mutable_kind();
|
||||
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||
CHK_(ptr);
|
||||
CHK_(::_pbi::VerifyUTF8(str, "control.ReqMeta.rpcname"));
|
||||
CHK_(::_pbi::VerifyUTF8(str, "control.ReqMeta.kind"));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// bool rpc = 2;
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||||
_impl_.rpc_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@@ -317,14 +332,20 @@ uint8_t* ReqMeta::_InternalSerialize(
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string rpcname = 1;
|
||||
if (!this->_internal_rpcname().empty()) {
|
||||
// string kind = 1;
|
||||
if (!this->_internal_kind().empty()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->_internal_rpcname().data(), static_cast<int>(this->_internal_rpcname().length()),
|
||||
this->_internal_kind().data(), static_cast<int>(this->_internal_kind().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"control.ReqMeta.rpcname");
|
||||
"control.ReqMeta.kind");
|
||||
target = stream->WriteStringMaybeAliased(
|
||||
1, this->_internal_rpcname(), target);
|
||||
1, this->_internal_kind(), target);
|
||||
}
|
||||
|
||||
// bool rpc = 2;
|
||||
if (this->_internal_rpc() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_rpc(), target);
|
||||
}
|
||||
|
||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||
@@ -343,11 +364,16 @@ size_t ReqMeta::ByteSizeLong() const {
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string rpcname = 1;
|
||||
if (!this->_internal_rpcname().empty()) {
|
||||
// string kind = 1;
|
||||
if (!this->_internal_kind().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->_internal_rpcname());
|
||||
this->_internal_kind());
|
||||
}
|
||||
|
||||
// bool rpc = 2;
|
||||
if (this->_internal_rpc() != 0) {
|
||||
total_size += 1 + 1;
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
@@ -368,8 +394,11 @@ void ReqMeta::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOB
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (!from._internal_rpcname().empty()) {
|
||||
_this->_internal_set_rpcname(from._internal_rpcname());
|
||||
if (!from._internal_kind().empty()) {
|
||||
_this->_internal_set_kind(from._internal_kind());
|
||||
}
|
||||
if (from._internal_rpc() != 0) {
|
||||
_this->_internal_set_rpc(from._internal_rpc());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
@@ -391,9 +420,10 @@ void ReqMeta::InternalSwap(ReqMeta* other) {
|
||||
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
|
||||
&_impl_.kind_, lhs_arena,
|
||||
&other->_impl_.kind_, rhs_arena
|
||||
);
|
||||
swap(_impl_.rpc_, other->_impl_.rpc_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata ReqMeta::GetMetadata() const {
|
||||
|
||||
Reference in New Issue
Block a user