\section{TPProto::Game\-Layer Class Reference}
\label{classTPProto_1_1GameLayer}\index{TPProto::GameLayer@{TPProto::GameLayer}}
\doxyref{Game\-Layer}{p.}{classTPProto_1_1GameLayer} is the main interface to the higher layer of libtpproto-cpp.  


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

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Game\-Layer} ()
\begin{CompactList}\small\item\em Constructs object and sets up defaults. \item\end{CompactList}\item 
{\bf $\sim$Game\-Layer} ()\label{classTPProto_1_1GameLayer_1daf8fc6bd62fc5ea01a777a6cbc59f3}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void {\bf set\-Client\-String} (const std::string \&name)
\begin{CompactList}\small\item\em Sets the client string. \item\end{CompactList}\item 
void {\bf set\-Logger} ({\bf Logger} $\ast$nlog)
\begin{CompactList}\small\item\em Sets the \doxyref{Logger}{p.}{classTPProto_1_1Logger} to use. \item\end{CompactList}\item 
void {\bf set\-Game\-Status\-Listener} ({\bf Game\-Status\-Listener} $\ast$gsl)
\begin{CompactList}\small\item\em Sets the \doxyref{Game\-Status\-Listener}{p.}{classTPProto_1_1GameStatusListener} to use. \item\end{CompactList}\item 
void {\bf set\-Cache\-Method} ({\bf Cache\-Method} $\ast$prototype)
\begin{CompactList}\small\item\em Sets the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} for the caches to use. Changes the default \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} used, defaults to \doxyref{Cache\-None\-Method}{p.}{classTPProto_1_1CacheNoneMethod}. \item\end{CompactList}\item 
void {\bf set\-Event\-Loop} ({\bf Event\-Loop} $\ast$el)
\begin{CompactList}\small\item\em Sets the \doxyref{Event\-Loop}{p.}{classTPProto_1_1EventLoop} abstraction to use. Sets which implementation of \doxyref{Event\-Loop}{p.}{classTPProto_1_1EventLoop} to use. \item\end{CompactList}\item 
Game\-Status {\bf get\-Status} ()
\begin{CompactList}\small\item\em Gets the state of the game. \item\end{CompactList}\item 
{\bf Protocol\-Layer} $\ast$ {\bf get\-Protocol\-Layer} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer} being used. This could be used to do low level calls to the protocol itself, or more importantly, set the \doxyref{Frame\-Factory}{p.}{classTPProto_1_1FrameFactory}, \doxyref{Frame\-Builder}{p.}{classTPProto_1_1FrameBuilder} and/or \doxyref{Frame\-Codec}{p.}{classTPProto_1_1FrameCodec} classes in the \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer}. \item\end{CompactList}\item 
bool {\bf connect} (const std::string \&address)
\begin{CompactList}\small\item\em Connects to the given address url This method connects to the server given as the address. The types of url supported are tp, tps, https and http. Tps and https depend on TLS being enabled. \item\end{CompactList}\item 
bool {\bf connect} ({\bf TPSocket} $\ast$nsock)
\begin{CompactList}\small\item\em Connects using a given \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket}. Connects to a server using a given \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket}. \item\end{CompactList}\item 
bool {\bf create\-Account} (const std::string \&user, const std::string \&password, const std::string \&email, const std::string \&comment)
\begin{CompactList}\small\item\em Creates an account on the server. \item\end{CompactList}\item 
bool {\bf login} (const std::string \&user, const std::string \&password)
\begin{CompactList}\small\item\em Logs in to the server. \item\end{CompactList}\item 
void {\bf disconnect} ()
\begin{CompactList}\small\item\em Disconnects from server. \item\end{CompactList}\item 
void {\bf update\-Caches} ()\label{classTPProto_1_1GameLayer_a2bc0df1fbcaa87f38cd303118749a35}

