// Generated by the protocol buffer compiler. DO NOT EDIT! // source: cl_rcon.proto #include "cl_rcon.pb.h" #include #include #include #include #include // @@protoc_insertion_point(includes) #include PROTOBUF_PRAGMA_INIT_SEG namespace _pb = ::PROTOBUF_NAMESPACE_ID; namespace _pbi = _pb::internal; namespace cl_rcon { PROTOBUF_CONSTEXPR request::request( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_._has_bits_)*/{} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_.requestmsg_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.requestval_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.messageid_)*/0 , /*decltype(_impl_.messagetype_)*/0 , /*decltype(_impl_.requesttype_)*/0} {} struct requestDefaultTypeInternal { PROTOBUF_CONSTEXPR requestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~requestDefaultTypeInternal() {} union { request _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 requestDefaultTypeInternal _request_default_instance_; } // namespace cl_rcon namespace cl_rcon { bool request_t_IsValid(int value) { switch (value) { case 0: case 1: case 2: return true; default: return false; } } static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed request_t_strings[3] = {}; static const char request_t_names[] = "SERVERDATA_REQUEST_AUTH" "SERVERDATA_REQUEST_EXECCOMMAND" "SERVERDATA_REQUEST_SEND_CONSOLE_LOG"; static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry request_t_entries[] = { { {request_t_names + 0, 23}, 1 }, { {request_t_names + 23, 30}, 0 }, { {request_t_names + 53, 35}, 2 }, }; static const int request_t_entries_by_number[] = { 1, // 0 -> SERVERDATA_REQUEST_EXECCOMMAND 0, // 1 -> SERVERDATA_REQUEST_AUTH 2, // 2 -> SERVERDATA_REQUEST_SEND_CONSOLE_LOG }; const std::string& request_t_Name( request_t value) { static const bool dummy = ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( request_t_entries, request_t_entries_by_number, 3, request_t_strings); (void) dummy; int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( request_t_entries, request_t_entries_by_number, 3, value); return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : request_t_strings[idx].get(); } bool request_t_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, request_t* value) { int int_value; bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( request_t_entries, 3, name, &int_value); if (success) { *value = static_cast(int_value); } return success; } // =================================================================== class request::_Internal { public: using HasBits = decltype(std::declval()._impl_._has_bits_); static void set_has_messageid(HasBits* has_bits) { (*has_bits)[0] |= 4u; } static void set_has_messagetype(HasBits* has_bits) { (*has_bits)[0] |= 8u; } static void set_has_requesttype(HasBits* has_bits) { (*has_bits)[0] |= 16u; } static void set_has_requestmsg(HasBits* has_bits) { (*has_bits)[0] |= 1u; } static void set_has_requestval(HasBits* has_bits) { (*has_bits)[0] |= 2u; } }; request::request(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:cl_rcon.request) } request::request(const request& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { request* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){from._impl_._has_bits_} , /*decltype(_impl_._cached_size_)*/{} , decltype(_impl_.requestmsg_){} , decltype(_impl_.requestval_){} , decltype(_impl_.messageid_){} , decltype(_impl_.messagetype_){} , decltype(_impl_.requesttype_){}}; _internal_metadata_.MergeFrom(from._internal_metadata_); _impl_.requestmsg_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.requestmsg_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING if (from._internal_has_requestmsg()) { _this->_impl_.requestmsg_.Set(from._internal_requestmsg(), _this->GetArenaForAllocation()); } _impl_.requestval_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.requestval_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING if (from._internal_has_requestval()) { _this->_impl_.requestval_.Set(from._internal_requestval(), _this->GetArenaForAllocation()); } ::memcpy(&_impl_.messageid_, &from._impl_.messageid_, static_cast(reinterpret_cast(&_impl_.requesttype_) - reinterpret_cast(&_impl_.messageid_)) + sizeof(_impl_.requesttype_)); // @@protoc_insertion_point(copy_constructor:cl_rcon.request) } inline void request::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} , decltype(_impl_.requestmsg_){} , decltype(_impl_.requestval_){} , decltype(_impl_.messageid_){0} , decltype(_impl_.messagetype_){0} , decltype(_impl_.requesttype_){0} }; _impl_.requestmsg_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.requestmsg_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.requestval_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.requestval_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } request::~request() { // @@protoc_insertion_point(destructor:cl_rcon.request) if (auto *arena = _internal_metadata_.DeleteReturnArena()) { (void)arena; return; } SharedDtor(); } inline void request::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.requestmsg_.Destroy(); _impl_.requestval_.Destroy(); } void request::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } void request::Clear() { // @@protoc_insertion_point(message_clear_start:cl_rcon.request) 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 & 0x00000003u) { if (cached_has_bits & 0x00000001u) { _impl_.requestmsg_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { _impl_.requestval_.ClearNonDefaultToEmpty(); } } if (cached_has_bits & 0x0000001cu) { ::memset(&_impl_.messageid_, 0, static_cast( reinterpret_cast(&_impl_.requesttype_) - reinterpret_cast(&_impl_.messageid_)) + sizeof(_impl_.requesttype_)); } _impl_._has_bits_.Clear(); _internal_metadata_.Clear(); } const char* request::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // optional int32 messageID = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { _Internal::set_has_messageid(&has_bits); _impl_.messageid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 messageType = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { _Internal::set_has_messagetype(&has_bits); _impl_.messagetype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .cl_rcon.request_t requestType = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); _internal_set_requesttype(static_cast<::cl_rcon::request_t>(val)); } else goto handle_unusual; continue; // optional string requestMsg = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { auto str = _internal_mutable_requestmsg(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); CHK_(::_pbi::VerifyUTF8(str, nullptr)); } else goto handle_unusual; continue; // optional string requestVal = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { auto str = _internal_mutable_requestval(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); CHK_(::_pbi::VerifyUTF8(str, nullptr)); } 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(), ptr, ctx); CHK_(ptr != nullptr); } // while message_done: _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; goto message_done; #undef CHK_ } uint8_t* request::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:cl_rcon.request) uint32_t cached_has_bits = 0; (void) cached_has_bits; // optional int32 messageID = 1; if (_internal_has_messageid()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_messageid(), target); } // optional int32 messageType = 2; if (_internal_has_messagetype()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_messagetype(), target); } // optional .cl_rcon.request_t requestType = 3; if (_internal_has_requesttype()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 3, this->_internal_requesttype(), target); } // optional string requestMsg = 4; if (_internal_has_requestmsg()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_requestmsg().data(), static_cast(this->_internal_requestmsg().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "cl_rcon.request.requestMsg"); target = stream->WriteStringMaybeAliased( 4, this->_internal_requestmsg(), target); } // optional string requestVal = 5; if (_internal_has_requestval()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_requestval().data(), static_cast(this->_internal_requestval().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "cl_rcon.request.requestVal"); target = stream->WriteStringMaybeAliased( 5, this->_internal_requestval(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:cl_rcon.request) return target; } size_t request::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:cl_rcon.request) size_t total_size = 0; 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 & 0x0000001fu) { // optional string requestMsg = 4; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_requestmsg()); } // optional string requestVal = 5; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_requestval()); } // optional int32 messageID = 1; if (cached_has_bits & 0x00000004u) { total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_messageid()); } // optional int32 messageType = 2; if (cached_has_bits & 0x00000008u) { total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_messagetype()); } // optional .cl_rcon.request_t requestType = 3; if (cached_has_bits & 0x00000010u) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_requesttype()); } } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } int cached_size = ::_pbi::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void request::CheckTypeAndMergeFrom( const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { MergeFrom(*::_pbi::DownCast( &from)); } void request::MergeFrom(const request& from) { request* const _this = this; // @@protoc_insertion_point(class_specific_merge_from_start:cl_rcon.request) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x0000001fu) { if (cached_has_bits & 0x00000001u) { _this->_internal_set_requestmsg(from._internal_requestmsg()); } if (cached_has_bits & 0x00000002u) { _this->_internal_set_requestval(from._internal_requestval()); } if (cached_has_bits & 0x00000004u) { _this->_impl_.messageid_ = from._impl_.messageid_; } if (cached_has_bits & 0x00000008u) { _this->_impl_.messagetype_ = from._impl_.messagetype_; } if (cached_has_bits & 0x00000010u) { _this->_impl_.requesttype_ = from._impl_.requesttype_; } _this->_impl_._has_bits_[0] |= cached_has_bits; } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } void request::CopyFrom(const request& from) { // @@protoc_insertion_point(class_specific_copy_from_start:cl_rcon.request) if (&from == this) return; Clear(); MergeFrom(from); } bool request::IsInitialized() const { return true; } void request::InternalSwap(request* 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]); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.requestmsg_, lhs_arena, &other->_impl_.requestmsg_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.requestval_, lhs_arena, &other->_impl_.requestval_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(request, _impl_.requesttype_) + sizeof(request::_impl_.requesttype_) - PROTOBUF_FIELD_OFFSET(request, _impl_.messageid_)>( reinterpret_cast(&_impl_.messageid_), reinterpret_cast(&other->_impl_.messageid_)); } std::string request::GetTypeName() const { return "cl_rcon.request"; } // @@protoc_insertion_point(namespace_scope) } // namespace cl_rcon PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE ::cl_rcon::request* Arena::CreateMaybeMessage< ::cl_rcon::request >(Arena* arena) { return Arena::CreateMessageInternal< ::cl_rcon::request >(arena); } PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include