\section{TPProto::List\-Parameter Class Reference}
\label{classTPProto_1_1ListParameter}\index{TPProto::ListParameter@{TPProto::ListParameter}}
An \doxyref{Order\-Parameter}{p.}{classTPProto_1_1OrderParameter} containing a list of selectable items.  


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

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

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
{\bf List\-Parameter} (const {\bf List\-Parameter} \&rhs)
\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
virtual {\bf $\sim$List\-Parameter} ()\label{classTPProto_1_1ListParameter_2459fa7ac3784aee0bb48975315e38f7}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void {\bf pack\-Buffer} ({\bf Buffer} $\ast$buf)
\begin{CompactList}\small\item\em Packs the \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter} 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 the \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter} from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. \item\end{CompactList}\item 
{\bf Order\-Parameter} $\ast$ {\bf clone} ()
\begin{CompactList}\small\item\em Clones this \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter}. \item\end{CompactList}\item 
void {\bf visit} ({\bf Order\-Parameter\-Visitor} $\ast$opv)
\begin{CompactList}\small\item\em Visits this \doxyref{Order\-Parameter}{p.}{classTPProto_1_1OrderParameter}. \item\end{CompactList}\item 
bool {\bf set\-Selection} (unsigned int id, unsigned int num)
\begin{CompactList}\small\item\em Sets one item as selected with a given quanity. \item\end{CompactList}\item 
unsigned int {\bf get\-Selection} (unsigned int id)
\begin{CompactList}\small\item\em Gets the number selected for the given id. \item\end{CompactList}\item 
std::map$<$ unsigned int, Selectable\-Element $>$ {\bf get\-Selectable\-List} ()
\begin{CompactList}\small\item\em Gets the map of Selectable\-Elements. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
An \doxyref{Order\-Parameter}{p.}{classTPProto_1_1OrderParameter} containing a list of selectable items. 



\subsection{Constructor \& Destructor Documentation}
\index{TPProto::ListParameter@{TPProto::List\-Parameter}!ListParameter@{ListParameter}}
\index{ListParameter@{ListParameter}!TPProto::ListParameter@{TPProto::List\-Parameter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}TPProto::List\-Parameter::List\-Parameter (const {\bf List\-Parameter} \& {\em rhs})}\label{classTPProto_1_1ListParameter_20776a5198ec0aa59ea891b610658d5d}


Copy constructor. 

Does not copy the chosen items, but does copy the selectable list. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rhs}]The \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter} to copy. \end{description}
\end{Desc}


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


Packs the \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter} into a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. 

The selectable list is not packed as the server does not need it (it sent it to us in the first place.) \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::Order\-Parameter} \doxyref{}{p.}{classTPProto_1_1OrderParameter_6e56734ace50acad1b0da0805a77c763}.\index{TPProto::ListParameter@{TPProto::List\-Parameter}!unpackBuffer@{unpackBuffer}}
\index{unpackBuffer@{unpackBuffer}!TPProto::ListParameter@{TPProto::List\-Parameter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::List\-Parameter::unpack\-Buffer ({\bf Buffer} $\ast$ {\em buf})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1ListParameter_71baba61557234692ef8b57863190abf}


Unpack the \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter} 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 from. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if unpacked successfully, false otherwise. \end{Desc}


Implements {\bf TPProto::Order\-Parameter} \doxyref{}{p.}{classTPProto_1_1OrderParameter_13caaeef256c8d0d6ea87c02c5c77669}.\index{TPProto::ListParameter@{TPProto::List\-Parameter}!clone@{clone}}
\index{clone@{clone}!TPProto::ListParameter@{TPProto::List\-Parameter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Order\-Parameter} $\ast$ TPProto::List\-Parameter::clone ()\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1ListParameter_2afe9273b3e9e1e102b33e3a6df1fbe5}


Clones this \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter}. 

Just uses the copy constructor. \begin{Desc}
\item[Returns:]A new copy of this \doxyref{List\-Parameter}{p.}{classTPProto_1_1ListParameter}. \end{Desc}


Implements {\bf TPProto::Order\-Parameter} \doxyref{}{p.}{classTPProto_1_1OrderParameter_65d7de52495d6243eb74d4faf9ea8cab}.\index{TPProto::ListParameter@{TPProto::List\-Parameter}!visit@{visit}}
\index{visit@{visit}!TPProto::ListParameter@{TPProto::List\-Parameter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::List\-Parameter::visit ({\bf Order\-Parameter\-Visitor} $\ast$ {\em opv})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1ListParameter_f105b55cb041b779952bc2d8686204fe}


Visits this \doxyref{Order\-Parameter}{p.}{classTPProto_1_1OrderParameter}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em opv}]The \doxyref{Order\-Parameter\-Visitor}{p.}{classTPProto_1_1OrderParameterVisitor} that is trying to visit. \end{description}
\end{Desc}


Implements {\bf TPProto::Order\-Parameter} \doxyref{}{p.}{classTPProto_1_1OrderParameter_bdd5db027c27d8125df24669eba5304c}.\index{TPProto::ListParameter@{TPProto::List\-Parameter}!setSelection@{setSelection}}
\index{setSelection@{setSelection}!TPProto::ListParameter@{TPProto::List\-Parameter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::List\-Parameter::set\-Selection (unsigned int {\em id}, unsigned int {\em num})}\label{classTPProto_1_1ListParameter_e16bf7c13c99d575dcc06ca756a6a108}


Sets one item as selected with a given quanity. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The item id to select. \item[{\em num}]The number of the item to select. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if successful, false if number selected it too big or the item is not found. \end{Desc}
\index{TPProto::ListParameter@{TPProto::List\-Parameter}!getSelection@{getSelection}}
\index{getSelection@{getSelection}!TPProto::ListParameter@{TPProto::List\-Parameter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int TPProto::List\-Parameter::get\-Selection (unsigned int {\em id})}\label{classTPProto_1_1ListParameter_25ffb1f3d4aa0807da68fbbe403e0c08}


Gets the number selected for the given id. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The item id to check. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The number of the item currently selected. \end{Desc}
\index{TPProto::ListParameter@{TPProto::List\-Parameter}!getSelectableList@{getSelectableList}}
\index{getSelectableList@{getSelectableList}!TPProto::ListParameter@{TPProto::List\-Parameter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::map$<$ unsigned int, Selectable\-Element $>$ TPProto::List\-Parameter::get\-Selectable\-List ()}\label{classTPProto_1_1ListParameter_2f6c1322873da89cea5db07e0ad76da3}


Gets the map of Selectable\-Elements. 

\begin{Desc}
\item[Returns:]The map of item ids and Selectable\-Elements. \end{Desc}


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