\section{TPProto::Add\-Design Class Reference}
\label{classTPProto_1_1AddDesign}\index{TPProto::AddDesign@{TPProto::AddDesign}}
A \doxyref{Frame}{p.}{classTPProto_1_1Frame} to hold Add\-Designs frames to send to the server.  


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

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

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
virtual {\bf $\sim$Add\-Design} ()\label{classTPProto_1_1AddDesign_8ff865dde45566e992cbfa480b91aa9c}

\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 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 from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}, fails. Unpacks the \doxyref{Add\-Design}{p.}{classTPProto_1_1AddDesign} frame from the buffer. This method always fails and return false because you can't receive \doxyref{Add\-Design}{p.}{classTPProto_1_1AddDesign} frames from the server. \item\end{CompactList}\item 
void {\bf set\-Categories} (std::set$<$ uint32\_\-t $>$ cats)
\begin{CompactList}\small\item\em Sets the categories this \doxyref{Design}{p.}{classTPProto_1_1Design} is in. \item\end{CompactList}\item 
void {\bf set\-Name} (const std::string \&n)
\begin{CompactList}\small\item\em Sets the name of this \doxyref{Design}{p.}{classTPProto_1_1Design}. \item\end{CompactList}\item 
void {\bf set\-Description} (const std::string \&d)
\begin{CompactList}\small\item\em Sets the description of this \doxyref{Design}{p.}{classTPProto_1_1Design}. \item\end{CompactList}\item 
void {\bf set\-Player\-Owner} (uint32\_\-t player)
\begin{CompactList}\small\item\em Sets the \doxyref{Player}{p.}{classTPProto_1_1Player} that owns this \doxyref{Design}{p.}{classTPProto_1_1Design}. Should be the current player's id. \item\end{CompactList}\item 
void {\bf set\-Components} (std::map$<$ uint32\_\-t, uint32\_\-t $>$ comps)
\begin{CompactList}\small\item\em Sets the components that make up this design. \item\end{CompactList}\item 
void {\bf copy\-From\-Design} ({\bf Design} $\ast$d)
\begin{CompactList}\small\item\em Copies the contents of a design to add to the server. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A \doxyref{Frame}{p.}{classTPProto_1_1Frame} to hold Add\-Designs frames to send to the server. 



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


Pack into a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. 

Packs this \doxyref{Add\-Design}{p.}{classTPProto_1_1AddDesign} frame into the buffer. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]\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::AddDesign@{TPProto::Add\-Design}!unpackBuffer@{unpackBuffer}}
\index{unpackBuffer@{unpackBuffer}!TPProto::AddDesign@{TPProto::Add\-Design}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Add\-Design::unpack\-Buffer ({\bf Buffer} $\ast$ {\em buf})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1AddDesign_6d2fbb04ccf8b5534f35d71924b6ef14}


Unpack from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}, fails. Unpacks the \doxyref{Add\-Design}{p.}{classTPProto_1_1AddDesign} frame from the buffer. This method always fails and return false because you can't receive \doxyref{Add\-Design}{p.}{classTPProto_1_1AddDesign} frames from the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]The \doxyref{Buffer}{p.}{classTPProto_1_1Buffer} to unpack out of, ignored. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]False always. \end{Desc}


Implements {\bf TPProto::Frame} \doxyref{}{p.}{classTPProto_1_1Frame_fe220a4229f471a3cc6a143f7a27e321}.\index{TPProto::AddDesign@{TPProto::Add\-Design}!setCategories@{setCategories}}
\index{setCategories@{setCategories}!TPProto::AddDesign@{TPProto::Add\-Design}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Add\-Design::set\-Categories (std::set$<$ uint32\_\-t $>$ {\em cats})}\label{classTPProto_1_1AddDesign_4fb1a826c4edc11ca98049b456359c39}


Sets the categories this \doxyref{Design}{p.}{classTPProto_1_1Design} is in. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cats}]The set of categories. \end{description}
\end{Desc}
\index{TPProto::AddDesign@{TPProto::Add\-Design}!setName@{setName}}
\index{setName@{setName}!TPProto::AddDesign@{TPProto::Add\-Design}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Add\-Design::set\-Name (const std::string \& {\em n})}\label{classTPProto_1_1AddDesign_3f85ac3696a1ecf2ace973ed565168e5}


Sets the name of this \doxyref{Design}{p.}{classTPProto_1_1Design}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n}]The name of the \doxyref{Design}{p.}{classTPProto_1_1Design}. \end{description}
\end{Desc}
\index{TPProto::AddDesign@{TPProto::Add\-Design}!setDescription@{setDescription}}
\index{setDescription@{setDescription}!TPProto::AddDesign@{TPProto::Add\-Design}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Add\-Design::set\-Description (const std::string \& {\em d})}\label{classTPProto_1_1AddDesign_a00e1a302656e5cb7b4406fa4c7bd75b}


Sets the description of this \doxyref{Design}{p.}{classTPProto_1_1Design}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em d}]The description of the \doxyref{Design}{p.}{classTPProto_1_1Design}. \end{description}
\end{Desc}
\index{TPProto::AddDesign@{TPProto::Add\-Design}!setPlayerOwner@{setPlayerOwner}}
\index{setPlayerOwner@{setPlayerOwner}!TPProto::AddDesign@{TPProto::Add\-Design}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Add\-Design::set\-Player\-Owner (uint32\_\-t {\em player})}\label{classTPProto_1_1AddDesign_8ded5f56423420423769bf298d43585d}


Sets the \doxyref{Player}{p.}{classTPProto_1_1Player} that owns this \doxyref{Design}{p.}{classTPProto_1_1Design}. Should be the current player's id. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em player}]The \doxyref{Player}{p.}{classTPProto_1_1Player} id of the owner. \end{description}
\end{Desc}
\index{TPProto::AddDesign@{TPProto::Add\-Design}!setComponents@{setComponents}}
\index{setComponents@{setComponents}!TPProto::AddDesign@{TPProto::Add\-Design}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Add\-Design::set\-Components (std::map$<$ uint32\_\-t, uint32\_\-t $>$ {\em comps})}\label{classTPProto_1_1AddDesign_56354a23e5048a95fb2706021775d7c7}


Sets the components that make up this design. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em comps}]The map of component ids and the number in this design. \end{description}
\end{Desc}
\index{TPProto::AddDesign@{TPProto::Add\-Design}!copyFromDesign@{copyFromDesign}}
\index{copyFromDesign@{copyFromDesign}!TPProto::AddDesign@{TPProto::Add\-Design}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Add\-Design::copy\-From\-Design ({\bf Design} $\ast$ {\em d})}\label{classTPProto_1_1AddDesign_9f11d0c7189511c23e4ef7abbe8f0d03}


Copies the contents of a design to add to the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em d}]The design to copy from. \end{description}
\end{Desc}


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