\section{TPProto::Message Class Reference}
\label{classTPProto_1_1Message}\index{TPProto::Message@{TPProto::Message}}
A \doxyref{Frame}{p.}{classTPProto_1_1Frame} of a \doxyref{Message}{p.}{classTPProto_1_1Message} from a \doxyref{Board}{p.}{classTPProto_1_1Board}.  


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

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

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
virtual {\bf $\sim$Message} ()\label{classTPProto_1_1Message_cebe4e3222b837389932b07339ff2771}

\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{Message}{p.}{classTPProto_1_1Message} \doxyref{Frame}{p.}{classTPProto_1_1Frame} into a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. \item\end{CompactList}\item 
bool {\bf unpack\-Buffer} ({\bf Buffer} $\ast$buf)
\begin{CompactList}\small\item\em Unpack this \doxyref{Message}{p.}{classTPProto_1_1Message} from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. \item\end{CompactList}\item 
unsigned int {\bf get\-Board\-Id} ()
\begin{CompactList}\small\item\em Gets the \doxyref{Board}{p.}{classTPProto_1_1Board} id number this \doxyref{Message}{p.}{classTPProto_1_1Message} is on. \item\end{CompactList}\item 
int {\bf get\-Slot} ()
\begin{CompactList}\small\item\em Gets the slot number this \doxyref{Message}{p.}{classTPProto_1_1Message} is in. \item\end{CompactList}\item 
unsigned int {\bf get\-Message\-Type} ()
\begin{CompactList}\small\item\em Gets the message type. \item\end{CompactList}\item 
std::string {\bf get\-Subject} ()
\begin{CompactList}\small\item\em Gets the subject of the message. \item\end{CompactList}\item 
std::string {\bf get\-Body} ()
\begin{CompactList}\small\item\em Gets the body text of the message. \item\end{CompactList}\item 
uint32\_\-t {\bf get\-Turn\-Num} () const
\begin{CompactList}\small\item\em Gets the turn number this message was posted on. \item\end{CompactList}\item 
std::map$<$ int32\_\-t, uint32\_\-t $>$ {\bf get\-References} () const
\begin{CompactList}\small\item\em Gets the references for this message. \item\end{CompactList}\item 
void {\bf set\-Board\-Id} (unsigned int board)
\begin{CompactList}\small\item\em Sets the \doxyref{Board}{p.}{classTPProto_1_1Board} id for the message. \item\end{CompactList}\item 
void {\bf set\-Slot} (int nsl)
\begin{CompactList}\small\item\em Sets the slot number for this message to go into. \item\end{CompactList}\item 
void {\bf set\-Message\-Type} (unsigned int mt)
\begin{CompactList}\small\item\em Sets the message type. \item\end{CompactList}\item 
void {\bf set\-Subject} (const std::string \&ns)
\begin{CompactList}\small\item\em Sets the subject. \item\end{CompactList}\item 
void {\bf set\-Body} (const std::string \&nb)
\begin{CompactList}\small\item\em Sets the body text. \item\end{CompactList}\item 
void {\bf set\-References} (std::map$<$ int32\_\-t, uint32\_\-t $>$ rs)
\begin{CompactList}\small\item\em Sets the references for this message. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A \doxyref{Frame}{p.}{classTPProto_1_1Frame} of a \doxyref{Message}{p.}{classTPProto_1_1Message} from a \doxyref{Board}{p.}{classTPProto_1_1Board}. 



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


Pack this \doxyref{Message}{p.}{classTPProto_1_1Message} \doxyref{Frame}{p.}{classTPProto_1_1Frame} into a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]The \doxyref{Buffer}{p.}{classTPProto_1_1Buffer} to pack into. \end{description}
\end{Desc}


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


Unpack this \doxyref{Message}{p.}{classTPProto_1_1Message} from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]The \doxyref{Buffer}{p.}{classTPProto_1_1Buffer} to unpack out of. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successful. \end{Desc}


Implements {\bf TPProto::Frame} \doxyref{}{p.}{classTPProto_1_1Frame_fe220a4229f471a3cc6a143f7a27e321}.\index{TPProto::Message@{TPProto::Message}!getBoardId@{getBoardId}}
\index{getBoardId@{getBoardId}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int TPProto::Message::get\-Board\-Id ()}\label{classTPProto_1_1Message_f3b95a42b8103b1fa0dae4155fdbc96d}


Gets the \doxyref{Board}{p.}{classTPProto_1_1Board} id number this \doxyref{Message}{p.}{classTPProto_1_1Message} is on. 

\begin{Desc}
\item[Returns:]The board id. \end{Desc}
\index{TPProto::Message@{TPProto::Message}!getSlot@{getSlot}}
\index{getSlot@{getSlot}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TPProto::Message::get\-Slot ()}\label{classTPProto_1_1Message_fbba22b509eafd9d5491e99d3754323a}