\begin{CompactList}\small\item\em Tells all the caches to update. Called automatically after logged in, and after EOT has finished. Call if you want the caches to be updated. \item\end{CompactList}\item 
{\bf Object\-Desc\-Cache} $\ast$ {\bf get\-Object\-Desc\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Object\-Desc\-Cache}{p.}{classTPProto_1_1ObjectDescCache}. \item\end{CompactList}\item 
{\bf Object\-Cache} $\ast$ {\bf get\-Object\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Object\-Cache}{p.}{classTPProto_1_1ObjectCache}. \item\end{CompactList}\item 
{\bf Order\-Desc\-Cache} $\ast$ {\bf get\-Order\-Desc\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Order\-Desc\-Cache}{p.}{classTPProto_1_1OrderDescCache}. \item\end{CompactList}\item 
std::list$<$ {\bf Order} $\ast$ $>$ {\bf get\-Orders} (uint32\_\-t obid, uint32\_\-t num)
\begin{CompactList}\small\item\em Gets Orders from the server. \item\end{CompactList}\item 
{\bf Order} $\ast$ {\bf get\-Order} (uint32\_\-t obid, uint32\_\-t slot)
\begin{CompactList}\small\item\em Gets an Orders from the server. \item\end{CompactList}\item 
{\bf Order} $\ast$ {\bf create\-Order\-Frame} (int type)
\begin{CompactList}\small\item\em Creates an \doxyref{Order}{p.}{classTPProto_1_1Order} \doxyref{Frame}{p.}{classTPProto_1_1Frame} of a given type. \item\end{CompactList}\item 
bool {\bf insert\-Order} ({\bf Order} $\ast$frame)
\begin{CompactList}\small\item\em Inserts an \doxyref{Order}{p.}{classTPProto_1_1Order} into the objects order queue. \item\end{CompactList}\item 
bool {\bf replace\-Order} ({\bf Order} $\ast$frame)
\begin{CompactList}\small\item\em Replaces a current \doxyref{Order}{p.}{classTPProto_1_1Order} with a new one. \item\end{CompactList}\item 
{\bf Order} $\ast$ {\bf probe\-Order} ({\bf Order} $\ast$frame)
\begin{CompactList}\small\item\em Probes an \doxyref{Order}{p.}{classTPProto_1_1Order}. \item\end{CompactList}\item 
bool {\bf remove\-Order} (uint32\_\-t obid, uint32\_\-t slot)
\begin{CompactList}\small\item\em Removes an \doxyref{Order}{p.}{classTPProto_1_1Order} from the server. \item\end{CompactList}\item 
{\bf Board\-Cache} $\ast$ {\bf get\-Board\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Board\-Cache}{p.}{classTPProto_1_1BoardCache}. \item\end{CompactList}\item 
std::list$<$ {\bf Message} $\ast$ $>$ {\bf get\-Messages} (uint32\_\-t boardid, uint32\_\-t num)
\begin{CompactList}\small\item\em Gets Messages from the server. \item\end{CompactList}\item 
{\bf Message} $\ast$ {\bf create\-Message} ()
\begin{CompactList}\small\item\em Creates a \doxyref{Message}{p.}{classTPProto_1_1Message} object. \item\end{CompactList}\item 
{\bf Message} $\ast$ {\bf get\-Message} (uint32\_\-t boardid, uint32\_\-t slot)
\begin{CompactList}\small\item\em Gets a \doxyref{Message}{p.}{classTPProto_1_1Message} from the server. \item\end{CompactList}\item 
bool {\bf post\-Message} ({\bf Message} $\ast$frame)
\begin{CompactList}\small\item\em Posts a \doxyref{Message}{p.}{classTPProto_1_1Message} to the server. \item\end{CompactList}\item 
bool {\bf remove\-Message} (uint32\_\-t boardid, uint32\_\-t slot)
\begin{CompactList}\small\item\em Removes messages from the server. \item\end{CompactList}\item 
{\bf Resource\-Cache} $\ast$ {\bf get\-Resource\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Resource\-Cache}{p.}{classTPProto_1_1ResourceCache}. \item\end{CompactList}\item 
{\bf Player\-Cache} $\ast$ {\bf get\-Player\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Player\-Cache}{p.}{classTPProto_1_1PlayerCache}. \item\end{CompactList}\item 
{\bf Category\-Cache} $\ast$ {\bf get\-Category\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Category\-Cache}{p.}{classTPProto_1_1CategoryCache}. \item\end{CompactList}\item 
{\bf Design\-Cache} $\ast$ {\bf get\-Design\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Design\-Cache}{p.}{classTPProto_1_1DesignCache}. \item\end{CompactList}\item 
{\bf Component\-Cache} $\ast$ {\bf get\-Component\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Component\-Cache}{p.}{classTPProto_1_1ComponentCache}. \item\end{CompactList}\item 
{\bf Property\-Cache} $\ast$ {\bf get\-Property\-Cache} () const
\begin{CompactList}\small\item\em Gets the \doxyref{Property\-Cache}{p.}{classTPProto_1_1PropertyCache}. \item\end{CompactList}\item 
void {\bf get\-Time\-Remaining} ()
\begin{CompactList}\small\item\em Gets the time remaining before the end of turn. \item\end{CompactList}\item 
void \textbf{finished\-Turn} ()\label{classTPProto_1_1GameLayer_78d50ea3e5c1a73a9e9c46d74096c53b}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class \textbf{Game\-Layer\-Async\-Frame\-Listener}\label{classTPProto_1_1GameLayer_1bc347e44e6df9aa478ccc7e58b958f0}

