aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmos <48657826+Mauler125@users.noreply.github.com>2022-03-04 02:20:28 +0100
committerAmos <48657826+Mauler125@users.noreply.github.com>2022-03-04 02:20:28 +0100
commit60d1b4805f1e199d01229cc7f60dcc22ef9387b8 (patch)
treeabaea391be987f89ad045dee6b09883627be985d
parent4b8bdb0077f95d344df27d5c22e42637958384c5 (diff)
downloadNorthstarLauncher-60d1b4805f1e199d01229cc7f60dcc22ef9387b8.tar.gz
NorthstarLauncher-60d1b4805f1e199d01229cc7f60dcc22ef9387b8.zip
Fix formatting
-rw-r--r--NetConsole/netconsole.cpp98
-rw-r--r--NetConsole/netconsole.h14
-rw-r--r--NorthstarDedicatedTest/NetAdr2.cpp136
-rw-r--r--NorthstarDedicatedTest/NetAdr2.h16
-rw-r--r--NorthstarDedicatedTest/cl_rcon.pb.cc767
-rw-r--r--NorthstarDedicatedTest/cl_rcon.pb.h781
-rw-r--r--NorthstarDedicatedTest/net.cpp138
-rw-r--r--NorthstarDedicatedTest/socketcreator.cpp66
-rw-r--r--NorthstarDedicatedTest/socketcreator.h14
-rw-r--r--NorthstarDedicatedTest/sv_rcon.pb.cc767
-rw-r--r--NorthstarDedicatedTest/sv_rcon.pb.h782
11 files changed, 1811 insertions, 1768 deletions
diff --git a/NetConsole/netconsole.cpp b/NetConsole/netconsole.cpp
index 210de097..cfdd31e1 100644
--- a/NetConsole/netconsole.cpp
+++ b/NetConsole/netconsole.cpp
@@ -1,10 +1,9 @@
//=====================================================================================//
-//
+//
// Purpose: Lightweight netconsole client.
-//
+//
//=====================================================================================//
-
#include "pch.h"
#include "NetAdr2.h"
#include "socketcreator.h"
@@ -94,10 +93,7 @@ void CNetCon::UserInput(void)
return;
}
size_t nPos = svInput.find(" ");
- if (!svInput.empty()
- && nPos > 0
- && nPos < svInput.size()
- && nPos != svInput.size())
+ if (!svInput.empty() && nPos > 0 && nPos < svInput.size() && nPos != svInput.size())
{
std::string svReqVal = svInput.substr(nPos + 1);
std::string svReqBuf = svInput.erase(svInput.find(" "));
@@ -122,10 +118,7 @@ void CNetCon::UserInput(void)
else // Setup connection from input.
{
size_t nPos = svInput.find(" ");
- if (!svInput.empty()
- && nPos > 0
- && nPos < svInput.size()
- && nPos != svInput.size())
+ if (!svInput.empty() && nPos > 0 && nPos < svInput.size() && nPos != svInput.size())
{
std::string svInPort = svInput.substr(nPos + 1);
std::string svInAdr = svInput.erase(svInput.find(" "));
@@ -172,15 +165,12 @@ void CNetCon::RunFrame(void)
// Purpose: checks if application should be terminated
// Output : true for termination, false otherwise
//-----------------------------------------------------------------------------
-bool CNetCon::ShouldQuit(void) const
-{
- return this->m_bQuitApplication;
-}
+bool CNetCon::ShouldQuit(void) const { return this->m_bQuitApplication; }
//-----------------------------------------------------------------------------
// Purpose: connect to specified address and port
-// Input : *svInAdr -
-// *svInPort -
+// Input : *svInAdr -
+// *svInPort -
// Output : true if connection succeeds, false otherwise
//-----------------------------------------------------------------------------
bool CNetCon::Connect(const std::string& svInAdr, const std::string& svInPort)
@@ -208,13 +198,13 @@ bool CNetCon::Connect(const std::string& svInAdr, const std::string& svInPort)
void CNetCon::Disconnect(void)
{
::closesocket(m_pSocket->GetAcceptedSocketHandle(0));
- m_abPromptConnect = true;
+ m_abPromptConnect = true;
m_abConnEstablished = false;
}
//-----------------------------------------------------------------------------
// Purpose: send message
-// Input : *svMessage -
+// Input : *svMessage -
//-----------------------------------------------------------------------------
void CNetCon::Send(const std::string& svMessage) const
{
@@ -232,7 +222,7 @@ void CNetCon::Recv(void)
{
static char szRecvBuf[MAX_NETCONSOLE_INPUT_LEN]{};
- {//////////////////////////////////////////////
+ { //////////////////////////////////////////////
int nPendingLen = ::recv(m_pSocket->GetAcceptedSocketData(0)->m_hSocket, szRecvBuf, sizeof(szRecvBuf), MSG_PEEK);
if (nPendingLen == SOCKET_ERROR && m_pSocket->IsSocketBlocking())
{
@@ -244,7 +234,7 @@ void CNetCon::Recv(void)
spdlog::info("Server closed connection");
return;
}
- }//////////////////////////////////////////////
+ } //////////////////////////////////////////////
u_long nReadLen; // Find out how much we have to read.
::ioctlsocket(m_pSocket->GetAcceptedSocketData(0)->m_hSocket, FIONREAD, &nReadLen);
@@ -272,8 +262,8 @@ void CNetCon::Recv(void)
//-----------------------------------------------------------------------------
// Purpose: handles input response buffer
-// Input : *pszIn -
-// nRecvLen -
+// Input : *pszIn -
+// nRecvLen -
//-----------------------------------------------------------------------------
void CNetCon::ProcessBuffer(const char* pszIn, int nRecvLen) const
{
@@ -311,32 +301,32 @@ void CNetCon::ProcessBuffer(const char* pszIn, int nRecvLen) const
//-----------------------------------------------------------------------------
// Purpose: processes received message
-// Input : *sv_response -
+// Input : *sv_response -
//-----------------------------------------------------------------------------
void CNetCon::ProcessMessage(const sv_rcon::response& sv_response) const
{
switch (sv_response.responsetype())
{
- case sv_rcon::response_t::SERVERDATA_RESPONSE_AUTH:
- case sv_rcon::response_t::SERVERDATA_RESPONSE_CONSOLE_LOG:
- {
- std::string svOut = sv_response.responsebuf();
- svOut.erase(std::remove(svOut.begin(), svOut.end(), '\n'), svOut.end());
- spdlog::info(svOut.c_str());
- break;
- }
- default:
- {
- break;
- }
+ case sv_rcon::response_t::SERVERDATA_RESPONSE_AUTH:
+ case sv_rcon::response_t::SERVERDATA_RESPONSE_CONSOLE_LOG:
+ {
+ std::string svOut = sv_response.responsebuf();
+ svOut.erase(std::remove(svOut.begin(), svOut.end(), '\n'), svOut.end());
+ spdlog::info(svOut.c_str());
+ break;
+ }
+ default:
+ {
+ break;
+ }
}
}
//-----------------------------------------------------------------------------
// Purpose: serializes input
-// Input : *svReqBuf -
-// *svReqVal -
-// request_t -
+// Input : *svReqBuf -
+// *svReqVal -
+// request_t -
// Output : serialized results as string
//-----------------------------------------------------------------------------
std::string CNetCon::Serialize(const std::string& svReqBuf, const std::string& svReqVal, cl_rcon::request_t request_t) const
@@ -348,25 +338,25 @@ std::string CNetCon::Serialize(const std::string& svReqBuf, const std::string& s
switch (request_t)
{
- case cl_rcon::request_t::SERVERDATA_REQUEST_SETVALUE:
- case cl_rcon::request_t::SERVERDATA_REQUEST_AUTH:
- {
- cl_request.set_requestbuf(svReqBuf);
- cl_request.set_requestval(svReqVal);
- break;
- }
- case cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND:
- {
- cl_request.set_requestbuf(svReqBuf);
- break;
- }
+ case cl_rcon::request_t::SERVERDATA_REQUEST_SETVALUE:
+ case cl_rcon::request_t::SERVERDATA_REQUEST_AUTH:
+ {
+ cl_request.set_requestbuf(svReqBuf);
+ cl_request.set_requestval(svReqVal);
+ break;
+ }
+ case cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND:
+ {
+ cl_request.set_requestbuf(svReqBuf);
+ break;
+ }
}
return cl_request.SerializeAsString().append("\r");
}
//-----------------------------------------------------------------------------
// Purpose: de-serializes input
-// Input : *svBuf -
+// Input : *svBuf -
// Output : de-serialized object
//-----------------------------------------------------------------------------
sv_rcon::response CNetCon::Deserialize(const std::string& svBuf) const
@@ -379,8 +369,8 @@ sv_rcon::response CNetCon::Deserialize(const std::string& svBuf) const
//-----------------------------------------------------------------------------
// Purpose: entrypoint
-// Input : argc -
-// *argv -
+// Input : argc -
+// *argv -
//-----------------------------------------------------------------------------
int main(int argc, char* argv[])
{
diff --git a/NetConsole/netconsole.h b/NetConsole/netconsole.h
index a777a27e..3c35c3e1 100644
--- a/NetConsole/netconsole.h
+++ b/NetConsole/netconsole.h
@@ -1,6 +1,6 @@
//===========================================================================//
//
-// Purpose:
+// Purpose:
//
//===========================================================================//
#pragma once
@@ -11,7 +11,7 @@ constexpr const char* NETCON_VERSION = "2.0.0.1";
class CNetCon
{
-public:
+ public:
bool Init(void);
bool Shutdown(void);
@@ -33,12 +33,12 @@ public:
std::string Serialize(const std::string& svReqBuf, const std::string& svReqVal, cl_rcon::request_t request_t) const;
sv_rcon::response Deserialize(const std::string& svBuf) const;
-private:
+ private:
CNetAdr2* m_pNetAdr2 = new CNetAdr2("localhost", "37015");
CSocketCreator* m_pSocket = new CSocketCreator();
- bool m_bInitialized = false;
- bool m_bQuitApplication = false;
- std::atomic<bool> m_abPromptConnect{ true };
- std::atomic<bool> m_abConnEstablished{ false };
+ bool m_bInitialized = false;
+ bool m_bQuitApplication = false;
+ std::atomic<bool> m_abPromptConnect{true};
+ std::atomic<bool> m_abConnEstablished{false};
}; \ No newline at end of file
diff --git a/NorthstarDedicatedTest/NetAdr2.cpp b/NorthstarDedicatedTest/NetAdr2.cpp
index ff022238..0c3202ad 100644
--- a/NorthstarDedicatedTest/NetAdr2.cpp
+++ b/NorthstarDedicatedTest/NetAdr2.cpp
@@ -1,7 +1,7 @@
//===========================================================================//
-//
+//
// Purpose: Protocol-agnostic implementation of the CNetAdr class.
-//
+//
//===========================================================================//
#include "pch.h"
@@ -9,17 +9,14 @@
//-----------------------------------------------------------------------------
// Purpose: constructor (use this when string contains <[IP]:PORT>).
-// Input : svInAdr -
+// Input : svInAdr -
//-----------------------------------------------------------------------------
-CNetAdr2::CNetAdr2(std::string svInAdr)
-{
- SetIPAndPort(svInAdr);
-}
+CNetAdr2::CNetAdr2(std::string svInAdr) { SetIPAndPort(svInAdr); }
//-----------------------------------------------------------------------------
// Purpose: constructor (expects string format <IPv4/IPv6> <PORT>).
-// Input : svInAdr -
-// svInPort -
+// Input : svInAdr -
+// svInPort -
//-----------------------------------------------------------------------------
CNetAdr2::CNetAdr2(std::string svInAdr, std::string svInPort)
{
@@ -54,32 +51,23 @@ CNetAdr2::CNetAdr2(std::string svInAdr, std::string svInPort)
//-----------------------------------------------------------------------------
// Purpose: destructor.
//-----------------------------------------------------------------------------
-CNetAdr2::~CNetAdr2(void)
-{
- Clear();
-}
+CNetAdr2::~CNetAdr2(void) { Clear(); }
//-----------------------------------------------------------------------------
// Purpose: sets the IP address.
-// Input : *svInAdr -
+// Input : *svInAdr -
//-----------------------------------------------------------------------------
-void CNetAdr2::SetIP(const std::string& svInAdr)
-{
- m_svip = "[" + svInAdr + "]";
-}
+void CNetAdr2::SetIP(const std::string& svInAdr) { m_svip = "[" + svInAdr + "]"; }
//-----------------------------------------------------------------------------
// Purpose: sets the port.
-// Input : *svInPort -
+// Input : *svInPort -
//-----------------------------------------------------------------------------
-void CNetAdr2::SetPort(const std::string& svInPort)
-{
- m_svip += ":" + svInPort;
-}
+void CNetAdr2::SetPort(const std::string& svInPort) { m_svip += ":" + svInPort; }
//-----------------------------------------------------------------------------
// Purpose: sets the IP address and port.
-// Input : *svInAdr -
+// Input : *svInAdr -
//-----------------------------------------------------------------------------
void CNetAdr2::SetIPAndPort(std::string svInAdr)
{
@@ -109,8 +97,8 @@ void CNetAdr2::SetIPAndPort(std::string svInAdr)
//-----------------------------------------------------------------------------
// Purpose: sets the IP address and port.
-// Input : *svInAdr -
-// *svInPort -
+// Input : *svInAdr -
+// *svInPort -
//-----------------------------------------------------------------------------
void CNetAdr2::SetIPAndPort(std::string svInAdr, std::string svInPort)
{
@@ -145,27 +133,25 @@ void CNetAdr2::SetIPAndPort(std::string svInAdr, std::string svInPort)
//-----------------------------------------------------------------------------
// Purpose: sets the type.
-// Input : *type -
+// Input : *type -
//-----------------------------------------------------------------------------
-void CNetAdr2::SetType(const netadrtype_t& type)
-{
- m_type = type;
-}
+void CNetAdr2::SetType(const netadrtype_t& type) { m_type = type; }
//-----------------------------------------------------------------------------
// Purpose: sets the IP version (IPv4/IPv6/INVALID) based on input.
//-----------------------------------------------------------------------------
void CNetAdr2::SetVersion(void)
{
- if (inet_pton(reinterpret_cast<sockaddr_in*>(&m_sadr)->sin_family,
- GetBase().c_str(), &reinterpret_cast<sockaddr_in*>(m_sadr)->sin_addr) &&
+ if (inet_pton(
+ reinterpret_cast<sockaddr_in*>(&m_sadr)->sin_family, GetBase().c_str(), &reinterpret_cast<sockaddr_in*>(m_sadr)->sin_addr) &&
!strstr(GetBase().c_str(), "::"))
{
m_version = netadrversion_t::NA_V4;
return;
}
- else if (inet_pton(reinterpret_cast<sockaddr_in6*>(&m_sadr)->sin6_family,
- GetBase().c_str(), &reinterpret_cast<sockaddr_in6*>(m_sadr)->sin6_addr))
+ else if (inet_pton(
+ reinterpret_cast<sockaddr_in6*>(&m_sadr)->sin6_family, GetBase().c_str(),
+ &reinterpret_cast<sockaddr_in6*>(m_sadr)->sin6_addr))
{
m_version = netadrversion_t::NA_V6;
return;
@@ -175,7 +161,7 @@ void CNetAdr2::SetVersion(void)
//-----------------------------------------------------------------------------
// Purpose: sets IP address and port from sockaddr struct.
-// Input : hSocket -
+// Input : hSocket -
//-----------------------------------------------------------------------------
void CNetAdr2::SetFromSocket(const int& hSocket)
{
@@ -192,7 +178,7 @@ void CNetAdr2::SetFromSocket(const int& hSocket)
//-----------------------------------------------------------------------------
// Purpose: sets fields based on 'sockaddr' input.
-// Input : *s -
+// Input : *s -
//-----------------------------------------------------------------------------
bool CNetAdr2::SetFromSockadr(sockaddr_storage* s)
{
@@ -232,7 +218,7 @@ std::string CNetAdr2::GetBase(void) const
//-----------------------------------------------------------------------------
// Purpose: removes brackets and port from IP address.
-// Input : svInAdr -
+// Input : svInAdr -
//-----------------------------------------------------------------------------
std::string CNetAdr2::GetBase(std::string svInAdr) const
{
@@ -245,7 +231,7 @@ std::string CNetAdr2::GetBase(std::string svInAdr) const
//-----------------------------------------------------------------------------
// Purpose: gets the IP address.
-// Input : bBaseOnly -
+// Input : bBaseOnly -
//-----------------------------------------------------------------------------
std::string CNetAdr2::GetIP(bool bBaseOnly) const
{
@@ -289,7 +275,7 @@ std::string CNetAdr2::GetPort(void) const
//-----------------------------------------------------------------------------
// Purpose: removes brackets and IP address from port.
-// Input : svInPort -
+// Input : svInPort -
//-----------------------------------------------------------------------------
std::string CNetAdr2::GetPort(std::string svInPort) const
{
@@ -307,26 +293,17 @@ std::string CNetAdr2::GetPort(std::string svInPort) const
//-----------------------------------------------------------------------------
// Purpose: returns the IP address and port.
//-----------------------------------------------------------------------------
-std::string CNetAdr2::GetIPAndPort(void) const
-{
- return m_svip;
-}
+std::string CNetAdr2::GetIPAndPort(void) const { return m_svip; }
//-----------------------------------------------------------------------------
// Purpose: returns the address type.
//-----------------------------------------------------------------------------
-netadrtype_t CNetAdr2::GetType(void) const
-{
- return m_type;
-}
+netadrtype_t CNetAdr2::GetType(void) const { return m_type; }
//-----------------------------------------------------------------------------
// Purpose: returns the IP version.
//-----------------------------------------------------------------------------
-netadrversion_t CNetAdr2::GetVersion(void) const
-{
- return m_version;
-}
+netadrversion_t CNetAdr2::GetVersion(void) const { return m_version; }
//-----------------------------------------------------------------------------
// Purpose: splits IP address into parts by their delimiters.
@@ -404,7 +381,7 @@ int CNetAdr2::GetFamily(void) const
//-----------------------------------------------------------------------------
// Purpose: sets fields from 'sockaddr'.
-// Input : *pSadr -
+// Input : *pSadr -
//-----------------------------------------------------------------------------
void CNetAdr2::ToSockadr(sockaddr_storage* pSadr) const
{
@@ -442,16 +419,16 @@ void CNetAdr2::ToSockadr(sockaddr_storage* pSadr) const
//-----------------------------------------------------------------------------
// Purpose: sets fields from 'addrinfo'.
-// Input : *pHint -
+// Input : *pHint -
//-----------------------------------------------------------------------------
void CNetAdr2::ToAdrinfo(addrinfo* pHint) const
{
- int results{ };
- addrinfo hint{ }; // <-- TODO: Pass these instead.
+ int results{};
+ addrinfo hint{}; // <-- TODO: Pass these instead.
if (GetVersion() == netadrversion_t::NA_V4)
{
- hint.ai_flags = AI_PASSIVE;
- hint.ai_family = AF_INET;
+ hint.ai_flags = AI_PASSIVE;
+ hint.ai_family = AF_INET;
hint.ai_socktype = SOCK_STREAM;
hint.ai_protocol = IPPROTO_TCP;
@@ -466,8 +443,8 @@ void CNetAdr2::ToAdrinfo(addrinfo* pHint) const
}
else if (GetVersion() == netadrversion_t::NA_V6)
{
- hint.ai_flags = AI_PASSIVE;
- hint.ai_family = AF_INET6;
+ hint.ai_flags = AI_PASSIVE;
+ hint.ai_family = AF_INET6;
hint.ai_socktype = SOCK_STREAM;
hint.ai_protocol = IPPROTO_TCP;
@@ -500,18 +477,12 @@ bool CNetAdr2::IsValidPort(const std::string& svInPort) const
//-----------------------------------------------------------------------------
// Purpose: returns true if we are localhost.
//-----------------------------------------------------------------------------
-bool CNetAdr2::IsLocalhost(void) const
-{
- return (strcmp(GetBase().c_str(), "127.0.0.1") == 0);
-}
+bool CNetAdr2::IsLocalhost(void) const { return (strcmp(GetBase().c_str(), "127.0.0.1") == 0); }
//-----------------------------------------------------------------------------
// Purpose: returns true if we use the loopback buffers.
//-----------------------------------------------------------------------------
-bool CNetAdr2::IsLoopback(void) const
-{
- return GetType() == netadrtype_t::NA_LOOPBACK;
-}
+bool CNetAdr2::IsLoopback(void) const { return GetType() == netadrtype_t::NA_LOOPBACK; }
//-----------------------------------------------------------------------------
// Purpose: check if address is reserved and not routable.
@@ -530,10 +501,10 @@ bool CNetAdr2::IsReservedAdr(void) const
int n0 = stoi(ip_parts[0]);
int n1 = stoi(ip_parts[1]);
- if ((n0 == 10) || // 10.x.x.x is reserved
- (n0 == 127) || // 127.x.x.x
+ if ((n0 == 10) || // 10.x.x.x is reserved
+ (n0 == 127) || // 127.x.x.x
(n0 == 172 && n1 >= 16 && n1 <= 31) || // 172.16.x.x - 172.31.x.x
- (n0 == 192 && n1 >= 168)) // 192.168.x.x
+ (n0 == 192 && n1 >= 168)) // 192.168.x.x
{
return true;
}
@@ -543,8 +514,8 @@ bool CNetAdr2::IsReservedAdr(void) const
//-----------------------------------------------------------------------------
// Purpose: compares IP for equality (IPv4/IPv6).
-// Input : *netAdr2 -
-// bBaseOnly -
+// Input : *netAdr2 -
+// bBaseOnly -
// Output : true if equal, false otherwise.
//-----------------------------------------------------------------------------
bool CNetAdr2::CompareAdr(const CNetAdr2& netAdr2, bool bBaseOnly) const
@@ -561,8 +532,7 @@ bool CNetAdr2::CompareAdr(const CNetAdr2& netAdr2, bool bBaseOnly) const
if (GetType() == netadrtype_t::NA_IP)
{
- if (!bBaseOnly &&
- (strcmp(netAdr2.GetPort().c_str(), GetPort().c_str()) != 0))
+ if (!bBaseOnly && (strcmp(netAdr2.GetPort().c_str(), GetPort().c_str()) != 0))
{
return false;
}
@@ -578,7 +548,7 @@ bool CNetAdr2::CompareAdr(const CNetAdr2& netAdr2, bool bBaseOnly) const
//-----------------------------------------------------------------------------
// Purpose: compares Class-B IP for equality.
-// Input : *netAdr2 -
+// Input : *netAdr2 -
// Output : true if equal, false otherwise.
//-----------------------------------------------------------------------------
bool CNetAdr2::CompareClassBAdr(const CNetAdr2& netAdr2) const
@@ -603,8 +573,7 @@ bool CNetAdr2::CompareClassBAdr(const CNetAdr2& netAdr2) const
std::vector<std::string> v0 = netAdr2.GetParts();
std::vector<std::string> v1 = GetParts();
- if (strcmp(v0[0].c_str(), v1[0].c_str()) == 0 &&
- strcmp(v0[1].c_str(), v1[1].c_str()) == 0)
+ if (strcmp(v0[0].c_str(), v1[0].c_str()) == 0 && strcmp(v0[1].c_str(), v1[1].c_str()) == 0)
{
return true;
}
@@ -615,7 +584,7 @@ bool CNetAdr2::CompareClassBAdr(const CNetAdr2& netAdr2) const
//-----------------------------------------------------------------------------
// Purpose: compares Class-C IP for equality.
-// Input : *netAdr2 -
+// Input : *netAdr2 -
// Output : true if equal, false otherwise.
//-----------------------------------------------------------------------------
bool CNetAdr2::CompareClassCAdr(const CNetAdr2& netAdr2) const
@@ -640,8 +609,7 @@ bool CNetAdr2::CompareClassCAdr(const CNetAdr2& netAdr2) const
std::vector<std::string> v0 = netAdr2.GetParts();
std::vector<std::string> v1 = GetParts();
- if (strcmp(v0[0].c_str(), v1[0].c_str()) == 0 &&
- strcmp(v0[1].c_str(), v1[1].c_str()) == 0 &&
+ if (strcmp(v0[0].c_str(), v1[0].c_str()) == 0 && strcmp(v0[1].c_str(), v1[1].c_str()) == 0 &&
strcmp(v0[2].c_str(), v1[2].c_str()) == 0)
{
return true;
@@ -654,7 +622,7 @@ bool CNetAdr2::CompareClassCAdr(const CNetAdr2& netAdr2) const
//-----------------------------------------------------------------------------
// Purpose: for replacing string occurence in given string
//-----------------------------------------------------------------------------
-bool CNetAdr2::StringReplace(std::string& svStr, std::string svFrom, std::string svTo) const
+bool CNetAdr2::StringReplace(std::string& svStr, std::string svFrom, std::string svTo) const
{
size_t start_pos = svStr.find(svFrom);
if (start_pos == std::string::npos)
@@ -672,7 +640,7 @@ bool CNetAdr2::StringReplace(std::string& svStr, std::string svFrom, std::strin
void CNetAdr2::Clear(void)
{
m_svip.clear();
- m_type = netadrtype_t::NA_NULL;
+ m_type = netadrtype_t::NA_NULL;
m_version = netadrversion_t::NA_INVALID;
- m_sadr = {};
+ m_sadr = {};
}
diff --git a/NorthstarDedicatedTest/NetAdr2.h b/NorthstarDedicatedTest/NetAdr2.h
index 808d623d..09e3c9af 100644
--- a/NorthstarDedicatedTest/NetAdr2.h
+++ b/NorthstarDedicatedTest/NetAdr2.h
@@ -2,8 +2,8 @@
constexpr int MAX_NETCONSOLE_INPUT_LEN = 4096;
constexpr int MSG_NOSIGNAL = 0;
-//typedef struct netpacket_s netpacket_t;
-//typedef struct __declspec(align(8)) netpacket_s
+// typedef struct netpacket_s netpacket_t;
+// typedef struct __declspec(align(8)) netpacket_s
//{
// DWORD family_maybe;
// sockaddr_in sin;
@@ -43,8 +43,8 @@ enum class netadrversion_t
class CNetAdr2
{
-public:
- CNetAdr2(void) {};
+ public:
+ CNetAdr2(void){};
CNetAdr2(std::string svInAdr);
CNetAdr2(std::string svInAdr, std::string svInPort);
~CNetAdr2(void);
@@ -86,9 +86,9 @@ public:
void Clear(void);
-private:
- std::string m_svip;
- netadrtype_t m_type{};
- netadrversion_t m_version{};
+ private:
+ std::string m_svip;
+ netadrtype_t m_type{};
+ netadrversion_t m_version{};
sockaddr_storage* m_sadr{};
};
diff --git a/NorthstarDedicatedTest/cl_rcon.pb.cc b/NorthstarDedicatedTest/cl_rcon.pb.cc
index 8fde3414..0b0b1b70 100644
--- a/NorthstarDedicatedTest/cl_rcon.pb.cc
+++ b/NorthstarDedicatedTest/cl_rcon.pb.cc
@@ -13,445 +13,446 @@
#include <protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
-namespace cl_rcon {
-constexpr request::request(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : requestbuf_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , requestval_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , requestid_(0)
- , requesttype_(0)
-{}
-struct requestDefaultTypeInternal {
- constexpr requestDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~requestDefaultTypeInternal() {}
- union {
- request _instance;
- };
+namespace cl_rcon
+{
+constexpr request::request(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
+ : requestbuf_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string),
+ requestval_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string), requestid_(0), requesttype_(0)
+{
+}
+struct requestDefaultTypeInternal
+{
+ constexpr requestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
+ ~requestDefaultTypeInternal() {}
+ union
+ {
+ request _instance;
+ };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT requestDefaultTypeInternal _request_default_instance_;
-} // namespace cl_rcon
-namespace cl_rcon {
-bool request_t_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- return true;
- default:
- return false;
- }
+} // namespace cl_rcon
+namespace cl_rcon
+{
+bool request_t_IsValid(int value)
+{
+ switch (value)
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ return true;
+ default:
+ return false;
+ }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> request_t_strings[6] = {};
-static const char request_t_names[] =
- "SERVERDATA_REQUEST_AUTH"
- "SERVERDATA_REQUEST_EXECCOMMAND"
- "SERVERDATA_REQUEST_SEND_CONSOLE_LOG"
- "SERVERDATA_REQUEST_SEND_REMOTEBUG"
- "SERVERDATA_REQUEST_SETVALUE"
- "SERVERDATA_REQUEST_VALUE";
+static const char request_t_names[] = "SERVERDATA_REQUEST_AUTH"
+ "SERVERDATA_REQUEST_EXECCOMMAND"
+ "SERVERDATA_REQUEST_SEND_CONSOLE_LOG"
+ "SERVERDATA_REQUEST_SEND_REMOTEBUG"
+ "SERVERDATA_REQUEST_SETVALUE"
+ "SERVERDATA_REQUEST_VALUE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry request_t_entries[] = {
- { {request_t_names + 0, 23}, 3 },
- { {request_t_names + 23, 30}, 2 },
- { {request_t_names + 53, 35}, 4 },
- { {request_t_names + 88, 33}, 5 },
- { {request_t_names + 121, 27}, 1 },
- { {request_t_names + 148, 24}, 0 },
+ {{request_t_names + 0, 23}, 3}, {{request_t_names + 23, 30}, 2}, {{request_t_names + 53, 35}, 4},
+ {{request_t_names + 88, 33}, 5}, {{request_t_names + 121, 27}, 1}, {{request_t_names + 148, 24}, 0},
};
static const int request_t_entries_by_number[] = {
- 5, // 0 -> SERVERDATA_REQUEST_VALUE
- 4, // 1 -> SERVERDATA_REQUEST_SETVALUE
- 1, // 2 -> SERVERDATA_REQUEST_EXECCOMMAND
- 0, // 3 -> SERVERDATA_REQUEST_AUTH
- 2, // 4 -> SERVERDATA_REQUEST_SEND_CONSOLE_LOG
- 3, // 5 -> SERVERDATA_REQUEST_SEND_REMOTEBUG
+ 5, // 0 -> SERVERDATA_REQUEST_VALUE
+ 4, // 1 -> SERVERDATA_REQUEST_SETVALUE
+ 1, // 2 -> SERVERDATA_REQUEST_EXECCOMMAND
+ 0, // 3 -> SERVERDATA_REQUEST_AUTH
+ 2, // 4 -> SERVERDATA_REQUEST_SEND_CONSOLE_LOG
+ 3, // 5 -> SERVERDATA_REQUEST_SEND_REMOTEBUG
};
-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,
- 6, request_t_strings);
- (void) dummy;
- int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
- request_t_entries,
- request_t_entries_by_number,
- 6, value);
- return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
- request_t_strings[idx].get();
+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, 6, request_t_strings);
+ (void)dummy;
+ int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(request_t_entries, request_t_entries_by_number, 6, 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, 6, name, &int_value);
- if (success) {
- *value = static_cast<request_t>(int_value);
- }
- return success;
+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, 6, name, &int_value);
+ if (success)
+ {
+ *value = static_cast<request_t>(int_value);
+ }
+ return success;
}
// ===================================================================
-class request::_Internal {
- public:
- using HasBits = decltype(std::declval<request>()._has_bits_);
- static void set_has_requestid(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_requesttype(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static void set_has_requestbuf(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_requestval(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
+class request::_Internal
+{
+ public:
+ using HasBits = decltype(std::declval<request>()._has_bits_);
+ static void set_has_requestid(HasBits* has_bits) { (*has_bits)[0] |= 4u; }
+ static void set_has_requesttype(HasBits* has_bits) { (*has_bits)[0] |= 8u; }
+ static void set_has_requestbuf(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();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:cl_rcon.request)
+request::request(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned)
+ : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned)
+{
+ SharedCtor();
+ if (!is_message_owned)
+ {
+ RegisterArenaDtor(arena);
+ }
+ // @@protoc_insertion_point(arena_constructor:cl_rcon.request)
}
-request::request(const request& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- requestbuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_requestbuf()) {
- requestbuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_requestbuf(),
- GetArenaForAllocation());
- }
- requestval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_requestval()) {
- requestval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_requestval(),
- GetArenaForAllocation());
- }
- ::memcpy(&requestid_, &from.requestid_,
- static_cast<size_t>(reinterpret_cast<char*>(&requesttype_) -
- reinterpret_cast<char*>(&requestid_)) + sizeof(requesttype_));
- // @@protoc_insertion_point(copy_constructor:cl_rcon.request)
+request::request(const request& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_)
+{
+ _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
+ requestbuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (from._internal_has_requestbuf())
+ {
+ requestbuf_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_requestbuf(), GetArenaForAllocation());
+ }
+ requestval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (from._internal_has_requestval())
+ {
+ requestval_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_requestval(), GetArenaForAllocation());
+ }
+ ::memcpy(
+ &requestid_, &from.requestid_,
+ static_cast<size_t>(reinterpret_cast<char*>(&requesttype_) - reinterpret_cast<char*>(&requestid_)) + sizeof(requesttype_));
+ // @@protoc_insertion_point(copy_constructor:cl_rcon.request)
}
-inline void request::SharedCtor() {
-requestbuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+inline void request::SharedCtor()
+{
+ requestbuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-requestval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ requestval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&requestid_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&requesttype_) -
- reinterpret_cast<char*>(&requestid_)) + sizeof(requesttype_));
+ ::memset(
+ reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&requestid_) - reinterpret_cast<char*>(this)), 0,
+ static_cast<size_t>(reinterpret_cast<char*>(&requesttype_) - reinterpret_cast<char*>(&requestid_)) + sizeof(requesttype_));
}
-request::~request() {
- // @@protoc_insertion_point(destructor:cl_rcon.request)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
+request::~request()
+{
+ // @@protoc_insertion_point(destructor:cl_rcon.request)
+ if (GetArenaForAllocation() != nullptr)
+ return;
+ SharedDtor();
+ _internal_metadata_.Delete<std::string>();
}
-inline void request::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- requestbuf_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- requestval_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+inline void request::SharedDtor()
+{
+ GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ requestbuf_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ requestval_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
-void request::ArenaDtor(void* object) {
- request* _this = reinterpret_cast< request* >(object);
- (void)_this;
-}
-void request::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
+void request::ArenaDtor(void* object)
+{
+ request* _this = reinterpret_cast<request*>(object);
+ (void)_this;
}
-void request::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+void request::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {}
+void request::SetCachedSize(int size) const { _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 = _has_bits_[0];
+ if (cached_has_bits & 0x00000003u)
+ {
+ if (cached_has_bits & 0x00000001u)
+ {
+ requestbuf_.ClearNonDefaultToEmpty();
+ }
+ if (cached_has_bits & 0x00000002u)
+ {
+ requestval_.ClearNonDefaultToEmpty();
+ }
+ }
+ if (cached_has_bits & 0x0000000cu)
+ {
+ ::memset(
+ &requestid_, 0,
+ static_cast<size_t>(reinterpret_cast<char*>(&requesttype_) - reinterpret_cast<char*>(&requestid_)) + sizeof(requesttype_));
+ }
+ _has_bits_.Clear();
+ _internal_metadata_.Clear<std::string>();
}
-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 = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- requestbuf_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- requestval_.ClearNonDefaultToEmpty();
- }
- }
- if (cached_has_bits & 0x0000000cu) {
- ::memset(&requestid_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&requesttype_) -
- reinterpret_cast<char*>(&requestid_)) + sizeof(requesttype_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<std::string>();
-}
-
-const char* request::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
-#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional int32 requestID = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- _Internal::set_has_requestid(&has_bits);
- requestid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .cl_rcon.request_t requestType = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- 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 requestBuf = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
- auto str = _internal_mutable_requestbuf();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string requestVal = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
- auto str = _internal_mutable_requestval();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
- 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<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
+const char* request::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
+{
+#define CHK_(x) \
+ if (PROTOBUF_PREDICT_FALSE(!(x))) \
+ goto failure
+ _Internal::HasBits has_bits{};
+ while (!ctx->Done(&ptr))
+ {
+ uint32_t tag;
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
+ switch (tag >> 3)
+ {
+ // optional int32 requestID = 1;
+ case 1:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
+ {
+ _Internal::set_has_requestid(&has_bits);
+ requestid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ CHK_(ptr);
+ }
+ else
+ goto handle_unusual;
+ continue;
+ // optional .cl_rcon.request_t requestType = 2;
+ case 2:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
+ {
+ 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 requestBuf = 3;
+ case 3:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26))
+ {
+ auto str = _internal_mutable_requestbuf();
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+ CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
+ CHK_(ptr);
+ }
+ else
+ goto handle_unusual;
+ continue;
+ // optional string requestVal = 4;
+ case 4:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34))
+ {
+ auto str = _internal_mutable_requestval();
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+ CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
+ 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<std::string>(), ptr, ctx);
+ CHK_(ptr != nullptr);
+ } // while
message_done:
- _has_bits_.Or(has_bits);
- return ptr;
+ _has_bits_.Or(has_bits);
+ return ptr;
failure:
- ptr = nullptr;
- goto message_done;
+ 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 requestID = 1;
- if (_internal_has_requestid()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_requestid(), target);
- }
-
- // optional .cl_rcon.request_t requestType = 2;
- if (_internal_has_requesttype()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 2, this->_internal_requesttype(), target);
- }
-
- // optional string requestBuf = 3;
- if (_internal_has_requestbuf()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_requestbuf().data(), static_cast<int>(this->_internal_requestbuf().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "cl_rcon.request.requestBuf");
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_requestbuf(), target);
- }
-
- // optional string requestVal = 4;
- if (_internal_has_requestval()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_requestval().data(), static_cast<int>(this->_internal_requestval().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "cl_rcon.request.requestVal");
- target = stream->WriteStringMaybeAliased(
- 4, this->_internal_requestval(), target);
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::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 = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- // optional string requestBuf = 3;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_requestbuf());
- }
-
- // optional string requestVal = 4;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_requestval());
- }
-
- // optional int32 requestID = 1;
- if (cached_has_bits & 0x00000004u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_requestid());
- }
-
- // optional .cl_rcon.request_t requestType = 2;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype());
- }
-
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void request::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const request*>(
- &from));
+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 requestID = 1;
+ if (_internal_has_requestid())
+ {
+ target = stream->EnsureSpace(target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_requestid(), target);
+ }
+
+ // optional .cl_rcon.request_t requestType = 2;
+ if (_internal_has_requesttype())
+ {
+ target = stream->EnsureSpace(target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(2, this->_internal_requesttype(), target);
+ }
+
+ // optional string requestBuf = 3;
+ if (_internal_has_requestbuf())
+ {
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
+ this->_internal_requestbuf().data(), static_cast<int>(this->_internal_requestbuf().length()),
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "cl_rcon.request.requestBuf");
+ target = stream->WriteStringMaybeAliased(3, this->_internal_requestbuf(), target);
+ }
+
+ // optional string requestVal = 4;
+ if (_internal_has_requestval())
+ {
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
+ this->_internal_requestval().data(), static_cast<int>(this->_internal_requestval().length()),
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "cl_rcon.request.requestVal");
+ target = stream->WriteStringMaybeAliased(4, this->_internal_requestval(), target);
+ }
+
+ if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
+ {
+ target = stream->WriteRaw(
+ _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
+ static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()),
+ target);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:cl_rcon.request)
+ return target;
}
-void request::MergeFrom(const request& from) {
-// @@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._has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_requestbuf(from._internal_requestbuf());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_requestval(from._internal_requestval());
- }
- if (cached_has_bits & 0x00000004u) {
- requestid_ = from.requestid_;
- }
- if (cached_has_bits & 0x00000008u) {
- requesttype_ = from.requesttype_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
+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 = _has_bits_[0];
+ if (cached_has_bits & 0x0000000fu)
+ {
+ // optional string requestBuf = 3;
+ if (cached_has_bits & 0x00000001u)
+ {
+ total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(this->_internal_requestbuf());
+ }
+
+ // optional string requestVal = 4;
+ if (cached_has_bits & 0x00000002u)
+ {
+ total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(this->_internal_requestval());
+ }
+
+ // optional int32 requestID = 1;
+ if (cached_has_bits & 0x00000004u)
+ {
+ total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_requestid());
+ }
+
+ // optional .cl_rcon.request_t requestType = 2;
+ if (cached_has_bits & 0x00000008u)
+ {
+ total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype());
+ }
+ }
+ if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
+ {
+ total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
+ }
+ int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
+ SetCachedSize(cached_size);
+ return total_size;
}
-void request::CopyFrom(const request& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:cl_rcon.request)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
+void request::CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from)
+{
+ MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const request*>(&from));
}
-bool request::IsInitialized() const {
- return true;
+void request::MergeFrom(const request& from)
+{
+ // @@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._has_bits_[0];
+ if (cached_has_bits & 0x0000000fu)
+ {
+ if (cached_has_bits & 0x00000001u)
+ {
+ _internal_set_requestbuf(from._internal_requestbuf());
+ }
+ if (cached_has_bits & 0x00000002u)
+ {
+ _internal_set_requestval(from._internal_requestval());
+ }
+ if (cached_has_bits & 0x00000004u)
+ {
+ requestid_ = from.requestid_;
+ }
+ if (cached_has_bits & 0x00000008u)
+ {
+ requesttype_ = from.requesttype_;
+ }
+ _has_bits_[0] |= cached_has_bits;
+ }
+ _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
-void request::InternalSwap(request* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &requestbuf_, lhs_arena,
- &other->requestbuf_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &requestval_, lhs_arena,
- &other->requestval_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(request, requesttype_)
- + sizeof(request::requesttype_)
- - PROTOBUF_FIELD_OFFSET(request, requestid_)>(
- reinterpret_cast<char*>(&requestid_),
- reinterpret_cast<char*>(&other->requestid_));
+void request::CopyFrom(const request& from)
+{
+ // @@protoc_insertion_point(class_specific_copy_from_start:cl_rcon.request)
+ if (&from == this)
+ return;
+ Clear();
+ MergeFrom(from);
}
-std::string request::GetTypeName() const {
- return "cl_rcon.request";
+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(_has_bits_[0], other->_has_bits_[0]);
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
+ &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &requestbuf_, lhs_arena, &other->requestbuf_, rhs_arena);
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
+ &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &requestval_, lhs_arena, &other->requestval_, rhs_arena);
+ ::PROTOBUF_NAMESPACE_ID::internal::memswap<
+ PROTOBUF_FIELD_OFFSET(request, requesttype_) + sizeof(request::requesttype_) - PROTOBUF_FIELD_OFFSET(request, requestid_)>(
+ reinterpret_cast<char*>(&requestid_), reinterpret_cast<char*>(&other->requestid_));
}
+std::string request::GetTypeName() const { return "cl_rcon.request"; }
// @@protoc_insertion_point(namespace_scope)
-} // namespace cl_rcon
+} // 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);
+template <> PROTOBUF_NOINLINE ::cl_rcon::request* Arena::CreateMaybeMessage<::cl_rcon::request>(Arena* arena)
+{
+ return Arena::CreateMessageInternal<::cl_rcon::request>(arena);
}
PROTOBUF_NAMESPACE_CLOSE
diff --git a/NorthstarDedicatedTest/cl_rcon.pb.h b/NorthstarDedicatedTest/cl_rcon.pb.h
index 25933410..cc9a2481 100644
--- a/NorthstarDedicatedTest/cl_rcon.pb.h
+++ b/NorthstarDedicatedTest/cl_rcon.pb.h
@@ -27,49 +27,51 @@
#include <protobuf/generated_message_util.h>
#include <protobuf/metadata_lite.h>
#include <protobuf/message_lite.h>
-#include <protobuf/repeated_field.h> // IWYU pragma: export
-#include <protobuf/extension_set.h> // IWYU pragma: export
+#include <protobuf/repeated_field.h> // IWYU pragma: export
+#include <protobuf/extension_set.h> // IWYU pragma: export
#include <protobuf/generated_enum_util.h>
// @@protoc_insertion_point(includes)
#include <protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_cl_5frcon_2eproto
PROTOBUF_NAMESPACE_OPEN
-namespace internal {
+namespace internal
+{
class AnyMetadata;
-} // namespace internal
+} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
-struct TableStruct_cl_5frcon_2eproto {
- static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
- static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const uint32_t offsets[];
+struct TableStruct_cl_5frcon_2eproto
+{
+ static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold);
+ static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold);
+ static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold);
+ static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
+ static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
+ static const uint32_t offsets[];
};
-namespace cl_rcon {
+namespace cl_rcon
+{
class request;
struct requestDefaultTypeInternal;
extern requestDefaultTypeInternal _request_default_instance_;
-} // namespace cl_rcon
+} // namespace cl_rcon
PROTOBUF_NAMESPACE_OPEN
-template<> ::cl_rcon::request* Arena::CreateMaybeMessage<::cl_rcon::request>(Arena*);
+template <>::cl_rcon::request* Arena::CreateMaybeMessage<::cl_rcon::request>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
-namespace cl_rcon {
-
-enum request_t : int {
- SERVERDATA_REQUEST_VALUE = 0,
- SERVERDATA_REQUEST_SETVALUE = 1,
- SERVERDATA_REQUEST_EXECCOMMAND = 2,
- SERVERDATA_REQUEST_AUTH = 3,
- SERVERDATA_REQUEST_SEND_CONSOLE_LOG = 4,
- SERVERDATA_REQUEST_SEND_REMOTEBUG = 5,
- request_t_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
- request_t_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
+namespace cl_rcon
+{
+
+enum request_t : int
+{
+ SERVERDATA_REQUEST_VALUE = 0,
+ SERVERDATA_REQUEST_SETVALUE = 1,
+ SERVERDATA_REQUEST_EXECCOMMAND = 2,
+ SERVERDATA_REQUEST_AUTH = 3,
+ SERVERDATA_REQUEST_SEND_CONSOLE_LOG = 4,
+ SERVERDATA_REQUEST_SEND_REMOTEBUG = 5,
+ request_t_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
+ request_t_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
bool request_t_IsValid(int value);
constexpr request_t request_t_MIN = SERVERDATA_REQUEST_VALUE;
@@ -77,425 +79,452 @@ constexpr request_t request_t_MAX = SERVERDATA_REQUEST_SEND_REMOTEBUG;
constexpr int request_t_ARRAYSIZE = request_t_MAX + 1;
const std::string& request_t_Name(request_t value);
-template<typename T>
-inline const std::string& request_t_Name(T enum_t_value) {
- static_assert(::std::is_same<T, request_t>::value ||
- ::std::is_integral<T>::value,
- "Incorrect type passed to function request_t_Name.");
- return request_t_Name(static_cast<request_t>(enum_t_value));
+template <typename T> inline const std::string& request_t_Name(T enum_t_value)
+{
+ static_assert(::std::is_same<T, request_t>::value || ::std::is_integral<T>::value, "Incorrect type passed to function request_t_Name.");
+ return request_t_Name(static_cast<request_t>(enum_t_value));
}
-bool request_t_Parse(
- ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, request_t* value);
+bool request_t_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, request_t* value);
// ===================================================================
-class request final :
- public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:cl_rcon.request) */ {
- public:
- inline request() : request(nullptr) {}
- ~request() override;
- explicit constexpr request(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
-
- request(const request& from);
- request(request&& from) noexcept
- : request() {
- *this = ::std::move(from);
- }
-
- inline request& operator=(const request& from) {
- CopyFrom(from);
- return *this;
- }
- inline request& operator=(request&& from) noexcept {
- if (this == &from) return *this;
- if (GetOwningArena() == from.GetOwningArena()
- #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
- && GetOwningArena() != nullptr
- #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
- ) {
- InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
-
- static const request& default_instance() {
- return *internal_default_instance();
- }
- static inline const request* internal_default_instance() {
- return reinterpret_cast<const request*>(
- &_request_default_instance_);
- }
- static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(request& a, request& b) {
- a.Swap(&b);
- }
- inline void Swap(request* other) {
- if (other == this) return;
- #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetOwningArena() != nullptr &&
- GetOwningArena() == other->GetOwningArena()) {
- #else // PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetOwningArena() == other->GetOwningArena()) {
- #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
- InternalSwap(other);
- } else {
- ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
- }
- }
- void UnsafeArenaSwap(request* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
- InternalSwap(other);
- }
-
- // implements Message ----------------------------------------------
-
- request* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
- return CreateMaybeMessage<request>(arena);
- }
- void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
- void CopyFrom(const request& from);
- void MergeFrom(const request& from);
- PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
- bool IsInitialized() const final;
-
- size_t ByteSizeLong() const final;
- const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- uint8_t* _InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+class request final : public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:cl_rcon.request) */
+{
+ public:
+ inline request() : request(nullptr) {}
+ ~request() override;
+ explicit constexpr request(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
+
+ request(const request& from);
+ request(request&& from) noexcept : request() { *this = ::std::move(from); }
+
+ inline request& operator=(const request& from)
+ {
+ CopyFrom(from);
+ return *this;
+ }
+ inline request& operator=(request&& from) noexcept
+ {
+ if (this == &from)
+ return *this;
+ if (GetOwningArena() == from.GetOwningArena()
+#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
+ && GetOwningArena() != nullptr
+#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
+ )
+ {
+ InternalSwap(&from);
+ }
+ else
+ {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+
+ static const request& default_instance() { return *internal_default_instance(); }
+ static inline const request* internal_default_instance() { return reinterpret_cast<const request*>(&_request_default_instance_); }
+ static constexpr int kIndexInFileMessages = 0;
+
+ friend void swap(request& a, request& b) { a.Swap(&b); }
+ inline void Swap(request* other)
+ {
+ if (other == this)
+ return;
+#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
+ if (GetOwningArena() != nullptr && GetOwningArena() == other->GetOwningArena())
+ {
+#else // PROTOBUF_FORCE_COPY_IN_SWAP
+ if (GetOwningArena() == other->GetOwningArena())
+ {
+#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
+ InternalSwap(other);
+ }
+ else
+ {
+ ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
+ }
+ }
+ void UnsafeArenaSwap(request* other)
+ {
+ if (other == this)
+ return;
+ GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
+ InternalSwap(other);
+ }
+
+ // implements Message ----------------------------------------------
+
+ request* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage<request>(arena); }
+ void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
+ void CopyFrom(const request& from);
+ void MergeFrom(const request& from);
+ PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
+ bool IsInitialized() const final;
+
+ size_t ByteSizeLong() const final;
+ const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
+ uint8_t* _InternalSerialize(uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ int GetCachedSize() const final { return _cached_size_.Get(); }
private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(request* other);
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(request* other);
private:
- friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
- static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
- return "cl_rcon.request";
- }
+ friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
+ static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "cl_rcon.request"; }
+
protected:
- explicit request(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned = false);
+ explicit request(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false);
+
private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
+
public:
+ std::string GetTypeName() const final;
- std::string GetTypeName() const final;
+ // nested types ----------------------------------------------------
- // nested types ----------------------------------------------------
+ // accessors -------------------------------------------------------
- // accessors -------------------------------------------------------
+ enum : int
+ {
+ kRequestBufFieldNumber = 3,
+ kRequestValFieldNumber = 4,
+ kRequestIDFieldNumber = 1,
+ kRequestTypeFieldNumber = 2,
+ };
+ // optional string requestBuf = 3;
+ bool has_requestbuf() const;
- enum : int {
- kRequestBufFieldNumber = 3,
- kRequestValFieldNumber = 4,
- kRequestIDFieldNumber = 1,
- kRequestTypeFieldNumber = 2,
- };
- // optional string requestBuf = 3;
- bool has_requestbuf() const;
private:
- bool _internal_has_requestbuf() const;
+ bool _internal_has_requestbuf() const;
+
public:
- void clear_requestbuf();
- const std::string& requestbuf() const;
- template <typename ArgT0 = const std::string&, typename... ArgT>
- void set_requestbuf(ArgT0&& arg0, ArgT... args);
- std::string* mutable_requestbuf();
- PROTOBUF_NODISCARD std::string* release_requestbuf();
- void set_allocated_requestbuf(std::string* requestbuf);
+ void clear_requestbuf();
+ const std::string& requestbuf() const;
+ template <typename ArgT0 = const std::string&, typename... ArgT> void set_requestbuf(ArgT0&& arg0, ArgT... args);
+ std::string* mutable_requestbuf();
+ PROTOBUF_NODISCARD std::string* release_requestbuf();
+ void set_allocated_requestbuf(std::string* requestbuf);
+
private:
- const std::string& _internal_requestbuf() const;
- inline PROTOBUF_ALWAYS_INLINE void _internal_set_requestbuf(const std::string& value);
- std::string* _internal_mutable_requestbuf();
+ const std::string& _internal_requestbuf() const;
+ inline PROTOBUF_ALWAYS_INLINE void _internal_set_requestbuf(const std::string& value);
+ std::string* _internal_mutable_requestbuf();
+
public:
+ // optional string requestVal = 4;
+ bool has_requestval() const;
- // optional string requestVal = 4;
- bool has_requestval() const;
private:
- bool _internal_has_requestval() const;
+ bool _internal_has_requestval() const;
+
public:
- void clear_requestval();
- const std::string& requestval() const;
- template <typename ArgT0 = const std::string&, typename... ArgT>
- void set_requestval(ArgT0&& arg0, ArgT... args);
- std::string* mutable_requestval();
- PROTOBUF_NODISCARD std::string* release_requestval();
- void set_allocated_requestval(std::string* requestval);
+ void clear_requestval();
+ const std::string& requestval() const;
+ template <typename ArgT0 = const std::string&, typename... ArgT> void set_requestval(ArgT0&& arg0, ArgT... args);
+ std::string* mutable_requestval();
+ PROTOBUF_NODISCARD std::string* release_requestval();
+ void set_allocated_requestval(std::string* requestval);
+
private:
- const std::string& _internal_requestval() const;
- inline PROTOBUF_ALWAYS_INLINE void _internal_set_requestval(const std::string& value);
- std::string* _internal_mutable_requestval();
+ const std::string& _internal_requestval() const;
+ inline PROTOBUF_ALWAYS_INLINE void _internal_set_requestval(const std::string& value);
+ std::string* _internal_mutable_requestval();
+
public:
+ // optional int32 requestID = 1;
+ bool has_requestid() const;
- // optional int32 requestID = 1;
- bool has_requestid() const;
private:
- bool _internal_has_requestid() const;
+ bool _internal_has_requestid() const;
+
public:
- void clear_requestid();
- int32_t requestid() const;
- void set_requestid(int32_t value);
+ void clear_requestid();
+ int32_t requestid() const;
+ void set_requestid(int32_t value);
+
private:
- int32_t _internal_requestid() const;
- void _internal_set_requestid(int32_t value);
+ int32_t _internal_requestid() const;
+ void _internal_set_requestid(int32_t value);
+
public:
+ // optional .cl_rcon.request_t requestType = 2;
+ bool has_requesttype() const;
- // optional .cl_rcon.request_t requestType = 2;
- bool has_requesttype() const;
private:
- bool _internal_has_requesttype() const;
+ bool _internal_has_requesttype() const;
+
public:
- void clear_requesttype();
- ::cl_rcon::request_t requesttype() const;
- void set_requesttype(::cl_rcon::request_t value);
+ void clear_requesttype();
+ ::cl_rcon::request_t requesttype() const;
+ void set_requesttype(::cl_rcon::request_t value);
+
private:
- ::cl_rcon::request_t _internal_requesttype() const;
- void _internal_set_requesttype(::cl_rcon::request_t value);
- public:
+ ::cl_rcon::request_t _internal_requesttype() const;
+ void _internal_set_requesttype(::cl_rcon::request_t value);
- // @@protoc_insertion_point(class_scope:cl_rcon.request)
- private:
- class _Internal;
-
- template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr requestbuf_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr requestval_;
- int32_t requestid_;
- int requesttype_;
- friend struct ::TableStruct_cl_5frcon_2eproto;
+ public:
+ // @@protoc_insertion_point(class_scope:cl_rcon.request)
+ private:
+ class _Internal;
+
+ template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr requestbuf_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr requestval_;
+ int32_t requestid_;
+ int requesttype_;
+ friend struct ::TableStruct_cl_5frcon_2eproto;
};
// ===================================================================
-
// ===================================================================
#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// request
// optional int32 requestID = 1;
-inline bool request::_internal_has_requestid() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
- return value;
-}
-inline bool request::has_requestid() const {
- return _internal_has_requestid();
-}
-inline void request::clear_requestid() {
- requestid_ = 0;
- _has_bits_[0] &= ~0x00000004u;
-}
-inline int32_t request::_internal_requestid() const {
- return requestid_;
-}
-inline int32_t request::requestid() const {
- // @@protoc_insertion_point(field_get:cl_rcon.request.requestID)
- return _internal_requestid();
-}
-inline void request::_internal_set_requestid(int32_t value) {
- _has_bits_[0] |= 0x00000004u;
- requestid_ = value;
-}
-inline void request::set_requestid(int32_t value) {
- _internal_set_requestid(value);
- // @@protoc_insertion_point(field_set:cl_rcon.request.requestID)
+inline bool request::_internal_has_requestid() const
+{
+ bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ return value;
+}
+inline bool request::has_requestid() const { return _internal_has_requestid(); }
+inline void request::clear_requestid()
+{
+ requestid_ = 0;
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline int32_t request::_internal_requestid() const { return requestid_; }
+inline int32_t request::requestid() const
+{
+ // @@protoc_insertion_point(field_get:cl_rcon.request.requestID)
+ return _internal_requestid();
+}
+inline void request::_internal_set_requestid(int32_t value)
+{
+ _has_bits_[0] |= 0x00000004u;
+ requestid_ = value;
+}
+inline void request::set_requestid(int32_t value)
+{
+ _internal_set_requestid(value);
+ // @@protoc_insertion_point(field_set:cl_rcon.request.requestID)
}
// optional .cl_rcon.request_t requestType = 2;
-inline bool request::_internal_has_requesttype() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
- return value;
-}
-inline bool request::has_requesttype() const {
- return _internal_has_requesttype();
-}
-inline void request::clear_requesttype() {
- requesttype_ = 0;
- _has_bits_[0] &= ~0x00000008u;
-}
-inline ::cl_rcon::request_t request::_internal_requesttype() const {
- return static_cast< ::cl_rcon::request_t >(requesttype_);
-}
-inline ::cl_rcon::request_t request::requesttype() const {
- // @@protoc_insertion_point(field_get:cl_rcon.request.requestType)
- return _internal_requesttype();
-}
-inline void request::_internal_set_requesttype(::cl_rcon::request_t value) {
- _has_bits_[0] |= 0x00000008u;
- requesttype_ = value;
-}
-inline void request::set_requesttype(::cl_rcon::request_t value) {
- _internal_set_requesttype(value);
- // @@protoc_insertion_point(field_set:cl_rcon.request.requestType)
+inline bool request::_internal_has_requesttype() const
+{
+ bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ return value;
+}
+inline bool request::has_requesttype() const { return _internal_has_requesttype(); }
+inline void request::clear_requesttype()
+{
+ requesttype_ = 0;
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline ::cl_rcon::request_t request::_internal_requesttype() const { return static_cast<::cl_rcon::request_t>(requesttype_); }
+inline ::cl_rcon::request_t request::requesttype() const
+{
+ // @@protoc_insertion_point(field_get:cl_rcon.request.requestType)
+ return _internal_requesttype();
+}
+inline void request::_internal_set_requesttype(::cl_rcon::request_t value)
+{
+ _has_bits_[0] |= 0x00000008u;
+ requesttype_ = value;
+}
+inline void request::set_requesttype(::cl_rcon::request_t value)
+{
+ _internal_set_requesttype(value);
+ // @@protoc_insertion_point(field_set:cl_rcon.request.requestType)
}
// optional string requestBuf = 3;
-inline bool request::_internal_has_requestbuf() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
- return value;
-}
-inline bool request::has_requestbuf() const {
- return _internal_has_requestbuf();
-}
-inline void request::clear_requestbuf() {
- requestbuf_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
-}
-inline const std::string& request::requestbuf() const {
- // @@protoc_insertion_point(field_get:cl_rcon.request.requestBuf)
- return _internal_requestbuf();
-}
-template <typename ArgT0, typename... ArgT>
-inline PROTOBUF_ALWAYS_INLINE
-void request::set_requestbuf(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- requestbuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
- // @@protoc_insertion_point(field_set:cl_rcon.request.requestBuf)
-}
-inline std::string* request::mutable_requestbuf() {
- std::string* _s = _internal_mutable_requestbuf();
- // @@protoc_insertion_point(field_mutable:cl_rcon.request.requestBuf)
- return _s;
-}
-inline const std::string& request::_internal_requestbuf() const {
- return requestbuf_.Get();
-}
-inline void request::_internal_set_requestbuf(const std::string& value) {
- _has_bits_[0] |= 0x00000001u;
- requestbuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
-}
-inline std::string* request::_internal_mutable_requestbuf() {
- _has_bits_[0] |= 0x00000001u;
- return requestbuf_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
-}
-inline std::string* request::release_requestbuf() {
- // @@protoc_insertion_point(field_release:cl_rcon.request.requestBuf)
- if (!_internal_has_requestbuf()) {
- return nullptr;
- }
- _has_bits_[0] &= ~0x00000001u;
- auto* p = requestbuf_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+inline bool request::_internal_has_requestbuf() const
+{
+ bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ return value;
+}
+inline bool request::has_requestbuf() const { return _internal_has_requestbuf(); }
+inline void request::clear_requestbuf()
+{
+ requestbuf_.ClearToEmpty();
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline const std::string& request::requestbuf() const
+{
+ // @@protoc_insertion_point(field_get:cl_rcon.request.requestBuf)
+ return _internal_requestbuf();
+}
+template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void request::set_requestbuf(ArgT0&& arg0, ArgT... args)
+{
+ _has_bits_[0] |= 0x00000001u;
+ requestbuf_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0&&>(arg0), args..., GetArenaForAllocation());
+ // @@protoc_insertion_point(field_set:cl_rcon.request.requestBuf)
+}
+inline std::string* request::mutable_requestbuf()
+{
+ std::string* _s = _internal_mutable_requestbuf();
+ // @@protoc_insertion_point(field_mutable:cl_rcon.request.requestBuf)
+ return _s;
+}
+inline const std::string& request::_internal_requestbuf() const { return requestbuf_.Get(); }
+inline void request::_internal_set_requestbuf(const std::string& value)
+{
+ _has_bits_[0] |= 0x00000001u;
+ requestbuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
+}
+inline std::string* request::_internal_mutable_requestbuf()
+{
+ _has_bits_[0] |= 0x00000001u;
+ return requestbuf_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
+}
+inline std::string* request::release_requestbuf()
+{
+ // @@protoc_insertion_point(field_release:cl_rcon.request.requestBuf)
+ if (!_internal_has_requestbuf())
+ {
+ return nullptr;
+ }
+ _has_bits_[0] &= ~0x00000001u;
+ auto* p = requestbuf_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (requestbuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (requestbuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- return p;
-}
-inline void request::set_allocated_requestbuf(std::string* requestbuf) {
- if (requestbuf != nullptr) {
- _has_bits_[0] |= 0x00000001u;
- } else {
- _has_bits_[0] &= ~0x00000001u;
- }
- requestbuf_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), requestbuf,
- GetArenaForAllocation());
+ return p;
+}
+inline void request::set_allocated_requestbuf(std::string* requestbuf)
+{
+ if (requestbuf != nullptr)
+ {
+ _has_bits_[0] |= 0x00000001u;
+ }
+ else
+ {
+ _has_bits_[0] &= ~0x00000001u;
+ }
+ requestbuf_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), requestbuf, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (requestbuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (requestbuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- // @@protoc_insertion_point(field_set_allocated:cl_rcon.request.requestBuf)
+ // @@protoc_insertion_point(field_set_allocated:cl_rcon.request.requestBuf)
}
// optional string requestVal = 4;
-inline bool request::_internal_has_requestval() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- return value;
-}
-inline bool request::has_requestval() const {
- return _internal_has_requestval();
-}
-inline void request::clear_requestval() {
- requestval_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
-}
-inline const std::string& request::requestval() const {
- // @@protoc_insertion_point(field_get:cl_rcon.request.requestVal)
- return _internal_requestval();
-}
-template <typename ArgT0, typename... ArgT>
-inline PROTOBUF_ALWAYS_INLINE
-void request::set_requestval(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- requestval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
- // @@protoc_insertion_point(field_set:cl_rcon.request.requestVal)
-}
-inline std::string* request::mutable_requestval() {
- std::string* _s = _internal_mutable_requestval();
- // @@protoc_insertion_point(field_mutable:cl_rcon.request.requestVal)
- return _s;
-}
-inline const std::string& request::_internal_requestval() const {
- return requestval_.Get();
-}
-inline void request::_internal_set_requestval(const std::string& value) {
- _has_bits_[0] |= 0x00000002u;
- requestval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
-}
-inline std::string* request::_internal_mutable_requestval() {
- _has_bits_[0] |= 0x00000002u;
- return requestval_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
-}
-inline std::string* request::release_requestval() {
- // @@protoc_insertion_point(field_release:cl_rcon.request.requestVal)
- if (!_internal_has_requestval()) {
- return nullptr;
- }
- _has_bits_[0] &= ~0x00000002u;
- auto* p = requestval_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+inline bool request::_internal_has_requestval() const
+{
+ bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ return value;
+}
+inline bool request::has_requestval() const { return _internal_has_requestval(); }
+inline void request::clear_requestval()
+{
+ requestval_.ClearToEmpty();
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline const std::string& request::requestval() const
+{
+ // @@protoc_insertion_point(field_get:cl_rcon.request.requestVal)
+ return _internal_requestval();
+}
+template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void request::set_requestval(ArgT0&& arg0, ArgT... args)
+{
+ _has_bits_[0] |= 0x00000002u;
+ requestval_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0&&>(arg0), args..., GetArenaForAllocation());
+ // @@protoc_insertion_point(field_set:cl_rcon.request.requestVal)
+}
+inline std::string* request::mutable_requestval()
+{
+ std::string* _s = _internal_mutable_requestval();
+ // @@protoc_insertion_point(field_mutable:cl_rcon.request.requestVal)
+ return _s;
+}
+inline const std::string& request::_internal_requestval() const { return requestval_.Get(); }
+inline void request::_internal_set_requestval(const std::string& value)
+{
+ _has_bits_[0] |= 0x00000002u;
+ requestval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
+}
+inline std::string* request::_internal_mutable_requestval()
+{
+ _has_bits_[0] |= 0x00000002u;
+ return requestval_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
+}
+inline std::string* request::release_requestval()
+{
+ // @@protoc_insertion_point(field_release:cl_rcon.request.requestVal)
+ if (!_internal_has_requestval())
+ {
+ return nullptr;
+ }
+ _has_bits_[0] &= ~0x00000002u;
+ auto* p = requestval_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (requestval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (requestval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- return p;
-}
-inline void request::set_allocated_requestval(std::string* requestval) {
- if (requestval != nullptr) {
- _has_bits_[0] |= 0x00000002u;
- } else {
- _has_bits_[0] &= ~0x00000002u;
- }
- requestval_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), requestval,
- GetArenaForAllocation());
+ return p;
+}
+inline void request::set_allocated_requestval(std::string* requestval)
+{
+ if (requestval != nullptr)
+ {
+ _has_bits_[0] |= 0x00000002u;
+ }
+ else
+ {
+ _has_bits_[0] &= ~0x00000002u;
+ }
+ requestval_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), requestval, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (requestval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (requestval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- // @@protoc_insertion_point(field_set_allocated:cl_rcon.request.requestVal)
+ // @@protoc_insertion_point(field_set_allocated:cl_rcon.request.requestVal)
}
#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
-} // namespace cl_rcon
+} // namespace cl_rcon
PROTOBUF_NAMESPACE_OPEN
-template <> struct is_proto_enum< ::cl_rcon::request_t> : ::std::true_type {};
+template <> struct is_proto_enum<::cl_rcon::request_t> : ::std::true_type
+{
+};
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_cl_5frcon_2eproto
+#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_cl_5frcon_2eproto
diff --git a/NorthstarDedicatedTest/net.cpp b/NorthstarDedicatedTest/net.cpp
index 0f75eb5d..167bfa8a 100644
--- a/NorthstarDedicatedTest/net.cpp
+++ b/NorthstarDedicatedTest/net.cpp
@@ -14,51 +14,97 @@ const char* NET_ErrorString(int iCode)
{
switch (iCode)
{
- case WSAEINTR : return "WSAEINTR";
- case WSAEBADF : return "WSAEBADF";
- case WSAEACCES : return "WSAEACCES";
- case WSAEDISCON : return "WSAEDISCON";
- case WSAEFAULT : return "WSAEFAULT";
- case WSAEINVAL : return "WSAEINVAL";
- case WSAEMFILE : return "WSAEMFILE";
- case WSAEWOULDBLOCK : return "WSAEWOULDBLOCK";
- case WSAEINPROGRESS : return "WSAEINPROGRESS";
- case WSAEALREADY : return "WSAEALREADY";
- case WSAENOTSOCK : return "WSAENOTSOCK";
- case WSAEDESTADDRREQ : return "WSAEDESTADDRREQ";
- case WSAEMSGSIZE : return "WSAEMSGSIZE";
- case WSAEPROTOTYPE : return "WSAEPROTOTYPE";
- case WSAENOPROTOOPT : return "WSAENOPROTOOPT";
- case WSAEPROTONOSUPPORT: return "WSAEPROTONOSUPPORT";
- case WSAESOCKTNOSUPPORT: return "WSAESOCKTNOSUPPORT";
- case WSAEOPNOTSUPP : return "WSAEOPNOTSUPP";
- case WSAEPFNOSUPPORT : return "WSAEPFNOSUPPORT";
- case WSAEAFNOSUPPORT : return "WSAEAFNOSUPPORT";
- case WSAEADDRINUSE : return "WSAEADDRINUSE";
- case WSAEADDRNOTAVAIL : return "WSAEADDRNOTAVAIL";
- case WSAENETDOWN : return "WSAENETDOWN";
- case WSAENETUNREACH : return "WSAENETUNREACH";
- case WSAENETRESET : return "WSAENETRESET";
- case WSAECONNABORTED : return "WSWSAECONNABORTEDAEINTR";
- case WSAECONNRESET : return "WSAECONNRESET";
- case WSAENOBUFS : return "WSAENOBUFS";
- case WSAEISCONN : return "WSAEISCONN";
- case WSAENOTCONN : return "WSAENOTCONN";
- case WSAESHUTDOWN : return "WSAESHUTDOWN";
- case WSAETOOMANYREFS : return "WSAETOOMANYREFS";
- case WSAETIMEDOUT : return "WSAETIMEDOUT";
- case WSAECONNREFUSED : return "WSAECONNREFUSED";
- case WSAELOOP : return "WSAELOOP";
- case WSAENAMETOOLONG : return "WSAENAMETOOLONG";
- case WSAEHOSTDOWN : return "WSAEHOSTDOWN";
- case WSAEPROCLIM : return "WSAEPROCLIM";
- case WSASYSNOTREADY : return "WSASYSNOTREADY";
- case WSAVERNOTSUPPORTED: return "WSAVERNOTSUPPORTED";
- case WSANOTINITIALISED : return "WSANOTINITIALISED";
- case WSAHOST_NOT_FOUND : return "WSAHOST_NOT_FOUND";
- case WSATRY_AGAIN : return "WSATRY_AGAIN";
- case WSANO_RECOVERY : return "WSANO_RECOVERY";
- case WSANO_DATA : return "WSANO_DATA";
- default : return "UNKNOWN ERROR";
+ case WSAEINTR:
+ return "WSAEINTR";
+ case WSAEBADF:
+ return "WSAEBADF";
+ case WSAEACCES:
+ return "WSAEACCES";
+ case WSAEDISCON:
+ return "WSAEDISCON";
+ case WSAEFAULT:
+ return "WSAEFAULT";
+ case WSAEINVAL:
+ return "WSAEINVAL";
+ case WSAEMFILE:
+ return "WSAEMFILE";
+ case WSAEWOULDBLOCK:
+ return "WSAEWOULDBLOCK";
+ case WSAEINPROGRESS:
+ return "WSAEINPROGRESS";
+ case WSAEALREADY:
+ return "WSAEALREADY";
+ case WSAENOTSOCK:
+ return "WSAENOTSOCK";
+ case WSAEDESTADDRREQ:
+ return "WSAEDESTADDRREQ";
+ case WSAEMSGSIZE:
+ return "WSAEMSGSIZE";
+ case WSAEPROTOTYPE:
+ return "WSAEPROTOTYPE";
+ case WSAENOPROTOOPT:
+ return "WSAENOPROTOOPT";
+ case WSAEPROTONOSUPPORT:
+ return "WSAEPROTONOSUPPORT";
+ case WSAESOCKTNOSUPPORT:
+ return "WSAESOCKTNOSUPPORT";
+ case WSAEOPNOTSUPP:
+ return "WSAEOPNOTSUPP";
+ case WSAEPFNOSUPPORT:
+ return "WSAEPFNOSUPPORT";
+ case WSAEAFNOSUPPORT:
+ return "WSAEAFNOSUPPORT";
+ case WSAEADDRINUSE:
+ return "WSAEADDRINUSE";
+ case WSAEADDRNOTAVAIL:
+ return "WSAEADDRNOTAVAIL";
+ case WSAENETDOWN:
+ return "WSAENETDOWN";
+ case WSAENETUNREACH:
+ return "WSAENETUNREACH";
+ case WSAENETRESET:
+ return "WSAENETRESET";
+ case WSAECONNABORTED:
+ return "WSWSAECONNABORTEDAEINTR";
+ case WSAECONNRESET:
+ return "WSAECONNRESET";
+ case WSAENOBUFS:
+ return "WSAENOBUFS";
+ case WSAEISCONN:
+ return "WSAEISCONN";
+ case WSAENOTCONN:
+ return "WSAENOTCONN";
+ case WSAESHUTDOWN:
+ return "WSAESHUTDOWN";
+ case WSAETOOMANYREFS:
+ return "WSAETOOMANYREFS";
+ case WSAETIMEDOUT:
+ return "WSAETIMEDOUT";
+ case WSAECONNREFUSED:
+ return "WSAECONNREFUSED";
+ case WSAELOOP:
+ return "WSAELOOP";
+ case WSAENAMETOOLONG:
+ return "WSAENAMETOOLONG";
+ case WSAEHOSTDOWN:
+ return "WSAEHOSTDOWN";
+ case WSAEPROCLIM:
+ return "WSAEPROCLIM";
+ case WSASYSNOTREADY:
+ return "WSASYSNOTREADY";
+ case WSAVERNOTSUPPORTED:
+ return "WSAVERNOTSUPPORTED";
+ case WSANOTINITIALISED:
+ return "WSANOTINITIALISED";
+ case WSAHOST_NOT_FOUND:
+ return "WSAHOST_NOT_FOUND";
+ case WSATRY_AGAIN:
+ return "WSATRY_AGAIN";
+ case WSANO_RECOVERY:
+ return "WSANO_RECOVERY";
+ case WSANO_DATA:
+ return "WSANO_DATA";
+ default:
+ return "UNKNOWN ERROR";
}
}
diff --git a/NorthstarDedicatedTest/socketcreator.cpp b/NorthstarDedicatedTest/socketcreator.cpp
index 4ff24076..0fb51821 100644
--- a/NorthstarDedicatedTest/socketcreator.cpp
+++ b/NorthstarDedicatedTest/socketcreator.cpp
@@ -14,18 +14,12 @@
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
-CSocketCreator::CSocketCreator(void)
-{
- m_hListenSocket = -1;
-}
+CSocketCreator::CSocketCreator(void) { m_hListenSocket = -1; }
//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
-CSocketCreator::~CSocketCreator(void)
-{
- DisconnectSocket();
-}
+CSocketCreator::~CSocketCreator(void) { DisconnectSocket(); }
//-----------------------------------------------------------------------------
// Purpose: accept new connections and walk open sockets and handle any incoming data
@@ -74,8 +68,8 @@ bool CSocketCreator::ConfigureListenSocket(int iSocket)
{
// Disable NAGLE as RCON cmds are small in size.
int nodelay = 1;
- int v6only = 0;
- u_long opt = 1;
+ int v6only = 0;
+ u_long opt = 1;
::setsockopt(iSocket, IPPROTO_TCP, TCP_NODELAY, (char*)&nodelay, sizeof(nodelay));
::setsockopt(iSocket, SOL_SOCKET, SO_REUSEADDR, (char*)&nodelay, sizeof(nodelay));
@@ -115,8 +109,8 @@ bool CSocketCreator::ConfigureConnectSocket(SocketHandle_t hSocket)
//-----------------------------------------------------------------------------
// Purpose: bind to a TCP port and accept incoming connections
-// Input : *netAdr2 -
-// bListenOnAllInterfaces -
+// Input : *netAdr2 -
+// bListenOnAllInterfaces -
// Output : true on success, failed otherwise
//-----------------------------------------------------------------------------
bool CSocketCreator::CreateListenSocket(const CNetAdr2& netAdr2, bool bListenOnAllInterfaces = false)
@@ -169,8 +163,8 @@ void CSocketCreator::CloseListenSocket(void)
//-----------------------------------------------------------------------------
// Purpose: connect to the remote server
-// Input : *netAdr2 -
-// bSingleSocker -
+// Input : *netAdr2 -
+// bSingleSocker -
// Output : accepted socket index, SOCKET_ERROR (-1) if failed
//-----------------------------------------------------------------------------
int CSocketCreator::ConnectSocket(const CNetAdr2& netAdr2, bool bSingleSocket)
@@ -192,7 +186,9 @@ int CSocketCreator::ConnectSocket(const CNetAdr2& netAdr2, bool bSingleSocket)
return SOCKET_ERROR;
}
- struct sockaddr_storage s{};
+ struct sockaddr_storage s
+ {
+ };
netAdr2.ToSockadr(&s);
int results = ::connect(hSocket, reinterpret_cast<sockaddr*>(&s), netAdr2.GetSize());
@@ -209,7 +205,7 @@ int CSocketCreator::ConnectSocket(const CNetAdr2& netAdr2, bool bSingleSocket)
timeval tv{};
tv.tv_usec = 0;
- tv.tv_sec = 1;
+ tv.tv_sec = 1;
FD_ZERO(&writefds);
FD_SET(static_cast<u_int>(hSocket), &writefds);
@@ -238,8 +234,8 @@ void CSocketCreator::DisconnectSocket(void)
//-----------------------------------------------------------------------------
// Purpose: handles new TCP requests and puts them in accepted queue
-// Input : hSocket -
-// *netAdr2 -
+// Input : hSocket -
+// *netAdr2 -
// Output : accepted socket index, -1 if failed
//-----------------------------------------------------------------------------
int CSocketCreator::OnSocketAccepted(SocketHandle_t hSocket, CNetAdr2 netAdr2)
@@ -248,7 +244,7 @@ int CSocketCreator::OnSocketAccepted(SocketHandle_t hSocket, CNetAdr2 netAdr2)
pNewEntry.m_hSocket = hSocket;
pNewEntry.m_Address = netAdr2;
- pNewEntry.m_pData = new CConnectedNetConsoleData(hSocket);
+ pNewEntry.m_pData = new CConnectedNetConsoleData(hSocket);
m_hAcceptedSockets.push_back(pNewEntry);
@@ -258,7 +254,7 @@ int CSocketCreator::OnSocketAccepted(SocketHandle_t hSocket, CNetAdr2 netAdr2)
//-----------------------------------------------------------------------------
// Purpose: close an accepted socket
-// Input : nIndex -
+// Input : nIndex -
//-----------------------------------------------------------------------------
void CSocketCreator::CloseAcceptedSocket(int nIndex)
{
@@ -289,47 +285,29 @@ void CSocketCreator::CloseAllAcceptedSockets(void)
//-----------------------------------------------------------------------------
// Purpose: returns true if the listening socket is created and listening
//-----------------------------------------------------------------------------
-bool CSocketCreator::IsListening(void) const
-{
- return m_hListenSocket != -1;
-}
+bool CSocketCreator::IsListening(void) const { return m_hListenSocket != -1; }
//-----------------------------------------------------------------------------
// Purpose: returns true if the socket would block because of the last socket command
//-----------------------------------------------------------------------------
-bool CSocketCreator::IsSocketBlocking(void) const
-{
- return (WSAGetLastError() == WSAEWOULDBLOCK);
-}
+bool CSocketCreator::IsSocketBlocking(void) const { return (WSAGetLastError() == WSAEWOULDBLOCK); }
//-----------------------------------------------------------------------------
// Purpose: returns accepted socket count
//-----------------------------------------------------------------------------
-int CSocketCreator::GetAcceptedSocketCount(void) const
-{
- return m_hAcceptedSockets.size();
-}
+int CSocketCreator::GetAcceptedSocketCount(void) const { return m_hAcceptedSockets.size(); }
//-----------------------------------------------------------------------------
// Purpose: returns accepted socket handle
//-----------------------------------------------------------------------------
-SocketHandle_t CSocketCreator::GetAcceptedSocketHandle(int nIndex) const
-{
- return m_hAcceptedSockets[nIndex].m_hSocket;
-}
+SocketHandle_t CSocketCreator::GetAcceptedSocketHandle(int nIndex) const { return m_hAcceptedSockets[nIndex].m_hSocket; }
//-----------------------------------------------------------------------------
// Purpose: returns accepted socket address
//-----------------------------------------------------------------------------
-const CNetAdr2& CSocketCreator::GetAcceptedSocketAddress(int nIndex) const
-{
- return m_hAcceptedSockets[nIndex].m_Address;
-}
+const CNetAdr2& CSocketCreator::GetAcceptedSocketAddress(int nIndex) const { return m_hAcceptedSockets[nIndex].m_Address; }
//-----------------------------------------------------------------------------
// Purpose: returns accepted socket data
//-----------------------------------------------------------------------------
-CConnectedNetConsoleData* CSocketCreator::GetAcceptedSocketData(int nIndex) const
-{
- return m_hAcceptedSockets[nIndex].m_pData;
-}
+CConnectedNetConsoleData* CSocketCreator::GetAcceptedSocketData(int nIndex) const { return m_hAcceptedSockets[nIndex].m_pData; }
diff --git a/NorthstarDedicatedTest/socketcreator.h b/NorthstarDedicatedTest/socketcreator.h
index 9a4453af..c4517ef6 100644
--- a/NorthstarDedicatedTest/socketcreator.h
+++ b/NorthstarDedicatedTest/socketcreator.h
@@ -7,7 +7,7 @@
//-----------------------------------------------------------------------------
class CSocketCreator
{
-public:
+ public:
CSocketCreator(void);
~CSocketCreator(void);
@@ -36,21 +36,21 @@ public:
const CNetAdr2& GetAcceptedSocketAddress(int nIndex) const;
CConnectedNetConsoleData* GetAcceptedSocketData(int nIndex) const;
-public:
+ public:
struct AcceptedSocket_t
{
- SocketHandle_t m_hSocket{};
- CNetAdr2 m_Address{};
+ SocketHandle_t m_hSocket{};
+ CNetAdr2 m_Address{};
CConnectedNetConsoleData* m_pData = nullptr;
bool operator==(const AcceptedSocket_t& rhs) const { return (m_Address.CompareAdr(rhs.m_Address, false) == 0); }
};
std::vector<AcceptedSocket_t> m_hAcceptedSockets{};
- SocketHandle_t m_hListenSocket {}; // Used to accept connections.
- CNetAdr2 m_ListenAddress {}; // Address used to listen on.
+ SocketHandle_t m_hListenSocket{}; // Used to accept connections.
+ CNetAdr2 m_ListenAddress{}; // Address used to listen on.
-private:
+ private:
enum
{
SOCKET_TCP_MAX_ACCEPTS = 2
diff --git a/NorthstarDedicatedTest/sv_rcon.pb.cc b/NorthstarDedicatedTest/sv_rcon.pb.cc
index 83fcec05..f352ef59 100644
--- a/NorthstarDedicatedTest/sv_rcon.pb.cc
+++ b/NorthstarDedicatedTest/sv_rcon.pb.cc
@@ -13,445 +13,446 @@
#include <protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
-namespace sv_rcon {
-constexpr response::response(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : responsebuf_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , responseval_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , responseid_(0)
- , responsetype_(0)
-{}
-struct responseDefaultTypeInternal {
- constexpr responseDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~responseDefaultTypeInternal() {}
- union {
- response _instance;
- };
+namespace sv_rcon
+{
+constexpr response::response(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
+ : responsebuf_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string),
+ responseval_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string), responseid_(0), responsetype_(0)
+{
+}
+struct responseDefaultTypeInternal
+{
+ constexpr responseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
+ ~responseDefaultTypeInternal() {}
+ union
+ {
+ response _instance;
+ };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT responseDefaultTypeInternal _response_default_instance_;
-} // namespace sv_rcon
-namespace sv_rcon {
-bool response_t_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- return true;
- default:
- return false;
- }
+} // namespace sv_rcon
+namespace sv_rcon
+{
+bool response_t_IsValid(int value)
+{
+ switch (value)
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ return true;
+ default:
+ return false;
+ }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> response_t_strings[6] = {};
-static const char response_t_names[] =
- "SERVERDATA_RESPONSE_AUTH"
- "SERVERDATA_RESPONSE_CONSOLE_LOG"
- "SERVERDATA_RESPONSE_REMOTEBUG"
- "SERVERDATA_RESPONSE_STRING"
- "SERVERDATA_RESPONSE_UPDATE"
- "SERVERDATA_RESPONSE_VALUE";
+static const char response_t_names[] = "SERVERDATA_RESPONSE_AUTH"
+ "SERVERDATA_RESPONSE_CONSOLE_LOG"
+ "SERVERDATA_RESPONSE_REMOTEBUG"
+ "SERVERDATA_RESPONSE_STRING"
+ "SERVERDATA_RESPONSE_UPDATE"
+ "SERVERDATA_RESPONSE_VALUE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry response_t_entries[] = {
- { {response_t_names + 0, 24}, 2 },
- { {response_t_names + 24, 31}, 3 },
- { {response_t_names + 55, 29}, 5 },
- { {response_t_names + 84, 26}, 4 },
- { {response_t_names + 110, 26}, 1 },
- { {response_t_names + 136, 25}, 0 },
+ {{response_t_names + 0, 24}, 2}, {{response_t_names + 24, 31}, 3}, {{response_t_names + 55, 29}, 5},
+ {{response_t_names + 84, 26}, 4}, {{response_t_names + 110, 26}, 1}, {{response_t_names + 136, 25}, 0},
};
static const int response_t_entries_by_number[] = {
- 5, // 0 -> SERVERDATA_RESPONSE_VALUE
- 4, // 1 -> SERVERDATA_RESPONSE_UPDATE
- 0, // 2 -> SERVERDATA_RESPONSE_AUTH
- 1, // 3 -> SERVERDATA_RESPONSE_CONSOLE_LOG
- 3, // 4 -> SERVERDATA_RESPONSE_STRING
- 2, // 5 -> SERVERDATA_RESPONSE_REMOTEBUG
+ 5, // 0 -> SERVERDATA_RESPONSE_VALUE
+ 4, // 1 -> SERVERDATA_RESPONSE_UPDATE
+ 0, // 2 -> SERVERDATA_RESPONSE_AUTH
+ 1, // 3 -> SERVERDATA_RESPONSE_CONSOLE_LOG
+ 3, // 4 -> SERVERDATA_RESPONSE_STRING
+ 2, // 5 -> SERVERDATA_RESPONSE_REMOTEBUG
};
-const std::string& response_t_Name(
- response_t value) {
- static const bool dummy =
- ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
- response_t_entries,
- response_t_entries_by_number,
- 6, response_t_strings);
- (void) dummy;
- int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
- response_t_entries,
- response_t_entries_by_number,
- 6, value);
- return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
- response_t_strings[idx].get();
+const std::string& response_t_Name(response_t value)
+{
+ static const bool dummy =
+ ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(response_t_entries, response_t_entries_by_number, 6, response_t_strings);
+ (void)dummy;
+ int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(response_t_entries, response_t_entries_by_number, 6, value);
+ return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : response_t_strings[idx].get();
}
-bool response_t_Parse(
- ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, response_t* value) {
- int int_value;
- bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
- response_t_entries, 6, name, &int_value);
- if (success) {
- *value = static_cast<response_t>(int_value);
- }
- return success;
+bool response_t_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, response_t* value)
+{
+ int int_value;
+ bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(response_t_entries, 6, name, &int_value);
+ if (success)
+ {
+ *value = static_cast<response_t>(int_value);
+ }
+ return success;
}
// ===================================================================
-class response::_Internal {
- public:
- using HasBits = decltype(std::declval<response>()._has_bits_);
- static void set_has_responseid(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_responsetype(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static void set_has_responsebuf(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_responseval(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
+class response::_Internal
+{
+ public:
+ using HasBits = decltype(std::declval<response>()._has_bits_);
+ static void set_has_responseid(HasBits* has_bits) { (*has_bits)[0] |= 4u; }
+ static void set_has_responsetype(HasBits* has_bits) { (*has_bits)[0] |= 8u; }
+ static void set_has_responsebuf(HasBits* has_bits) { (*has_bits)[0] |= 1u; }
+ static void set_has_responseval(HasBits* has_bits) { (*has_bits)[0] |= 2u; }
};
-response::response(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:sv_rcon.response)
+response::response(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned)
+ : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned)
+{
+ SharedCtor();
+ if (!is_message_owned)
+ {
+ RegisterArenaDtor(arena);
+ }
+ // @@protoc_insertion_point(arena_constructor:sv_rcon.response)
}
-response::response(const response& from)
- : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
- responsebuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_responsebuf()) {
- responsebuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_responsebuf(),
- GetArenaForAllocation());
- }
- responseval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_responseval()) {
- responseval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_responseval(),
- GetArenaForAllocation());
- }
- ::memcpy(&responseid_, &from.responseid_,
- static_cast<size_t>(reinterpret_cast<char*>(&responsetype_) -
- reinterpret_cast<char*>(&responseid_)) + sizeof(responsetype_));
- // @@protoc_insertion_point(copy_constructor:sv_rcon.response)
+response::response(const response& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_)
+{
+ _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
+ responsebuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (from._internal_has_responsebuf())
+ {
+ responsebuf_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_responsebuf(), GetArenaForAllocation());
+ }
+ responseval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (from._internal_has_responseval())
+ {
+ responseval_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_responseval(), GetArenaForAllocation());
+ }
+ ::memcpy(
+ &responseid_, &from.responseid_,
+ static_cast<size_t>(reinterpret_cast<char*>(&responsetype_) - reinterpret_cast<char*>(&responseid_)) + sizeof(responsetype_));
+ // @@protoc_insertion_point(copy_constructor:sv_rcon.response)
}
-inline void response::SharedCtor() {
-responsebuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+inline void response::SharedCtor()
+{
+ responsebuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-responseval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ responseval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&responseid_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&responsetype_) -
- reinterpret_cast<char*>(&responseid_)) + sizeof(responsetype_));
+ ::memset(
+ reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&responseid_) - reinterpret_cast<char*>(this)), 0,
+ static_cast<size_t>(reinterpret_cast<char*>(&responsetype_) - reinterpret_cast<char*>(&responseid_)) + sizeof(responsetype_));
}
-response::~response() {
- // @@protoc_insertion_point(destructor:sv_rcon.response)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<std::string>();
+response::~response()
+{
+ // @@protoc_insertion_point(destructor:sv_rcon.response)
+ if (GetArenaForAllocation() != nullptr)
+ return;
+ SharedDtor();
+ _internal_metadata_.Delete<std::string>();
}
-inline void response::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- responsebuf_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- responseval_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+inline void response::SharedDtor()
+{
+ GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ responsebuf_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ responseval_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
-void response::ArenaDtor(void* object) {
- response* _this = reinterpret_cast< response* >(object);
- (void)_this;
-}
-void response::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
+void response::ArenaDtor(void* object)
+{
+ response* _this = reinterpret_cast<response*>(object);
+ (void)_this;
}
-void response::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+void response::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {}
+void response::SetCachedSize(int size) const { _cached_size_.Set(size); }
+
+void response::Clear()
+{
+ // @@protoc_insertion_point(message_clear_start:sv_rcon.response)
+ uint32_t cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void)cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
+ if (cached_has_bits & 0x00000003u)
+ {
+ if (cached_has_bits & 0x00000001u)
+ {
+ responsebuf_.ClearNonDefaultToEmpty();
+ }
+ if (cached_has_bits & 0x00000002u)
+ {
+ responseval_.ClearNonDefaultToEmpty();
+ }
+ }
+ if (cached_has_bits & 0x0000000cu)
+ {
+ ::memset(
+ &responseid_, 0,
+ static_cast<size_t>(reinterpret_cast<char*>(&responsetype_) - reinterpret_cast<char*>(&responseid_)) + sizeof(responsetype_));
+ }
+ _has_bits_.Clear();
+ _internal_metadata_.Clear<std::string>();
}
-void response::Clear() {
-// @@protoc_insertion_point(message_clear_start:sv_rcon.response)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- responsebuf_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- responseval_.ClearNonDefaultToEmpty();
- }
- }
- if (cached_has_bits & 0x0000000cu) {
- ::memset(&responseid_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&responsetype_) -
- reinterpret_cast<char*>(&responseid_)) + sizeof(responsetype_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<std::string>();
-}
-
-const char* response::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
-#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional int32 responseID = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- _Internal::set_has_responseid(&has_bits);
- responseid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .sv_rcon.response_t responseType = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- _internal_set_responsetype(static_cast<::sv_rcon::response_t>(val));
- } else
- goto handle_unusual;
- continue;
- // optional string responseBuf = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
- auto str = _internal_mutable_responsebuf();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string responseVal = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
- auto str = _internal_mutable_responseval();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
- 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<std::string>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
+const char* response::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
+{
+#define CHK_(x) \
+ if (PROTOBUF_PREDICT_FALSE(!(x))) \
+ goto failure
+ _Internal::HasBits has_bits{};
+ while (!ctx->Done(&ptr))
+ {
+ uint32_t tag;
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
+ switch (tag >> 3)
+ {
+ // optional int32 responseID = 1;
+ case 1:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
+ {
+ _Internal::set_has_responseid(&has_bits);
+ responseid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ CHK_(ptr);
+ }
+ else
+ goto handle_unusual;
+ continue;
+ // optional .sv_rcon.response_t responseType = 2;
+ case 2:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
+ {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ CHK_(ptr);
+ _internal_set_responsetype(static_cast<::sv_rcon::response_t>(val));
+ }
+ else
+ goto handle_unusual;
+ continue;
+ // optional string responseBuf = 3;
+ case 3:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26))
+ {
+ auto str = _internal_mutable_responsebuf();
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+ CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
+ CHK_(ptr);
+ }
+ else
+ goto handle_unusual;
+ continue;
+ // optional string responseVal = 4;
+ case 4:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34))
+ {
+ auto str = _internal_mutable_responseval();
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+ CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
+ 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<std::string>(), ptr, ctx);
+ CHK_(ptr != nullptr);
+ } // while
message_done:
- _has_bits_.Or(has_bits);
- return ptr;
+ _has_bits_.Or(has_bits);
+ return ptr;
failure:
- ptr = nullptr;
- goto message_done;
+ ptr = nullptr;
+ goto message_done;
#undef CHK_
}
-uint8_t* response::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:sv_rcon.response)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
-
- // optional int32 responseID = 1;
- if (_internal_has_responseid()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_responseid(), target);
- }
-
- // optional .sv_rcon.response_t responseType = 2;
- if (_internal_has_responsetype()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 2, this->_internal_responsetype(), target);
- }
-
- // optional string responseBuf = 3;
- if (_internal_has_responsebuf()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_responsebuf().data(), static_cast<int>(this->_internal_responsebuf().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "sv_rcon.response.responseBuf");
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_responsebuf(), target);
- }
-
- // optional string responseVal = 4;
- if (_internal_has_responseval()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_responseval().data(), static_cast<int>(this->_internal_responseval().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "sv_rcon.response.responseVal");
- target = stream->WriteStringMaybeAliased(
- 4, this->_internal_responseval(), target);
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
- static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:sv_rcon.response)
- return target;
-}
-
-size_t response::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:sv_rcon.response)
- 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 = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- // optional string responseBuf = 3;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_responsebuf());
- }
-
- // optional string responseVal = 4;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_responseval());
- }
-
- // optional int32 responseID = 1;
- if (cached_has_bits & 0x00000004u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_responseid());
- }
-
- // optional .sv_rcon.response_t responseType = 2;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_responsetype());
- }
-
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void response::CheckTypeAndMergeFrom(
- const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
- MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const response*>(
- &from));
+uint8_t* response::_InternalSerialize(uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const
+{
+ // @@protoc_insertion_point(serialize_to_array_start:sv_rcon.response)
+ uint32_t cached_has_bits = 0;
+ (void)cached_has_bits;
+
+ // optional int32 responseID = 1;
+ if (_internal_has_responseid())
+ {
+ target = stream->EnsureSpace(target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_responseid(), target);
+ }
+
+ // optional .sv_rcon.response_t responseType = 2;
+ if (_internal_has_responsetype())
+ {
+ target = stream->EnsureSpace(target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(2, this->_internal_responsetype(), target);
+ }
+
+ // optional string responseBuf = 3;
+ if (_internal_has_responsebuf())
+ {
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
+ this->_internal_responsebuf().data(), static_cast<int>(this->_internal_responsebuf().length()),
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "sv_rcon.response.responseBuf");
+ target = stream->WriteStringMaybeAliased(3, this->_internal_responsebuf(), target);
+ }
+
+ // optional string responseVal = 4;
+ if (_internal_has_responseval())
+ {
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
+ this->_internal_responseval().data(), static_cast<int>(this->_internal_responseval().length()),
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "sv_rcon.response.responseVal");
+ target = stream->WriteStringMaybeAliased(4, this->_internal_responseval(), target);
+ }
+
+ if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
+ {
+ target = stream->WriteRaw(
+ _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
+ static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()),
+ target);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:sv_rcon.response)
+ return target;
}
-void response::MergeFrom(const response& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:sv_rcon.response)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_responsebuf(from._internal_responsebuf());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_responseval(from._internal_responseval());
- }
- if (cached_has_bits & 0x00000004u) {
- responseid_ = from.responseid_;
- }
- if (cached_has_bits & 0x00000008u) {
- responsetype_ = from.responsetype_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
+size_t response::ByteSizeLong() const
+{
+ // @@protoc_insertion_point(message_byte_size_start:sv_rcon.response)
+ 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 = _has_bits_[0];
+ if (cached_has_bits & 0x0000000fu)
+ {
+ // optional string responseBuf = 3;
+ if (cached_has_bits & 0x00000001u)
+ {
+ total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(this->_internal_responsebuf());
+ }
+
+ // optional string responseVal = 4;
+ if (cached_has_bits & 0x00000002u)
+ {
+ total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(this->_internal_responseval());
+ }
+
+ // optional int32 responseID = 1;
+ if (cached_has_bits & 0x00000004u)
+ {
+ total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_responseid());
+ }
+
+ // optional .sv_rcon.response_t responseType = 2;
+ if (cached_has_bits & 0x00000008u)
+ {
+ total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_responsetype());
+ }
+ }
+ if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
+ {
+ total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
+ }
+ int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
+ SetCachedSize(cached_size);
+ return total_size;
}
-void response::CopyFrom(const response& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:sv_rcon.response)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
+void response::CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from)
+{
+ MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const response*>(&from));
}
-bool response::IsInitialized() const {
- return true;
+void response::MergeFrom(const response& from)
+{
+ // @@protoc_insertion_point(class_specific_merge_from_start:sv_rcon.response)
+ GOOGLE_DCHECK_NE(&from, this);
+ uint32_t cached_has_bits = 0;
+ (void)cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
+ if (cached_has_bits & 0x0000000fu)
+ {
+ if (cached_has_bits & 0x00000001u)
+ {
+ _internal_set_responsebuf(from._internal_responsebuf());
+ }
+ if (cached_has_bits & 0x00000002u)
+ {
+ _internal_set_responseval(from._internal_responseval());
+ }
+ if (cached_has_bits & 0x00000004u)
+ {
+ responseid_ = from.responseid_;
+ }
+ if (cached_has_bits & 0x00000008u)
+ {
+ responsetype_ = from.responsetype_;
+ }
+ _has_bits_[0] |= cached_has_bits;
+ }
+ _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
-void response::InternalSwap(response* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &responsebuf_, lhs_arena,
- &other->responsebuf_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &responseval_, lhs_arena,
- &other->responseval_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(response, responsetype_)
- + sizeof(response::responsetype_)
- - PROTOBUF_FIELD_OFFSET(response, responseid_)>(
- reinterpret_cast<char*>(&responseid_),
- reinterpret_cast<char*>(&other->responseid_));
+void response::CopyFrom(const response& from)
+{
+ // @@protoc_insertion_point(class_specific_copy_from_start:sv_rcon.response)
+ if (&from == this)
+ return;
+ Clear();
+ MergeFrom(from);
}
-std::string response::GetTypeName() const {
- return "sv_rcon.response";
+bool response::IsInitialized() const { return true; }
+
+void response::InternalSwap(response* other)
+{
+ using std::swap;
+ auto* lhs_arena = GetArenaForAllocation();
+ auto* rhs_arena = other->GetArenaForAllocation();
+ _internal_metadata_.InternalSwap(&other->_internal_metadata_);
+ swap(_has_bits_[0], other->_has_bits_[0]);
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
+ &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &responsebuf_, lhs_arena, &other->responsebuf_, rhs_arena);
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
+ &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &responseval_, lhs_arena, &other->responseval_, rhs_arena);
+ ::PROTOBUF_NAMESPACE_ID::internal::memswap<
+ PROTOBUF_FIELD_OFFSET(response, responsetype_) + sizeof(response::responsetype_) - PROTOBUF_FIELD_OFFSET(response, responseid_)>(
+ reinterpret_cast<char*>(&responseid_), reinterpret_cast<char*>(&other->responseid_));
}
+std::string response::GetTypeName() const { return "sv_rcon.response"; }
// @@protoc_insertion_point(namespace_scope)
-} // namespace sv_rcon
+} // namespace sv_rcon
PROTOBUF_NAMESPACE_OPEN
-template<> PROTOBUF_NOINLINE ::sv_rcon::response* Arena::CreateMaybeMessage< ::sv_rcon::response >(Arena* arena) {
- return Arena::CreateMessageInternal< ::sv_rcon::response >(arena);
+template <> PROTOBUF_NOINLINE ::sv_rcon::response* Arena::CreateMaybeMessage<::sv_rcon::response>(Arena* arena)
+{
+ return Arena::CreateMessageInternal<::sv_rcon::response>(arena);
}
PROTOBUF_NAMESPACE_CLOSE
diff --git a/NorthstarDedicatedTest/sv_rcon.pb.h b/NorthstarDedicatedTest/sv_rcon.pb.h
index 34dec05d..152c0cf0 100644
--- a/NorthstarDedicatedTest/sv_rcon.pb.h
+++ b/NorthstarDedicatedTest/sv_rcon.pb.h
@@ -27,49 +27,51 @@
#include <protobuf/generated_message_util.h>
#include <protobuf/metadata_lite.h>
#include <protobuf/message_lite.h>
-#include <protobuf/repeated_field.h> // IWYU pragma: export
-#include <protobuf/extension_set.h> // IWYU pragma: export
+#include <protobuf/repeated_field.h> // IWYU pragma: export
+#include <protobuf/extension_set.h> // IWYU pragma: export
#include <protobuf/generated_enum_util.h>
// @@protoc_insertion_point(includes)
#include <protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_sv_5frcon_2eproto
PROTOBUF_NAMESPACE_OPEN
-namespace internal {
+namespace internal
+{
class AnyMetadata;
-} // namespace internal
+} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
-struct TableStruct_sv_5frcon_2eproto {
- static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
- static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const uint32_t offsets[];
+struct TableStruct_sv_5frcon_2eproto
+{
+ static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold);
+ static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold);
+ static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold);
+ static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
+ static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
+ static const uint32_t offsets[];
};
-namespace sv_rcon {
+namespace sv_rcon
+{
class response;
struct responseDefaultTypeInternal;
extern responseDefaultTypeInternal _response_default_instance_;
-} // namespace sv_rcon
+} // namespace sv_rcon
PROTOBUF_NAMESPACE_OPEN
-template<> ::sv_rcon::response* Arena::CreateMaybeMessage<::sv_rcon::response>(Arena*);
+template <>::sv_rcon::response* Arena::CreateMaybeMessage<::sv_rcon::response>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
-namespace sv_rcon {
-
-enum response_t : int {
- SERVERDATA_RESPONSE_VALUE = 0,
- SERVERDATA_RESPONSE_UPDATE = 1,
- SERVERDATA_RESPONSE_AUTH = 2,
- SERVERDATA_RESPONSE_CONSOLE_LOG = 3,
- SERVERDATA_RESPONSE_STRING = 4,
- SERVERDATA_RESPONSE_REMOTEBUG = 5,
- response_t_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
- response_t_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
+namespace sv_rcon
+{
+
+enum response_t : int
+{
+ SERVERDATA_RESPONSE_VALUE = 0,
+ SERVERDATA_RESPONSE_UPDATE = 1,
+ SERVERDATA_RESPONSE_AUTH = 2,
+ SERVERDATA_RESPONSE_CONSOLE_LOG = 3,
+ SERVERDATA_RESPONSE_STRING = 4,
+ SERVERDATA_RESPONSE_REMOTEBUG = 5,
+ response_t_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
+ response_t_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
bool response_t_IsValid(int value);
constexpr response_t response_t_MIN = SERVERDATA_RESPONSE_VALUE;
@@ -77,425 +79,453 @@ constexpr response_t response_t_MAX = SERVERDATA_RESPONSE_REMOTEBUG;
constexpr int response_t_ARRAYSIZE = response_t_MAX + 1;
const std::string& response_t_Name(response_t value);
-template<typename T>
-inline const std::string& response_t_Name(T enum_t_value) {
- static_assert(::std::is_same<T, response_t>::value ||
- ::std::is_integral<T>::value,
- "Incorrect type passed to function response_t_Name.");
- return response_t_Name(static_cast<response_t>(enum_t_value));
+template <typename T> inline const std::string& response_t_Name(T enum_t_value)
+{
+ static_assert(
+ ::std::is_same<T, response_t>::value || ::std::is_integral<T>::value, "Incorrect type passed to function response_t_Name.");
+ return response_t_Name(static_cast<response_t>(enum_t_value));
}
-bool response_t_Parse(
- ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, response_t* value);
+bool response_t_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, response_t* value);
// ===================================================================
-class response final :
- public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:sv_rcon.response) */ {
- public:
- inline response() : response(nullptr) {}
- ~response() override;
- explicit constexpr response(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
-
- response(const response& from);
- response(response&& from) noexcept
- : response() {
- *this = ::std::move(from);
- }
-
- inline response& operator=(const response& from) {
- CopyFrom(from);
- return *this;
- }
- inline response& operator=(response&& from) noexcept {
- if (this == &from) return *this;
- if (GetOwningArena() == from.GetOwningArena()
- #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
- && GetOwningArena() != nullptr
- #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
- ) {
- InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
-
- static const response& default_instance() {
- return *internal_default_instance();
- }
- static inline const response* internal_default_instance() {
- return reinterpret_cast<const response*>(
- &_response_default_instance_);
- }
- static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(response& a, response& b) {
- a.Swap(&b);
- }
- inline void Swap(response* other) {
- if (other == this) return;
- #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetOwningArena() != nullptr &&
- GetOwningArena() == other->GetOwningArena()) {
- #else // PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetOwningArena() == other->GetOwningArena()) {
- #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
- InternalSwap(other);
- } else {
- ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
- }
- }
- void UnsafeArenaSwap(response* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
- InternalSwap(other);
- }
-
- // implements Message ----------------------------------------------
-
- response* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
- return CreateMaybeMessage<response>(arena);
- }
- void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
- void CopyFrom(const response& from);
- void MergeFrom(const response& from);
- PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
- bool IsInitialized() const final;
-
- size_t ByteSizeLong() const final;
- const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- uint8_t* _InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+class response final : public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:sv_rcon.response) */
+{
+ public:
+ inline response() : response(nullptr) {}
+ ~response() override;
+ explicit constexpr response(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
+
+ response(const response& from);
+ response(response&& from) noexcept : response() { *this = ::std::move(from); }
+
+ inline response& operator=(const response& from)
+ {
+ CopyFrom(from);
+ return *this;
+ }
+ inline response& operator=(response&& from) noexcept
+ {
+ if (this == &from)
+ return *this;
+ if (GetOwningArena() == from.GetOwningArena()
+#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
+ && GetOwningArena() != nullptr
+#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
+ )
+ {
+ InternalSwap(&from);
+ }
+ else
+ {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+
+ static const response& default_instance() { return *internal_default_instance(); }
+ static inline const response* internal_default_instance() { return reinterpret_cast<const response*>(&_response_default_instance_); }
+ static constexpr int kIndexInFileMessages = 0;
+
+ friend void swap(response& a, response& b) { a.Swap(&b); }
+ inline void Swap(response* other)
+ {
+ if (other == this)
+ return;
+#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
+ if (GetOwningArena() != nullptr && GetOwningArena() == other->GetOwningArena())
+ {
+#else // PROTOBUF_FORCE_COPY_IN_SWAP
+ if (GetOwningArena() == other->GetOwningArena())
+ {
+#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
+ InternalSwap(other);
+ }
+ else
+ {
+ ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
+ }
+ }
+ void UnsafeArenaSwap(response* other)
+ {
+ if (other == this)
+ return;
+ GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
+ InternalSwap(other);
+ }
+
+ // implements Message ----------------------------------------------
+
+ response* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage<response>(arena); }
+ void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
+ void CopyFrom(const response& from);
+ void MergeFrom(const response& from);
+ PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
+ bool IsInitialized() const final;
+
+ size_t ByteSizeLong() const final;
+ const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
+ uint8_t* _InternalSerialize(uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ int GetCachedSize() const final { return _cached_size_.Get(); }
private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(response* other);
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(response* other);
private:
- friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
- static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
- return "sv_rcon.response";
- }
+ friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
+ static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sv_rcon.response"; }
+
protected:
- explicit response(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned = false);
+ explicit response(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false);
+
private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
+
public:
+ std::string GetTypeName() const final;
- std::string GetTypeName() const final;
+ // nested types ----------------------------------------------------
- // nested types ----------------------------------------------------
+ // accessors -------------------------------------------------------
- // accessors -------------------------------------------------------
+ enum : int
+ {
+ kResponseBufFieldNumber = 3,
+ kResponseValFieldNumber = 4,
+ kResponseIDFieldNumber = 1,
+ kResponseTypeFieldNumber = 2,
+ };
+ // optional string responseBuf = 3;
+ bool has_responsebuf() const;
- enum : int {
- kResponseBufFieldNumber = 3,
- kResponseValFieldNumber = 4,
- kResponseIDFieldNumber = 1,
- kResponseTypeFieldNumber = 2,
- };
- // optional string responseBuf = 3;
- bool has_responsebuf() const;
private:
- bool _internal_has_responsebuf() const;
+ bool _internal_has_responsebuf() const;
+
public:
- void clear_responsebuf();
- const std::string& responsebuf() const;
- template <typename ArgT0 = const std::string&, typename... ArgT>
- void set_responsebuf(ArgT0&& arg0, ArgT... args);
- std::string* mutable_responsebuf();
- PROTOBUF_NODISCARD std::string* release_responsebuf();
- void set_allocated_responsebuf(std::string* responsebuf);
+ void clear_responsebuf();
+ const std::string& responsebuf() const;
+ template <typename ArgT0 = const std::string&, typename... ArgT> void set_responsebuf(ArgT0&& arg0, ArgT... args);
+ std::string* mutable_responsebuf();
+ PROTOBUF_NODISCARD std::string* release_responsebuf();
+ void set_allocated_responsebuf(std::string* responsebuf);
+
private:
- const std::string& _internal_responsebuf() const;
- inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsebuf(const std::string& value);
- std::string* _internal_mutable_responsebuf();
+ const std::string& _internal_responsebuf() const;
+ inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsebuf(const std::string& value);
+ std::string* _internal_mutable_responsebuf();
+
public:
+ // optional string responseVal = 4;
+ bool has_responseval() const;
- // optional string responseVal = 4;
- bool has_responseval() const;
private:
- bool _internal_has_responseval() const;
+ bool _internal_has_responseval() const;
+
public:
- void clear_responseval();
- const std::string& responseval() const;
- template <typename ArgT0 = const std::string&, typename... ArgT>
- void set_responseval(ArgT0&& arg0, ArgT... args);
- std::string* mutable_responseval();
- PROTOBUF_NODISCARD std::string* release_responseval();
- void set_allocated_responseval(std::string* responseval);
+ void clear_responseval();
+ const std::string& responseval() const;
+ template <typename ArgT0 = const std::string&, typename... ArgT> void set_responseval(ArgT0&& arg0, ArgT... args);
+ std::string* mutable_responseval();
+ PROTOBUF_NODISCARD std::string* release_responseval();
+ void set_allocated_responseval(std::string* responseval);
+
private:
- const std::string& _internal_responseval() const;
- inline PROTOBUF_ALWAYS_INLINE void _internal_set_responseval(const std::string& value);
- std::string* _internal_mutable_responseval();
+ const std::string& _internal_responseval() const;
+ inline PROTOBUF_ALWAYS_INLINE void _internal_set_responseval(const std::string& value);
+ std::string* _internal_mutable_responseval();
+
public:
+ // optional int32 responseID = 1;
+ bool has_responseid() const;
- // optional int32 responseID = 1;
- bool has_responseid() const;
private:
- bool _internal_has_responseid() const;
+ bool _internal_has_responseid() const;
+
public:
- void clear_responseid();
- int32_t responseid() const;
- void set_responseid(int32_t value);
+ void clear_responseid();
+ int32_t responseid() const;
+ void set_responseid(int32_t value);
+
private:
- int32_t _internal_responseid() const;
- void _internal_set_responseid(int32_t value);
+ int32_t _internal_responseid() const;
+ void _internal_set_responseid(int32_t value);
+
public:
+ // optional .sv_rcon.response_t responseType = 2;
+ bool has_responsetype() const;
- // optional .sv_rcon.response_t responseType = 2;
- bool has_responsetype() const;
private:
- bool _internal_has_responsetype() const;
+ bool _internal_has_responsetype() const;
+
public:
- void clear_responsetype();
- ::sv_rcon::response_t responsetype() const;
- void set_responsetype(::sv_rcon::response_t value);
+ void clear_responsetype();
+ ::sv_rcon::response_t responsetype() const;
+ void set_responsetype(::sv_rcon::response_t value);
+
private:
- ::sv_rcon::response_t _internal_responsetype() const;
- void _internal_set_responsetype(::sv_rcon::response_t value);
- public:
+ ::sv_rcon::response_t _internal_responsetype() const;
+ void _internal_set_responsetype(::sv_rcon::response_t value);
- // @@protoc_insertion_point(class_scope:sv_rcon.response)
- private:
- class _Internal;
-
- template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsebuf_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responseval_;
- int32_t responseid_;
- int responsetype_;
- friend struct ::TableStruct_sv_5frcon_2eproto;
+ public:
+ // @@protoc_insertion_point(class_scope:sv_rcon.response)
+ private:
+ class _Internal;
+
+ template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsebuf_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responseval_;
+ int32_t responseid_;
+ int responsetype_;
+ friend struct ::TableStruct_sv_5frcon_2eproto;
};
// ===================================================================
-
// ===================================================================
#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// response
// optional int32 responseID = 1;
-inline bool response::_internal_has_responseid() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
- return value;
-}
-inline bool response::has_responseid() const {
- return _internal_has_responseid();
-}
-inline void response::clear_responseid() {
- responseid_ = 0;
- _has_bits_[0] &= ~0x00000004u;
-}
-inline int32_t response::_internal_responseid() const {
- return responseid_;
-}
-inline int32_t response::responseid() const {
- // @@protoc_insertion_point(field_get:sv_rcon.response.responseID)
- return _internal_responseid();
-}
-inline void response::_internal_set_responseid(int32_t value) {
- _has_bits_[0] |= 0x00000004u;
- responseid_ = value;
-}
-inline void response::set_responseid(int32_t value) {
- _internal_set_responseid(value);
- // @@protoc_insertion_point(field_set:sv_rcon.response.responseID)
+inline bool response::_internal_has_responseid() const
+{
+ bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ return value;
+}
+inline bool response::has_responseid() const { return _internal_has_responseid(); }
+inline void response::clear_responseid()
+{
+ responseid_ = 0;
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline int32_t response::_internal_responseid() const { return responseid_; }
+inline int32_t response::responseid() const
+{
+ // @@protoc_insertion_point(field_get:sv_rcon.response.responseID)
+ return _internal_responseid();
+}
+inline void response::_internal_set_responseid(int32_t value)
+{
+ _has_bits_[0] |= 0x00000004u;
+ responseid_ = value;
+}
+inline void response::set_responseid(int32_t value)
+{
+ _internal_set_responseid(value);
+ // @@protoc_insertion_point(field_set:sv_rcon.response.responseID)
}
// optional .sv_rcon.response_t responseType = 2;
-inline bool response::_internal_has_responsetype() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
- return value;
-}
-inline bool response::has_responsetype() const {
- return _internal_has_responsetype();
-}
-inline void response::clear_responsetype() {
- responsetype_ = 0;
- _has_bits_[0] &= ~0x00000008u;
-}
-inline ::sv_rcon::response_t response::_internal_responsetype() const {
- return static_cast< ::sv_rcon::response_t >(responsetype_);
-}
-inline ::sv_rcon::response_t response::responsetype() const {
- // @@protoc_insertion_point(field_get:sv_rcon.response.responseType)
- return _internal_responsetype();
-}
-inline void response::_internal_set_responsetype(::sv_rcon::response_t value) {
- _has_bits_[0] |= 0x00000008u;
- responsetype_ = value;
-}
-inline void response::set_responsetype(::sv_rcon::response_t value) {
- _internal_set_responsetype(value);
- // @@protoc_insertion_point(field_set:sv_rcon.response.responseType)
+inline bool response::_internal_has_responsetype() const
+{
+ bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ return value;
+}
+inline bool response::has_responsetype() const { return _internal_has_responsetype(); }
+inline void response::clear_responsetype()
+{
+ responsetype_ = 0;
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline ::sv_rcon::response_t response::_internal_responsetype() const { return static_cast<::sv_rcon::response_t>(responsetype_); }
+inline ::sv_rcon::response_t response::responsetype() const
+{
+ // @@protoc_insertion_point(field_get:sv_rcon.response.responseType)
+ return _internal_responsetype();
+}
+inline void response::_internal_set_responsetype(::sv_rcon::response_t value)
+{
+ _has_bits_[0] |= 0x00000008u;
+ responsetype_ = value;
+}
+inline void response::set_responsetype(::sv_rcon::response_t value)
+{
+ _internal_set_responsetype(value);
+ // @@protoc_insertion_point(field_set:sv_rcon.response.responseType)
}
// optional string responseBuf = 3;
-inline bool response::_internal_has_responsebuf() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
- return value;
-}
-inline bool response::has_responsebuf() const {
- return _internal_has_responsebuf();
-}
-inline void response::clear_responsebuf() {
- responsebuf_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
-}
-inline const std::string& response::responsebuf() const {
- // @@protoc_insertion_point(field_get:sv_rcon.response.responseBuf)
- return _internal_responsebuf();
-}
-template <typename ArgT0, typename... ArgT>
-inline PROTOBUF_ALWAYS_INLINE
-void response::set_responsebuf(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- responsebuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
- // @@protoc_insertion_point(field_set:sv_rcon.response.responseBuf)
-}
-inline std::string* response::mutable_responsebuf() {
- std::string* _s = _internal_mutable_responsebuf();
- // @@protoc_insertion_point(field_mutable:sv_rcon.response.responseBuf)
- return _s;
-}
-inline const std::string& response::_internal_responsebuf() const {
- return responsebuf_.Get();
-}
-inline void response::_internal_set_responsebuf(const std::string& value) {
- _has_bits_[0] |= 0x00000001u;
- responsebuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
-}
-inline std::string* response::_internal_mutable_responsebuf() {
- _has_bits_[0] |= 0x00000001u;
- return responsebuf_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
-}
-inline std::string* response::release_responsebuf() {
- // @@protoc_insertion_point(field_release:sv_rcon.response.responseBuf)
- if (!_internal_has_responsebuf()) {
- return nullptr;
- }
- _has_bits_[0] &= ~0x00000001u;
- auto* p = responsebuf_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+inline bool response::_internal_has_responsebuf() const
+{
+ bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ return value;
+}
+inline bool response::has_responsebuf() const { return _internal_has_responsebuf(); }
+inline void response::clear_responsebuf()
+{
+ responsebuf_.ClearToEmpty();
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline const std::string& response::responsebuf() const
+{
+ // @@protoc_insertion_point(field_get:sv_rcon.response.responseBuf)
+ return _internal_responsebuf();
+}
+template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void response::set_responsebuf(ArgT0&& arg0, ArgT... args)
+{
+ _has_bits_[0] |= 0x00000001u;
+ responsebuf_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0&&>(arg0), args..., GetArenaForAllocation());
+ // @@protoc_insertion_point(field_set:sv_rcon.response.responseBuf)
+}
+inline std::string* response::mutable_responsebuf()
+{
+ std::string* _s = _internal_mutable_responsebuf();
+ // @@protoc_insertion_point(field_mutable:sv_rcon.response.responseBuf)
+ return _s;
+}
+inline const std::string& response::_internal_responsebuf() const { return responsebuf_.Get(); }
+inline void response::_internal_set_responsebuf(const std::string& value)
+{
+ _has_bits_[0] |= 0x00000001u;
+ responsebuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
+}
+inline std::string* response::_internal_mutable_responsebuf()
+{
+ _has_bits_[0] |= 0x00000001u;
+ return responsebuf_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
+}
+inline std::string* response::release_responsebuf()
+{
+ // @@protoc_insertion_point(field_release:sv_rcon.response.responseBuf)
+ if (!_internal_has_responsebuf())
+ {
+ return nullptr;
+ }
+ _has_bits_[0] &= ~0x00000001u;
+ auto* p = responsebuf_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (responsebuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (responsebuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- return p;
-}
-inline void response::set_allocated_responsebuf(std::string* responsebuf) {
- if (responsebuf != nullptr) {
- _has_bits_[0] |= 0x00000001u;
- } else {
- _has_bits_[0] &= ~0x00000001u;
- }
- responsebuf_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), responsebuf,
- GetArenaForAllocation());
+ return p;
+}
+inline void response::set_allocated_responsebuf(std::string* responsebuf)
+{
+ if (responsebuf != nullptr)
+ {
+ _has_bits_[0] |= 0x00000001u;
+ }
+ else
+ {
+ _has_bits_[0] &= ~0x00000001u;
+ }
+ responsebuf_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), responsebuf, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (responsebuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (responsebuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- // @@protoc_insertion_point(field_set_allocated:sv_rcon.response.responseBuf)
+ // @@protoc_insertion_point(field_set_allocated:sv_rcon.response.responseBuf)
}
// optional string responseVal = 4;
-inline bool response::_internal_has_responseval() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- return value;
-}
-inline bool response::has_responseval() const {
- return _internal_has_responseval();
-}
-inline void response::clear_responseval() {
- responseval_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
-}
-inline const std::string& response::responseval() const {
- // @@protoc_insertion_point(field_get:sv_rcon.response.responseVal)
- return _internal_responseval();
-}
-template <typename ArgT0, typename... ArgT>
-inline PROTOBUF_ALWAYS_INLINE
-void response::set_responseval(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- responseval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
- // @@protoc_insertion_point(field_set:sv_rcon.response.responseVal)
-}
-inline std::string* response::mutable_responseval() {
- std::string* _s = _internal_mutable_responseval();
- // @@protoc_insertion_point(field_mutable:sv_rcon.response.responseVal)
- return _s;
-}
-inline const std::string& response::_internal_responseval() const {
- return responseval_.Get();
-}
-inline void response::_internal_set_responseval(const std::string& value) {
- _has_bits_[0] |= 0x00000002u;
- responseval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
-}
-inline std::string* response::_internal_mutable_responseval() {
- _has_bits_[0] |= 0x00000002u;
- return responseval_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
-}
-inline std::string* response::release_responseval() {
- // @@protoc_insertion_point(field_release:sv_rcon.response.responseVal)
- if (!_internal_has_responseval()) {
- return nullptr;
- }
- _has_bits_[0] &= ~0x00000002u;
- auto* p = responseval_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+inline bool response::_internal_has_responseval() const
+{
+ bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ return value;
+}
+inline bool response::has_responseval() const { return _internal_has_responseval(); }
+inline void response::clear_responseval()
+{
+ responseval_.ClearToEmpty();
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline const std::string& response::responseval() const
+{
+ // @@protoc_insertion_point(field_get:sv_rcon.response.responseVal)
+ return _internal_responseval();
+}
+template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void response::set_responseval(ArgT0&& arg0, ArgT... args)
+{
+ _has_bits_[0] |= 0x00000002u;
+ responseval_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0&&>(arg0), args..., GetArenaForAllocation());
+ // @@protoc_insertion_point(field_set:sv_rcon.response.responseVal)
+}
+inline std::string* response::mutable_responseval()
+{
+ std::string* _s = _internal_mutable_responseval();
+ // @@protoc_insertion_point(field_mutable:sv_rcon.response.responseVal)
+ return _s;
+}
+inline const std::string& response::_internal_responseval() const { return responseval_.Get(); }
+inline void response::_internal_set_responseval(const std::string& value)
+{
+ _has_bits_[0] |= 0x00000002u;
+ responseval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
+}
+inline std::string* response::_internal_mutable_responseval()
+{
+ _has_bits_[0] |= 0x00000002u;
+ return responseval_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
+}
+inline std::string* response::release_responseval()
+{
+ // @@protoc_insertion_point(field_release:sv_rcon.response.responseVal)
+ if (!_internal_has_responseval())
+ {
+ return nullptr;
+ }
+ _has_bits_[0] &= ~0x00000002u;
+ auto* p = responseval_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (responseval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (responseval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- return p;
-}
-inline void response::set_allocated_responseval(std::string* responseval) {
- if (responseval != nullptr) {
- _has_bits_[0] |= 0x00000002u;
- } else {
- _has_bits_[0] &= ~0x00000002u;
- }
- responseval_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), responseval,
- GetArenaForAllocation());
+ return p;
+}
+inline void response::set_allocated_responseval(std::string* responseval)
+{
+ if (responseval != nullptr)
+ {
+ _has_bits_[0] |= 0x00000002u;
+ }
+ else
+ {
+ _has_bits_[0] &= ~0x00000002u;
+ }
+ responseval_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), responseval, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (responseval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
- responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- }
+ if (responseval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()))
+ {
+ responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- // @@protoc_insertion_point(field_set_allocated:sv_rcon.response.responseVal)
+ // @@protoc_insertion_point(field_set_allocated:sv_rcon.response.responseVal)
}
#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
-} // namespace sv_rcon
+} // namespace sv_rcon
PROTOBUF_NAMESPACE_OPEN
-template <> struct is_proto_enum< ::sv_rcon::response_t> : ::std::true_type {};
+template <> struct is_proto_enum<::sv_rcon::response_t> : ::std::true_type
+{
+};
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_sv_5frcon_2eproto
+#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_sv_5frcon_2eproto