\section{TPProto::Game\-Info Class Reference}
\label{classTPProto_1_1GameInfo}\index{TPProto::GameInfo@{TPProto::GameInfo}}
A \doxyref{Frame}{p.}{classTPProto_1_1Frame} for describing a game on the server.  


{\tt \#include $<$gameinfo.h$>$}

Inheritance diagram for TPProto::Game\-Info::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classTPProto_1_1GameInfo}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Game\-Info} ()\label{classTPProto_1_1GameInfo_09425f6369442e9e43ab1d6701cd9a13}

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
virtual {\bf $\sim$Game\-Info} ()\label{classTPProto_1_1GameInfo_cc6be1d83c2942ac19e68f5751b3a42e}

\begin{CompactList}\small\item\em Required virtual destructor. \item\end{CompactList}\item 
void {\bf pack\-Buffer} ({\bf Buffer} $\ast$buf)
\begin{CompactList}\small\item\em Pack this \doxyref{Game\-Info}{p.}{classTPProto_1_1GameInfo} \doxyref{Frame}{p.}{classTPProto_1_1Frame} into a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}, asserts. \item\end{CompactList}\item 
bool {\bf unpack\-Buffer} ({\bf Buffer} $\ast$buf)
\begin{CompactList}\small\item\em Unpack from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. \item\end{CompactList}\item 
std::string {\bf get\-Game\-Name} () const
\begin{CompactList}\small\item\em Gets the game name for the game. \item\end{CompactList}\item 
std::set$<$ std::string $>$ {\bf get\-Available\-Protocol\-Versions} () const
\begin{CompactList}\small\item\em Gets the available protocol versions. \item\end{CompactList}\item 
std::string {\bf get\-Server\-Name} () const
\begin{CompactList}\small\item\em Get the name of the server software. \item\end{CompactList}\item 
std::string {\bf get\-Server\-Version} () const
\begin{CompactList}\small\item\em Get the version of the server software. \item\end{CompactList}\item 
std::string {\bf get\-Ruleset\-Name} () const
\begin{CompactList}\small\item\em Get the name of the ruleset. \item\end{CompactList}\item 
std::string {\bf get\-Ruleset\-Version} () const
\begin{CompactList}\small\item\em Get the version of the ruleset. \item\end{CompactList}\item 
std::string {\bf get\-Media\-Base\-Url} () const
\begin{CompactList}\small\item\em Get the base url for media for the game. \item\end{CompactList}\item 
std::set$<$ std::string $>$ {\bf get\-Connection\-Urls} () const
\begin{CompactList}\small\item\em Get the urls this game can be connected by. \item\end{CompactList}\item 
std::string {\bf get\-Advertised\-Ip} (const std::string \&url) const
\begin{CompactList}\small\item\em Gets the IP address advertised for a \doxyref{Connection}{p.}{classTPProto_1_1Connection} URL. \item\end{CompactList}\item 
std::string {\bf get\-Option\-String} (uint32\_\-t optionid) const
\begin{CompactList}\small\item\em Get the Option\-String associated with a given option id. \item\end{CompactList}\item 
uint32\_\-t {\bf get\-Option\-Int} (uint32\_\-t optionid) const
\begin{CompactList}\small\item\em Get the Option Integer associated with a given option id. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A \doxyref{Frame}{p.}{classTPProto_1_1Frame} for describing a game on the server. 



\subsection{Member Function Documentation}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!packBuffer@{packBuffer}}
\index{packBuffer@{packBuffer}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Info::pack\-Buffer ({\bf Buffer} $\ast$ {\em buf})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1GameInfo_8237c10e13683843d6498a67b896e276}


Pack this \doxyref{Game\-Info}{p.}{classTPProto_1_1GameInfo} \doxyref{Frame}{p.}{classTPProto_1_1Frame} into a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}, asserts. 

Packs this \doxyref{Game\-Info}{p.}{classTPProto_1_1GameInfo} frame into the buffer. Since the frame only comes from the server, this method assert(0). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]The \doxyref{Buffer}{p.}{classTPProto_1_1Buffer} to pack into, ignored. \end{description}
\end{Desc}


Implements {\bf TPProto::Frame} \doxyref{}{p.}{classTPProto_1_1Frame_67b50ee76e90385e56f04202ce1da67e}.\index{TPProto::GameInfo@{TPProto::Game\-Info}!unpackBuffer@{unpackBuffer}}
\index{unpackBuffer@{unpackBuffer}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Info::unpack\-Buffer ({\bf Buffer} $\ast$ {\em buf})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1GameInfo_5e4a750a8848be5901d06bb94292b009}


Unpack from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. 

Unpacks the \doxyref{Game\-Info}{p.}{classTPProto_1_1GameInfo} frame from the \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}, if possible. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]The \doxyref{Buffer}{p.}{classTPProto_1_1Buffer} to unpack.. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successfully unpacked, false otherwise. \end{Desc}