\end{CompactItemize}


\subsection{Detailed Description}
\doxyref{Game\-Layer}{p.}{classTPProto_1_1GameLayer} is the main interface to the higher layer of libtpproto-cpp. 

\doxyref{Game\-Layer}{p.}{classTPProto_1_1GameLayer} abstracts away most of the underlying details of how Objects and Orders are requested and received. 



\subsection{Constructor \& Destructor Documentation}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!GameLayer@{GameLayer}}
\index{GameLayer@{GameLayer}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}TPProto::Game\-Layer::Game\-Layer ()}\label{classTPProto_1_1GameLayer_f17f834cc18eafe9ff5e09d42122c30e}


Constructs object and sets up defaults. 

Defaults are\begin{itemize}
\item The default \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer}\item Disconnected state.\item \char`\"{}Unknown client\char`\"{} for the client string \end{itemize}


\subsection{Member Function Documentation}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!setClientString@{setClientString}}
\index{setClientString@{setClientString}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Layer::set\-Client\-String (const std::string \& {\em name})}\label{classTPProto_1_1GameLayer_b96b303297fc2750f66ebbb2612df55a}


Sets the client string. 

The client string can be set to anything. The perferred format is \char`\"{}name/version\char`\"{}. The library name and version is added the the client string later. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The client name string. \end{description}
\end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!setLogger@{setLogger}}
\index{setLogger@{setLogger}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Layer::set\-Logger ({\bf Logger} $\ast$ {\em nlog})}\label{classTPProto_1_1GameLayer_42b9b87fcacc600d6cd31f850a6aaf37}


Sets the \doxyref{Logger}{p.}{classTPProto_1_1Logger} to use. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em nlog}]The new \doxyref{Logger}{p.}{classTPProto_1_1Logger} to use. \end{description}
\end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!setGameStatusListener@{setGameStatusListener}}
\index{setGameStatusListener@{setGameStatusListener}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Layer::set\-Game\-Status\-Listener ({\bf Game\-Status\-Listener} $\ast$ {\em gsl})}\label{classTPProto_1_1GameLayer_bb2dd8d67846fe9de8286c4c50d260cd}


Sets the \doxyref{Game\-Status\-Listener}{p.}{classTPProto_1_1GameStatusListener} to use. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gsl}]The new \doxyref{Game\-Status\-Listener}{p.}{classTPProto_1_1GameStatusListener} to use. \end{description}
\end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!setCacheMethod@{setCacheMethod}}
\index{setCacheMethod@{setCacheMethod}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Layer::set\-Cache\-Method ({\bf Cache\-Method} $\ast$ {\em prototype})}\label{classTPProto_1_1GameLayer_8a2b32f58ee5056569a6a8f155a92e55}


Sets the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} for the caches to use. Changes the default \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} used, defaults to \doxyref{Cache\-None\-Method}{p.}{classTPProto_1_1CacheNoneMethod}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prototype}]A \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} that will be cloned for each \doxyref{Cache}{p.}{classTPProto_1_1Cache} to use. \end{description}
\end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!setEventLoop@{setEventLoop}}
\index{setEventLoop@{setEventLoop}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Layer::set\-Event\-Loop ({\bf Event\-Loop} $\ast$ {\em el})}\label{classTPProto_1_1GameLayer_e0d5dfcddcbf95a22cf5a8b04b155b42}


