forked from Research/WhisperCom
368 lines
13 KiB
C++
368 lines
13 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: Message.proto
|
|
|
|
#include "Message.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"
|
|
#include "google/protobuf/generated_message_tctable_impl.h"
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
// Must be included last.
|
|
#include "google/protobuf/port_def.inc"
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
namespace _pb = ::google::protobuf;
|
|
namespace _pbi = ::google::protobuf::internal;
|
|
namespace _fl = ::google::protobuf::internal::field_layout;
|
|
namespace WhisperCom {
|
|
namespace Protobuf {
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR Message::Message(::_pbi::ConstantInitialized)
|
|
: _impl_{
|
|
/*decltype(_impl_._has_bits_)*/ {},
|
|
/*decltype(_impl_._cached_size_)*/ {},
|
|
/*decltype(_impl_.payload_)*/ nullptr,
|
|
/*decltype(_impl_.type_)*/ 0u,
|
|
} {}
|
|
struct MessageDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR MessageDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~MessageDefaultTypeInternal() {}
|
|
union {
|
|
Message _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageDefaultTypeInternal _Message_default_instance_;
|
|
} // namespace Protobuf
|
|
} // namespace WhisperCom
|
|
static ::_pb::Metadata file_level_metadata_Message_2eproto[1];
|
|
static constexpr const ::_pb::EnumDescriptor**
|
|
file_level_enum_descriptors_Message_2eproto = nullptr;
|
|
static constexpr const ::_pb::ServiceDescriptor**
|
|
file_level_service_descriptors_Message_2eproto = nullptr;
|
|
const ::uint32_t TableStruct_Message_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
|
|
protodesc_cold) = {
|
|
PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::Message, _impl_._has_bits_),
|
|
PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::Message, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::Message, _impl_.type_),
|
|
PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::Message, _impl_.payload_),
|
|
~0u,
|
|
0,
|
|
};
|
|
|
|
static const ::_pbi::MigrationSchema
|
|
schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
{0, 10, -1, sizeof(::WhisperCom::Protobuf::Message)},
|
|
};
|
|
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::WhisperCom::Protobuf::_Message_default_instance_._instance,
|
|
};
|
|
const char descriptor_table_protodef_Message_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
"\n\rMessage.proto\022\023WhisperCom.Protobuf\032\031go"
|
|
"ogle/protobuf/any.proto\">\n\007Message\022\014\n\004ty"
|
|
"pe\030\001 \001(\r\022%\n\007payload\030\002 \001(\0132\024.google.proto"
|
|
"buf.Anyb\006proto3"
|
|
};
|
|
static const ::_pbi::DescriptorTable* const descriptor_table_Message_2eproto_deps[1] =
|
|
{
|
|
&::descriptor_table_google_2fprotobuf_2fany_2eproto,
|
|
};
|
|
static ::absl::once_flag descriptor_table_Message_2eproto_once;
|
|
const ::_pbi::DescriptorTable descriptor_table_Message_2eproto = {
|
|
false,
|
|
false,
|
|
135,
|
|
descriptor_table_protodef_Message_2eproto,
|
|
"Message.proto",
|
|
&descriptor_table_Message_2eproto_once,
|
|
descriptor_table_Message_2eproto_deps,
|
|
1,
|
|
1,
|
|
schemas,
|
|
file_default_instances,
|
|
TableStruct_Message_2eproto::offsets,
|
|
file_level_metadata_Message_2eproto,
|
|
file_level_enum_descriptors_Message_2eproto,
|
|
file_level_service_descriptors_Message_2eproto,
|
|
};
|
|
|
|
// This function exists to be marked as weak.
|
|
// It can significantly speed up compilation by breaking up LLVM's SCC
|
|
// in the .pb.cc translation units. Large translation units see a
|
|
// reduction of more than 35% of walltime for optimized builds. Without
|
|
// the weak attribute all the messages in the file, including all the
|
|
// vtables and everything they use become part of the same SCC through
|
|
// a cycle like:
|
|
// GetMetadata -> descriptor table -> default instances ->
|
|
// vtables -> GetMetadata
|
|
// By adding a weak function here we break the connection from the
|
|
// individual vtables back into the descriptor table.
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_Message_2eproto_getter() {
|
|
return &descriptor_table_Message_2eproto;
|
|
}
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
|
|
static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_Message_2eproto(&descriptor_table_Message_2eproto);
|
|
namespace WhisperCom {
|
|
namespace Protobuf {
|
|
// ===================================================================
|
|
|
|
class Message::_Internal {
|
|
public:
|
|
using HasBits = decltype(std::declval<Message>()._impl_._has_bits_);
|
|
static constexpr ::int32_t kHasBitsOffset =
|
|
8 * PROTOBUF_FIELD_OFFSET(Message, _impl_._has_bits_);
|
|
static const ::google::protobuf::Any& payload(const Message* msg);
|
|
static void set_has_payload(HasBits* has_bits) {
|
|
(*has_bits)[0] |= 1u;
|
|
}
|
|
};
|
|
|
|
const ::google::protobuf::Any& Message::_Internal::payload(const Message* msg) {
|
|
return *msg->_impl_.payload_;
|
|
}
|
|
void Message::clear_payload() {
|
|
if (_impl_.payload_ != nullptr) _impl_.payload_->Clear();
|
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
|
}
|
|
Message::Message(::google::protobuf::Arena* arena)
|
|
: ::google::protobuf::Message(arena) {
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:WhisperCom.Protobuf.Message)
|
|
}
|
|
Message::Message(const Message& from) : ::google::protobuf::Message() {
|
|
Message* const _this = this;
|
|
(void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_._has_bits_){from._impl_._has_bits_},
|
|
/*decltype(_impl_._cached_size_)*/ {},
|
|
decltype(_impl_.payload_){nullptr},
|
|
decltype(_impl_.type_){},
|
|
};
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
|
|
_this->_impl_.payload_ = new ::google::protobuf::Any(*from._impl_.payload_);
|
|
}
|
|
_this->_impl_.type_ = from._impl_.type_;
|
|
|
|
// @@protoc_insertion_point(copy_constructor:WhisperCom.Protobuf.Message)
|
|
}
|
|
inline void Message::SharedCtor(::_pb::Arena* arena) {
|
|
(void)arena;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_._has_bits_){},
|
|
/*decltype(_impl_._cached_size_)*/ {},
|
|
decltype(_impl_.payload_){nullptr},
|
|
decltype(_impl_.type_){0u},
|
|
};
|
|
}
|
|
Message::~Message() {
|
|
// @@protoc_insertion_point(destructor:WhisperCom.Protobuf.Message)
|
|
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
SharedDtor();
|
|
}
|
|
inline void Message::SharedDtor() {
|
|
ABSL_DCHECK(GetArenaForAllocation() == nullptr);
|
|
if (this != internal_default_instance()) delete _impl_.payload_;
|
|
}
|
|
void Message::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
PROTOBUF_NOINLINE void Message::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:WhisperCom.Protobuf.Message)
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
ABSL_DCHECK(_impl_.payload_ != nullptr);
|
|
_impl_.payload_->Clear();
|
|
}
|
|
_impl_.type_ = 0u;
|
|
_impl_._has_bits_.Clear();
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Message::_InternalParse(
|
|
const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
|
|
return ptr;
|
|
}
|
|
|
|
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<1, 2, 1, 0, 2> Message::_table_ = {
|
|
{
|
|
PROTOBUF_FIELD_OFFSET(Message, _impl_._has_bits_),
|
|
0, // no _extensions_
|
|
2, 8, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967292, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
2, // num_field_entries
|
|
1, // num_aux_entries
|
|
offsetof(decltype(_table_), aux_entries),
|
|
&_Message_default_instance_._instance,
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
}, {{
|
|
// .google.protobuf.Any payload = 2;
|
|
{::_pbi::TcParser::FastMtS1,
|
|
{18, 0, 0, PROTOBUF_FIELD_OFFSET(Message, _impl_.payload_)}},
|
|
// uint32 type = 1;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Message, _impl_.type_), 63>(),
|
|
{8, 63, 0, PROTOBUF_FIELD_OFFSET(Message, _impl_.type_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// uint32 type = 1;
|
|
{PROTOBUF_FIELD_OFFSET(Message, _impl_.type_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
|
|
// .google.protobuf.Any payload = 2;
|
|
{PROTOBUF_FIELD_OFFSET(Message, _impl_.payload_), _Internal::kHasBitsOffset + 0, 0,
|
|
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
}}, {{
|
|
{::_pbi::TcParser::GetTable<::google::protobuf::Any>()},
|
|
}}, {{
|
|
}},
|
|
};
|
|
|
|
::uint8_t* Message::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:WhisperCom.Protobuf.Message)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
// uint32 type = 1;
|
|
if (this->_internal_type() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
|
|
1, this->_internal_type(), target);
|
|
}
|
|
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
// .google.protobuf.Any payload = 2;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
InternalWriteMessage(2, _Internal::payload(this),
|
|
_Internal::payload(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:WhisperCom.Protobuf.Message)
|
|
return target;
|
|
}
|
|
|
|
::size_t Message::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:WhisperCom.Protobuf.Message)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// .google.protobuf.Any payload = 2;
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
*_impl_.payload_);
|
|
}
|
|
|
|
// uint32 type = 1;
|
|
if (this->_internal_type() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
|
|
this->_internal_type());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::google::protobuf::Message::ClassData Message::_class_data_ = {
|
|
::google::protobuf::Message::CopyWithSourceCheck,
|
|
Message::MergeImpl
|
|
};
|
|
const ::google::protobuf::Message::ClassData*Message::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void Message::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
|
|
auto* const _this = static_cast<Message*>(&to_msg);
|
|
auto& from = static_cast<const Message&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:WhisperCom.Protobuf.Message)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
|
|
_this->_internal_mutable_payload()->::google::protobuf::Any::MergeFrom(
|
|
from._internal_payload());
|
|
}
|
|
if (from._internal_type() != 0) {
|
|
_this->_internal_set_type(from._internal_type());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Message::CopyFrom(const Message& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:WhisperCom.Protobuf.Message)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
PROTOBUF_NOINLINE bool Message::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Message::InternalSwap(Message* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
|
::google::protobuf::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Message, _impl_.type_)
|
|
+ sizeof(Message::_impl_.type_)
|
|
- PROTOBUF_FIELD_OFFSET(Message, _impl_.payload_)>(
|
|
reinterpret_cast<char*>(&_impl_.payload_),
|
|
reinterpret_cast<char*>(&other->_impl_.payload_));
|
|
}
|
|
|
|
::google::protobuf::Metadata Message::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_Message_2eproto_getter, &descriptor_table_Message_2eproto_once,
|
|
file_level_metadata_Message_2eproto[0]);
|
|
}
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace Protobuf
|
|
} // namespace WhisperCom
|
|
namespace google {
|
|
namespace protobuf {
|
|
template<> PROTOBUF_NOINLINE ::WhisperCom::Protobuf::Message*
|
|
Arena::CreateMaybeMessage< ::WhisperCom::Protobuf::Message >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::WhisperCom::Protobuf::Message >(arena);
|
|
}
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include "google/protobuf/port_undef.inc"
|