// Generated by the protocol buffer compiler. DO NOT EDIT! // source: RouterMessage.proto #include "RouterMessage.pb.h" #include #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 PROTOBUF_CONSTEXPR RouterMessage::RouterMessage(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_.topic_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, /*decltype(_impl_.msg_)*/ nullptr, /*decltype(_impl_.type_)*/ 0, } {} struct RouterMessageDefaultTypeInternal { PROTOBUF_CONSTEXPR RouterMessageDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RouterMessageDefaultTypeInternal() {} union { RouterMessage _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RouterMessageDefaultTypeInternal _RouterMessage_default_instance_; } // namespace Protobuf } // namespace WhisperCom static ::_pb::Metadata file_level_metadata_RouterMessage_2eproto[1]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_RouterMessage_2eproto[1]; static constexpr const ::_pb::ServiceDescriptor** file_level_service_descriptors_RouterMessage_2eproto = nullptr; const ::uint32_t TableStruct_RouterMessage_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( protodesc_cold) = { PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::RouterMessage, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::RouterMessage, _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::RouterMessage, _impl_.type_), PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::RouterMessage, _impl_.msg_), PROTOBUF_FIELD_OFFSET(::WhisperCom::Protobuf::RouterMessage, _impl_.topic_), ~0u, 0, ~0u, }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { {0, 11, -1, sizeof(::WhisperCom::Protobuf::RouterMessage)}, }; static const ::_pb::Message* const file_default_instances[] = { &::WhisperCom::Protobuf::_RouterMessage_default_instance_._instance, }; const char descriptor_table_protodef_RouterMessage_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { "\n\023RouterMessage.proto\022\023WhisperCom.Protob" "uf\032\031google/protobuf/any.proto\032\rMessage.p" "roto\"\177\n\rRouterMessage\0224\n\004type\030\001 \001(\0162&.Wh" "isperCom.Protobuf.RouterMessageType\022)\n\003m" "sg\030\002 \001(\0132\034.WhisperCom.Protobuf.Message\022\r" "\n\005topic\030\003 \001(\t*\203\001\n\021RouterMessageType\022\013\n\007U" "NKNOWN\020\000\022\010\n\004JOIN\020\001\022\t\n\005LEAVE\020\002\022\010\n\004DATA\020\003\022" "\r\n\tKEEPALIVE\020\004\022\r\n\tSUBSCRIBE\020\005\022\017\n\013UNSUBSC" "RIBE\020\006\022\023\n\017UNSUBSCRIBE_ALL\020\007b\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_RouterMessage_2eproto_deps[2] = { &::descriptor_table_Message_2eproto, &::descriptor_table_google_2fprotobuf_2fany_2eproto, }; static ::absl::once_flag descriptor_table_RouterMessage_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_RouterMessage_2eproto = { false, false, 355, descriptor_table_protodef_RouterMessage_2eproto, "RouterMessage.proto", &descriptor_table_RouterMessage_2eproto_once, descriptor_table_RouterMessage_2eproto_deps, 2, 1, schemas, file_default_instances, TableStruct_RouterMessage_2eproto::offsets, file_level_metadata_RouterMessage_2eproto, file_level_enum_descriptors_RouterMessage_2eproto, file_level_service_descriptors_RouterMessage_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_RouterMessage_2eproto_getter() { return &descriptor_table_RouterMessage_2eproto; } // Force running AddDescriptors() at dynamic initialization time. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_RouterMessage_2eproto(&descriptor_table_RouterMessage_2eproto); namespace WhisperCom { namespace Protobuf { const ::google::protobuf::EnumDescriptor* RouterMessageType_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_RouterMessage_2eproto); return file_level_enum_descriptors_RouterMessage_2eproto[0]; } bool RouterMessageType_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: return true; default: return false; } } // =================================================================== class RouterMessage::_Internal { public: using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_._has_bits_); static const ::WhisperCom::Protobuf::Message& msg(const RouterMessage* msg); static void set_has_msg(HasBits* has_bits) { (*has_bits)[0] |= 1u; } }; const ::WhisperCom::Protobuf::Message& RouterMessage::_Internal::msg(const RouterMessage* msg) { return *msg->_impl_.msg_; } void RouterMessage::clear_msg() { if (_impl_.msg_ != nullptr) _impl_.msg_->Clear(); _impl_._has_bits_[0] &= ~0x00000001u; } RouterMessage::RouterMessage(::google::protobuf::Arena* arena) : ::google::protobuf::Message(arena) { SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:WhisperCom.Protobuf.RouterMessage) } RouterMessage::RouterMessage(const RouterMessage& from) : ::google::protobuf::Message() { RouterMessage* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){from._impl_._has_bits_}, /*decltype(_impl_._cached_size_)*/ {}, decltype(_impl_.topic_){}, decltype(_impl_.msg_){nullptr}, decltype(_impl_.type_){}, }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); _impl_.topic_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.topic_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING if (!from._internal_topic().empty()) { _this->_impl_.topic_.Set(from._internal_topic(), _this->GetArenaForAllocation()); } if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_impl_.msg_ = new ::WhisperCom::Protobuf::Message(*from._impl_.msg_); } _this->_impl_.type_ = from._impl_.type_; // @@protoc_insertion_point(copy_constructor:WhisperCom.Protobuf.RouterMessage) } inline void RouterMessage::SharedCtor(::_pb::Arena* arena) { (void)arena; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){}, /*decltype(_impl_._cached_size_)*/ {}, decltype(_impl_.topic_){}, decltype(_impl_.msg_){nullptr}, decltype(_impl_.type_){0}, }; _impl_.topic_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.topic_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } RouterMessage::~RouterMessage() { // @@protoc_insertion_point(destructor:WhisperCom.Protobuf.RouterMessage) _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } inline void RouterMessage::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.topic_.Destroy(); if (this != internal_default_instance()) delete _impl_.msg_; } void RouterMessage::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } PROTOBUF_NOINLINE void RouterMessage::Clear() { // @@protoc_insertion_point(message_clear_start:WhisperCom.Protobuf.RouterMessage) ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.topic_.ClearToEmpty(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { ABSL_DCHECK(_impl_.msg_ != nullptr); _impl_.msg_->Clear(); } _impl_.type_ = 0; _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } const char* RouterMessage::_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<2, 3, 1, 47, 2> RouterMessage::_table_ = { { PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_._has_bits_), 0, // no _extensions_ 3, 24, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), 4294967288, // skipmap offsetof(decltype(_table_), field_entries), 3, // num_field_entries 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_RouterMessage_default_instance_._instance, ::_pbi::TcParser::GenericFallback, // fallback }, {{ {::_pbi::TcParser::MiniParse, {}}, // .WhisperCom.Protobuf.RouterMessageType type = 1; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(RouterMessage, _impl_.type_), 63>(), {8, 63, 0, PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.type_)}}, // .WhisperCom.Protobuf.Message msg = 2; {::_pbi::TcParser::FastMtS1, {18, 0, 0, PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.msg_)}}, // string topic = 3; {::_pbi::TcParser::FastUS1, {26, 63, 0, PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.topic_)}}, }}, {{ 65535, 65535 }}, {{ // .WhisperCom.Protobuf.RouterMessageType type = 1; {PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.type_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, // .WhisperCom.Protobuf.Message msg = 2; {PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.msg_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // string topic = 3; {PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.topic_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, }}, {{ {::_pbi::TcParser::GetTable<::WhisperCom::Protobuf::Message>()}, }}, {{ "\41\0\0\5\0\0\0\0" "WhisperCom.Protobuf.RouterMessage" "topic" }}, }; ::uint8_t* RouterMessage::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:WhisperCom.Protobuf.RouterMessage) ::uint32_t cached_has_bits = 0; (void)cached_has_bits; // .WhisperCom.Protobuf.RouterMessageType type = 1; if (this->_internal_type() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 1, this->_internal_type(), target); } cached_has_bits = _impl_._has_bits_[0]; // .WhisperCom.Protobuf.Message msg = 2; if (cached_has_bits & 0x00000001u) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(2, _Internal::msg(this), _Internal::msg(this).GetCachedSize(), target, stream); } // string topic = 3; if (!this->_internal_topic().empty()) { const std::string& _s = this->_internal_topic(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "WhisperCom.Protobuf.RouterMessage.topic"); target = stream->WriteStringMaybeAliased(3, _s, target); } 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.RouterMessage) return target; } ::size_t RouterMessage::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:WhisperCom.Protobuf.RouterMessage) ::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 topic = 3; if (!this->_internal_topic().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_topic()); } // .WhisperCom.Protobuf.Message msg = 2; cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *_impl_.msg_); } // .WhisperCom.Protobuf.RouterMessageType type = 1; if (this->_internal_type() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } const ::google::protobuf::Message::ClassData RouterMessage::_class_data_ = { ::google::protobuf::Message::CopyWithSourceCheck, RouterMessage::MergeImpl }; const ::google::protobuf::Message::ClassData*RouterMessage::GetClassData() const { return &_class_data_; } void RouterMessage::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:WhisperCom.Protobuf.RouterMessage) ABSL_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_topic().empty()) { _this->_internal_set_topic(from._internal_topic()); } if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_msg()->::WhisperCom::Protobuf::Message::MergeFrom( from._internal_msg()); } if (from._internal_type() != 0) { _this->_internal_set_type(from._internal_type()); } _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RouterMessage::CopyFrom(const RouterMessage& from) { // @@protoc_insertion_point(class_specific_copy_from_start:WhisperCom.Protobuf.RouterMessage) if (&from == this) return; Clear(); MergeFrom(from); } PROTOBUF_NOINLINE bool RouterMessage::IsInitialized() const { return true; } void RouterMessage::InternalSwap(RouterMessage* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.topic_, lhs_arena, &other->_impl_.topic_, rhs_arena); ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.type_) + sizeof(RouterMessage::_impl_.type_) - PROTOBUF_FIELD_OFFSET(RouterMessage, _impl_.msg_)>( reinterpret_cast(&_impl_.msg_), reinterpret_cast(&other->_impl_.msg_)); } ::google::protobuf::Metadata RouterMessage::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_RouterMessage_2eproto_getter, &descriptor_table_RouterMessage_2eproto_once, file_level_metadata_RouterMessage_2eproto[0]); } // @@protoc_insertion_point(namespace_scope) } // namespace Protobuf } // namespace WhisperCom namespace google { namespace protobuf { template<> PROTOBUF_NOINLINE ::WhisperCom::Protobuf::RouterMessage* Arena::CreateMaybeMessage< ::WhisperCom::Protobuf::RouterMessage >(Arena* arena) { return Arena::CreateMessageInternal< ::WhisperCom::Protobuf::RouterMessage >(arena); } } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) #include "google/protobuf/port_undef.inc"