Sets the \doxyref{Event\-Loop}{p.}{classTPProto_1_1EventLoop} abstraction to use. Sets which implementation of \doxyref{Event\-Loop}{p.}{classTPProto_1_1EventLoop} to use. 

Must be set before connecting to a server. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em el}]The implementation of the \doxyref{Event\-Loop}{p.}{classTPProto_1_1EventLoop} to use. \end{description}
\end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getStatus@{getStatus}}
\index{getStatus@{getStatus}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Game\-Status TPProto::Game\-Layer::get\-Status ()}\label{classTPProto_1_1GameLayer_ef13c72873728a0ad3fe8986d6d89eb2}


Gets the state of the game. 

\begin{Desc}
\item[Returns:]The Game\-Status enum value for the current state. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getProtocolLayer@{getProtocolLayer}}
\index{getProtocolLayer@{getProtocolLayer}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Protocol\-Layer} $\ast$ TPProto::Game\-Layer::get\-Protocol\-Layer () const}\label{classTPProto_1_1GameLayer_6baaf6e4ca08ce89a029be1f20be647e}


Gets the \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer} being used. This could be used to do low level calls to the protocol itself, or more importantly, set the \doxyref{Frame\-Factory}{p.}{classTPProto_1_1FrameFactory}, \doxyref{Frame\-Builder}{p.}{classTPProto_1_1FrameBuilder} and/or \doxyref{Frame\-Codec}{p.}{classTPProto_1_1FrameCodec} classes in the \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer}. 

\begin{Desc}
\item[Returns:]The pointer to the \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!connect@{connect}}
\index{connect@{connect}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::connect (const std::string \& {\em address})}\label{classTPProto_1_1GameLayer_c050694a7b361de0ddcf8d2d654ef22d}


Connects to the given address url This method connects to the server given as the address. The types of url supported are tp, tps, https and http. Tps and https depend on TLS being enabled. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]The URL to connect to. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if connection in progress, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!connect@{connect}}
\index{connect@{connect}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::connect ({\bf TPSocket} $\ast$ {\em nsock})}\label{classTPProto_1_1GameLayer_24141851557425882b463175858f6730}


Connects using a given \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket}. Connects to a server using a given \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em nsock}]The \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket} to connect using. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if connection in progress, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!createAccount@{createAccount}}
\index{createAccount@{createAccount}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::create\-Account (const std::string \& {\em user}, const std::string \& {\em password}, const std::string \& {\em email}, const std::string \& {\em comment})}\label{classTPProto_1_1GameLayer_d9b299fef531d3438d854c7b9dcf8ae8}


Creates an account on the server. 

Sends a \doxyref{Account\-Create}{p.}{classTPProto_1_1AccountCreate} \doxyref{Frame}{p.}{classTPProto_1_1Frame} to the server and waits for a reply. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em user}]The username to use. \item[{\em password}]The password for the account. \item[{\em email}]The user's email address. \item[{\em comment}]A comment to send. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successful, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!login@{login}}
\index{login@{login}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::login (const std::string \& {\em username}, const std::string \& {\em password})}\label{classTPProto_1_1GameLayer_6480e4cc2162b35b3970aeddf6fbe8d8}


Logs in to the server. 

Sends a \doxyref{Login}{p.}{classTPProto_1_1Login} \doxyref{Frame}{p.}{classTPProto_1_1Frame} to the server and waits for a reply. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em username}]The username to connect as. \item[{\em password}]The password of the account of the username. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successfully started, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!disconnect@{disconnect}}
\index{disconnect@{disconnect}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Layer::disconnect ()}\label{classTPProto_1_1GameLayer_e45f62b513b50b70830a808ef48d3539}


Disconnects from server. 

Closes the underlying \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket}. \index{TPProto::GameLayer@{TPProto::Game\-Layer}!getObjectDescCache@{getObjectDescCache}}
\index{getObjectDescCache@{getObjectDescCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Object\-Desc\-Cache} $\ast$ TPProto::Game\-Layer::get\-Object\-Desc\-Cache () const}\label{classTPProto_1_1GameLayer_d1471b394b33a9b8bd43e3ef91446013}