Gets the slot number this \doxyref{Message}{p.}{classTPProto_1_1Message} is in. 

Can be -1 if it is to be the last message. \begin{Desc}
\item[Returns:]The slot number. \end{Desc}
\index{TPProto::Message@{TPProto::Message}!getMessageType@{getMessageType}}
\index{getMessageType@{getMessageType}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int TPProto::Message::get\-Message\-Type ()}\label{classTPProto_1_1Message_98f1793fcfa497497919e1c24e1bd25d}


Gets the message type. 

\begin{Desc}
\item[{\bf Deprecated}]Not used in TP03 or later. Use references instead. \end{Desc}
\begin{Desc}
\item[Returns:]The message type. \end{Desc}
\index{TPProto::Message@{TPProto::Message}!getSubject@{getSubject}}
\index{getSubject@{getSubject}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Message::get\-Subject ()}\label{classTPProto_1_1Message_f12725754916dcc11bc1d5e17aac2828}


Gets the subject of the message. 

\begin{Desc}
\item[Returns:]The subject. \end{Desc}
\index{TPProto::Message@{TPProto::Message}!getBody@{getBody}}
\index{getBody@{getBody}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string TPProto::Message::get\-Body ()}\label{classTPProto_1_1Message_1017293569c708acd1604bfc3031adec}


Gets the body text of the message. 

\begin{Desc}
\item[Returns:]The body text. \end{Desc}
\index{TPProto::Message@{TPProto::Message}!getTurnNum@{getTurnNum}}
\index{getTurnNum@{getTurnNum}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint32\_\-t TPProto::Message::get\-Turn\-Num () const}\label{classTPProto_1_1Message_26237baa6013c8cb1d912410f3a38119}


Gets the turn number this message was posted on. 

\begin{Desc}
\item[Returns:]The turn number. \end{Desc}
\index{TPProto::Message@{TPProto::Message}!getReferences@{getReferences}}
\index{getReferences@{getReferences}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::map$<$ int32\_\-t, uint32\_\-t $>$ TPProto::Message::get\-References () const}\label{classTPProto_1_1Message_ad6e1186fd1365e53898bf7727e8e763}


Gets the references for this message. 

\begin{Desc}
\item[Returns:]The map of references. \end{Desc}
\index{TPProto::Message@{TPProto::Message}!setBoardId@{setBoardId}}
\index{setBoardId@{setBoardId}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Message::set\-Board\-Id (unsigned int {\em board})}\label{classTPProto_1_1Message_becdafae01885a894fe56807fca4c7d5}


Sets the \doxyref{Board}{p.}{classTPProto_1_1Board} id for the message. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em board}]The \doxyref{Board}{p.}{classTPProto_1_1Board} this message should be posted to. \end{description}
\end{Desc}
\index{TPProto::Message@{TPProto::Message}!setSlot@{setSlot}}
\index{setSlot@{setSlot}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Message::set\-Slot (int {\em nsl})}\label{classTPProto_1_1Message_e988ddc55145e059f9fe78770b7c98e8}


Sets the slot number for this message to go into. 

Starts from 0. Can be -1 for the last slot. /param nsl The slot number. \index{TPProto::Message@{TPProto::Message}!setMessageType@{setMessageType}}
\index{setMessageType@{setMessageType}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Message::set\-Message\-Type (unsigned int {\em mt})}\label{classTPProto_1_1Message_4c2480486d00e0d7c4465b701c1b8fa6}


Sets the message type. 

\begin{Desc}
\item[{\bf Deprecated}]Not used in TP03 or later. Use references instead. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mt}]The message type. \end{description}
\end{Desc}
\index{TPProto::Message@{TPProto::Message}!setSubject@{setSubject}}
\index{setSubject@{setSubject}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Message::set\-Subject (const std::string \& {\em ns})}\label{classTPProto_1_1Message_554eb5e6a430f5e2865c38a514032e03}


Sets the subject. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ns}]The subject. \end{description}
\end{Desc}
\index{TPProto::Message@{TPProto::Message}!setBody@{setBody}}
\index{setBody@{setBody}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Message::set\-Body (const std::string \& {\em nb})}\label{classTPProto_1_1Message_614c8f4c2ffd713782b26cc4beb1f2ab}


Sets the body text. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em nb}]The body text. \end{description}
\end{Desc}
\index{TPProto::Message@{TPProto::Message}!setReferences@{setReferences}}
\index{setReferences@{setReferences}!TPProto::Message@{TPProto::Message}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Message::set\-References (std::map$<$ int32\_\-t, uint32\_\-t $>$ {\em rs})}\label{classTPProto_1_1Message_fe60728d1113afc3ab81c82db4ca9d22}


Sets the references for this message. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rs}]The map of references. \end{description}
\end{Desc}


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