Implements {\bf TPProto::Frame} \doxyref{}{p.}{classTPProto_1_1Frame_fe220a4229f471a3cc6a143f7a27e321}.\index{TPProto::GameInfo@{TPProto::Game\-Info}!getGameName@{getGameName}}
\index{getGameName@{getGameName}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Game\-Name () const}\label{classTPProto_1_1GameInfo_1e664b038a59ea18b9a91a942f3c5865}


Gets the game name for the game. 

\begin{Desc}
\item[Returns:]A string containing the game name. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getAvailableProtocolVersions@{getAvailableProtocolVersions}}
\index{getAvailableProtocolVersions@{getAvailableProtocolVersions}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::set$<$ std::string $>$ TPProto::Game\-Info::get\-Available\-Protocol\-Versions () const}\label{classTPProto_1_1GameInfo_99cf03309b9691278e62bcb19fb29e06}


Gets the available protocol versions. 

\begin{Desc}
\item[Returns:]A set of strings, each is an available protocol version. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getServerName@{getServerName}}
\index{getServerName@{getServerName}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Server\-Name () const}\label{classTPProto_1_1GameInfo_67e7b24a2c8f77d0b92fcbb8e229e498}


Get the name of the server software. 

\begin{Desc}
\item[Returns:]A string of the server software's name. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getServerVersion@{getServerVersion}}
\index{getServerVersion@{getServerVersion}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Server\-Version () const}\label{classTPProto_1_1GameInfo_2c27ae4c3bd3b53fcb22c6e9b05ed52a}


Get the version of the server software. 

\begin{Desc}
\item[Returns:]A string of the server software's version. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getRulesetName@{getRulesetName}}
\index{getRulesetName@{getRulesetName}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Ruleset\-Name () const}\label{classTPProto_1_1GameInfo_319243781771a41f35f157703843e7f7}


Get the name of the ruleset. 

\begin{Desc}
\item[Returns:]A string of the ruleset's name. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getRulesetVersion@{getRulesetVersion}}
\index{getRulesetVersion@{getRulesetVersion}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Ruleset\-Version () const}\label{classTPProto_1_1GameInfo_8ed4f54dc2c1a1b374b30c424c38389c}


Get the version of the ruleset. 

\begin{Desc}
\item[Returns:]A string of the ruleset's version. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getMediaBaseUrl@{getMediaBaseUrl}}
\index{getMediaBaseUrl@{getMediaBaseUrl}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Media\-Base\-Url () const}\label{classTPProto_1_1GameInfo_7aeb4e9e503b95e57d97ef254ce82916}


Get the base url for media for the game. 

\begin{Desc}
\item[Returns:]A string of the base media URL. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getConnectionUrls@{getConnectionUrls}}
\index{getConnectionUrls@{getConnectionUrls}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::set$<$ std::string $>$ TPProto::Game\-Info::get\-Connection\-Urls () const}\label{classTPProto_1_1GameInfo_71418c0440e0f6a38494522ab35cbc2e}


Get the urls this game can be connected by. 

\begin{Desc}
\item[Returns:]A set of strings of urls \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getAdvertisedIp@{getAdvertisedIp}}
\index{getAdvertisedIp@{getAdvertisedIp}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Advertised\-Ip (const std::string \& {\em url}) const}\label{classTPProto_1_1GameInfo_ba4ef296f52674ffcb02566150154037}


Gets the IP address advertised for a \doxyref{Connection}{p.}{classTPProto_1_1Connection} URL. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]The URL to get the corresponding IP of. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A string of the corresponding advertised IP address, or an empty String. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getOptionString@{getOptionString}}
\index{getOptionString@{getOptionString}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Game\-Info::get\-Option\-String (uint32\_\-t {\em optionid}) const}\label{classTPProto_1_1GameInfo_96e37225653ce270630db66429fd2cf6}


Get the Option\-String associated with a given option id. 

An empty return string could be either empty in the option, or the option does not exist for this game. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em optionid}]The option id to get the string of. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The string of the option value, or an empty string. \end{Desc}
\index{TPProto::GameInfo@{TPProto::Game\-Info}!getOptionInt@{getOptionInt}}
\index{getOptionInt@{getOptionInt}!TPProto::GameInfo@{TPProto::Game\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint32\_\-t TPProto::Game\-Info::get\-Option\-Int (uint32\_\-t {\em optionid}) const}\label{classTPProto_1_1GameInfo_59b14fdc4bfb2a970a5f394601f951a5}


Get the Option Integer associated with a given option id. 

A value of 0 could be either 0 for the option, or the option does not exist for this game. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em optionid}]The option id to get the integer of. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The uint32\_\-t value of the option, or 0. \end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
tpproto/{\bf gameinfo.h}\item 
tpproto/gameinfo.cpp\end{CompactItemize}