Gets the \doxyref{Object\-Desc\-Cache}{p.}{classTPProto_1_1ObjectDescCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Object\-Desc\-Cache}{p.}{classTPProto_1_1ObjectDescCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getObjectCache@{getObjectCache}}
\index{getObjectCache@{getObjectCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Object\-Cache} $\ast$ TPProto::Game\-Layer::get\-Object\-Cache () const}\label{classTPProto_1_1GameLayer_fbb6222721771faa41a10e94fb296d66}


Gets the \doxyref{Object\-Cache}{p.}{classTPProto_1_1ObjectCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Object\-Cache}{p.}{classTPProto_1_1ObjectCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getOrderDescCache@{getOrderDescCache}}
\index{getOrderDescCache@{getOrderDescCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Order\-Desc\-Cache} $\ast$ TPProto::Game\-Layer::get\-Order\-Desc\-Cache () const}\label{classTPProto_1_1GameLayer_2b8bf7389738dbed7358d37b44a1ae9c}


Gets the \doxyref{Order\-Desc\-Cache}{p.}{classTPProto_1_1OrderDescCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Order\-Desc\-Cache}{p.}{classTPProto_1_1OrderDescCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getOrders@{getOrders}}
\index{getOrders@{getOrders}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::list$<$ {\bf Order} $\ast$ $>$ TPProto::Game\-Layer::get\-Orders (uint32\_\-t {\em obid}, uint32\_\-t {\em num})}\label{classTPProto_1_1GameLayer_a556ae4067609981f1aa2e58a3ff4d59}


Gets Orders from the server. 

This method sends the \doxyref{Get\-Order}{p.}{classTPProto_1_1GetOrder} \doxyref{Frame}{p.}{classTPProto_1_1Frame} to the server and returns the \doxyref{Order}{p.}{classTPProto_1_1Order} Frames. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em obid}]The object to get the orders from. \item[{\em num}]The number of orders to get. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]List of Orders. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getOrder@{getOrder}}
\index{getOrder@{getOrder}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Order} $\ast$ TPProto::Game\-Layer::get\-Order (uint32\_\-t {\em obid}, uint32\_\-t {\em slot})}\label{classTPProto_1_1GameLayer_9277834e9a35c3be5b9809d008bef6ab}


Gets an Orders from the server. 

This method sends the \doxyref{Get\-Order}{p.}{classTPProto_1_1GetOrder} \doxyref{Frame}{p.}{classTPProto_1_1Frame} to the server and returns the \doxyref{Order}{p.}{classTPProto_1_1Order} \doxyref{Frame}{p.}{classTPProto_1_1Frame}. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em obid}]The object to get the orders from. \item[{\em slot}]The slot number of the order to get. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The order retreved. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!createOrderFrame@{createOrderFrame}}
\index{createOrderFrame@{createOrderFrame}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Order} $\ast$ TPProto::Game\-Layer::create\-Order\-Frame (int {\em type})}\label{classTPProto_1_1GameLayer_98b2dba6102aa6e48c780f4ce0be8909}


Creates an \doxyref{Order}{p.}{classTPProto_1_1Order} \doxyref{Frame}{p.}{classTPProto_1_1Frame} of a given type. 

This method creates a new \doxyref{Order}{p.}{classTPProto_1_1Order} \doxyref{Frame}{p.}{classTPProto_1_1Frame}, sets the protocol version and sets up the order for the given type, including parameters. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]The type number for the order type. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new \doxyref{Order}{p.}{classTPProto_1_1Order}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!insertOrder@{insertOrder}}
\index{insertOrder@{insertOrder}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::insert\-Order ({\bf Order} $\ast$ {\em frame})}\label{classTPProto_1_1GameLayer_96fc2961fe978488ab45dcdfbc7212b7}


Inserts an \doxyref{Order}{p.}{classTPProto_1_1Order} into the objects order queue. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em frame}]The \doxyref{Order}{p.}{classTPProto_1_1Order} to insert. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successful, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!replaceOrder@{replaceOrder}}
\index{replaceOrder@{replaceOrder}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::replace\-Order ({\bf Order} $\ast$ {\em frame})}\label{classTPProto_1_1GameLayer_a38b644cc7cc339672c9bfcbf9693b2e}


Replaces a current \doxyref{Order}{p.}{classTPProto_1_1Order} with a new one. 

First inserts the new \doxyref{Order}{p.}{classTPProto_1_1Order}, then removes the old one. Can fail with or without the new order in the order queue. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em frame}]The \doxyref{Order}{p.}{classTPProto_1_1Order} that will replace the current one. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successful, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!probeOrder@{probeOrder}}
\index{probeOrder@{probeOrder}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Order} $\ast$ TPProto::Game\-Layer::probe\-Order ({\bf Order} $\ast$ {\em frame})}\label{classTPProto_1_1GameLayer_b634add3ff1f8d00adf840571316f293}


Probes an \doxyref{Order}{p.}{classTPProto_1_1Order}. 

Sends the order to the server to be probed, returning the order that would have been added to the object. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em frame}]The \doxyref{Order}{p.}{classTPProto_1_1Order} to probe. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The reply \doxyref{Order}{p.}{classTPProto_1_1Order} with read-only fields filled. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!removeOrder@{removeOrder}}
\index{removeOrder@{removeOrder}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::remove\-Order (uint32\_\-t {\em obid}, uint32\_\-t {\em slot})}\label{classTPProto_1_1GameLayer_508c58b1ddade1386cbe9a2b8009caf7}


Removes an \doxyref{Order}{p.}{classTPProto_1_1Order} from the server. 

Sends the \doxyref{Remove\-Order}{p.}{classTPProto_1_1RemoveOrder} frame to the server and receives reply. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em obid}]The \doxyref{Object}{p.}{classTPProto_1_1Object} to remove the order from. \item[{\em slot}]The slot that should have it's order removed. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if sucessful, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getBoardCache@{getBoardCache}}
\index{getBoardCache@{getBoardCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Board\-Cache} $\ast$ TPProto::Game\-Layer::get\-Board\-Cache () const}\label{classTPProto_1_1GameLayer_697c04428222c3e444d15e7fe5530830}


Gets the \doxyref{Board\-Cache}{p.}{classTPProto_1_1BoardCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Board\-Cache}{p.}{classTPProto_1_1BoardCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getMessages@{getMessages}}
\index{getMessages@{getMessages}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::list$<$ {\bf Message} $\ast$ $>$ TPProto::Game\-Layer::get\-Messages (uint32\_\-t {\em boardid}, uint32\_\-t {\em num})}\label{classTPProto_1_1GameLayer_c204125cdec4a8c1d4889aa7ea3a55fa}


Gets Messages from the server. 

Sends the \doxyref{Get\-Message}{p.}{classTPProto_1_1GetMessage} \doxyref{Frame}{p.}{classTPProto_1_1Frame} and receives the \doxyref{Message}{p.}{classTPProto_1_1Message} frames. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em boardid}]The board ID of the board to get the messages from. \item[{\em num}]The number of messages to get. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]List of Messages. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!createMessage@{createMessage}}
\index{createMessage@{createMessage}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Message} $\ast$ TPProto::Game\-Layer::create\-Message ()}\label{classTPProto_1_1GameLayer_4855c5c8ca8e0634dd77a2e2a3cf11ff}


Creates a \doxyref{Message}{p.}{classTPProto_1_1Message} object. 

\begin{Desc}
\item[Returns:]A new message object. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getMessage@{getMessage}}
\index{getMessage@{getMessage}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Message} $\ast$ TPProto::Game\-Layer::get\-Message (uint32\_\-t {\em boardid}, uint32\_\-t {\em slot})}\label{classTPProto_1_1GameLayer_927f11beda2fa8ea661d87af0eafb616}


Gets a \doxyref{Message}{p.}{classTPProto_1_1Message} from the server. 

Sends the \doxyref{Get\-Message}{p.}{classTPProto_1_1GetMessage} \doxyref{Frame}{p.}{classTPProto_1_1Frame} and receives the \doxyref{Message}{p.}{classTPProto_1_1Message} frame. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em boardid}]The board ID of the board to get the message from. \item[{\em slot}]The slot number of the message to get. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The \doxyref{Message}{p.}{classTPProto_1_1Message}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!postMessage@{postMessage}}
\index{postMessage@{postMessage}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::post\-Message ({\bf Message} $\ast$ {\em frame})}\label{classTPProto_1_1GameLayer_3bcb659d3110d5f7482f5e2703c69d51}


Posts a \doxyref{Message}{p.}{classTPProto_1_1Message} to the server. 

Sends the \doxyref{Message}{p.}{classTPProto_1_1Message} \doxyref{Frame}{p.}{classTPProto_1_1Frame} to the server. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em frame}]The \doxyref{Message}{p.}{classTPProto_1_1Message} to post. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successful, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!removeMessage@{removeMessage}}
\index{removeMessage@{removeMessage}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Game\-Layer::remove\-Message (uint32\_\-t {\em boardid}, uint32\_\-t {\em slot})}\label{classTPProto_1_1GameLayer_d59a9ea8a0d931448cb6523d9ba0496f}


Removes messages from the server. 

Sends the \doxyref{Remove\-Message}{p.}{classTPProto_1_1RemoveMessage} frame and receives the replies. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em boardid}]The board id of the board to remove the message from. \item[{\em slot}]The slot to remove the message from. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if message is removed, false otherwise. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getResourceCache@{getResourceCache}}
\index{getResourceCache@{getResourceCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Resource\-Cache} $\ast$ TPProto::Game\-Layer::get\-Resource\-Cache () const}\label{classTPProto_1_1GameLayer_d09d8254b58d111b3fe3facdc93fb881}


Gets the \doxyref{Resource\-Cache}{p.}{classTPProto_1_1ResourceCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Resource\-Cache}{p.}{classTPProto_1_1ResourceCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getPlayerCache@{getPlayerCache}}
\index{getPlayerCache@{getPlayerCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Player\-Cache} $\ast$ TPProto::Game\-Layer::get\-Player\-Cache () const}\label{classTPProto_1_1GameLayer_e70123479182c2b80d083bb867b5f8bb}


Gets the \doxyref{Player\-Cache}{p.}{classTPProto_1_1PlayerCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Player\-Cache}{p.}{classTPProto_1_1PlayerCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getCategoryCache@{getCategoryCache}}
\index{getCategoryCache@{getCategoryCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Category\-Cache} $\ast$ TPProto::Game\-Layer::get\-Category\-Cache () const}\label{classTPProto_1_1GameLayer_c1b38d2b79c9dec1529629c32fe08602}


Gets the \doxyref{Category\-Cache}{p.}{classTPProto_1_1CategoryCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Category\-Cache}{p.}{classTPProto_1_1CategoryCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getDesignCache@{getDesignCache}}
\index{getDesignCache@{getDesignCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Design\-Cache} $\ast$ TPProto::Game\-Layer::get\-Design\-Cache () const}\label{classTPProto_1_1GameLayer_45c1f291784a0150f19311bd48a7caa0}


Gets the \doxyref{Design\-Cache}{p.}{classTPProto_1_1DesignCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Design\-Cache}{p.}{classTPProto_1_1DesignCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getComponentCache@{getComponentCache}}
\index{getComponentCache@{getComponentCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Component\-Cache} $\ast$ TPProto::Game\-Layer::get\-Component\-Cache () const}\label{classTPProto_1_1GameLayer_c90c0fef5afadc4200c6dfb7c4606130}


Gets the \doxyref{Component\-Cache}{p.}{classTPProto_1_1ComponentCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Component\-Cache}{p.}{classTPProto_1_1ComponentCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getPropertyCache@{getPropertyCache}}
\index{getPropertyCache@{getPropertyCache}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Property\-Cache} $\ast$ TPProto::Game\-Layer::get\-Property\-Cache () const}\label{classTPProto_1_1GameLayer_bff4a5ca7a8d6653a883515039690cb8}


Gets the \doxyref{Property\-Cache}{p.}{classTPProto_1_1PropertyCache}. 

\begin{Desc}
\item[Returns:]The \doxyref{Property\-Cache}{p.}{classTPProto_1_1PropertyCache}. \end{Desc}
\index{TPProto::GameLayer@{TPProto::Game\-Layer}!getTimeRemaining@{getTimeRemaining}}
\index{getTimeRemaining@{getTimeRemaining}!TPProto::GameLayer@{TPProto::Game\-Layer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Game\-Layer::get\-Time\-Remaining ()}\label{classTPProto_1_1GameLayer_e4957d673780175578870382f9a25f79}


Gets the time remaining before the end of turn. 

Fetches the time remaining till the end of turn from the server. The actual value is returned through the Game\-Status\-Listener::time\-To\-Eo\-T(). 

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