\section{TPProto::Fleet Class Reference}
\label{classTPProto_1_1Fleet}\index{TPProto::Fleet@{TPProto::Fleet}}
\doxyref{Fleet}{p.}{classTPProto_1_1Fleet} \doxyref{Object}{p.}{classTPProto_1_1Object}.  


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

Inheritance diagram for TPProto::Fleet::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classTPProto_1_1Fleet}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Fleet} ()\label{classTPProto_1_1Fleet_cd0958fb2e31361c637913b64c3d50e5}

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

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
bool {\bf unpack\-Buffer} ({\bf Buffer} $\ast$buf)
\begin{CompactList}\small\item\em Unpacks the \doxyref{Fleet}{p.}{classTPProto_1_1Fleet} \doxyref{Object}{p.}{classTPProto_1_1Object} \doxyref{Frame}{p.}{classTPProto_1_1Frame} from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. \item\end{CompactList}\item 
void {\bf visit} (Object\-Visitor $\ast$vis)
\begin{CompactList}\small\item\em Visit the \doxyref{Fleet}{p.}{classTPProto_1_1Fleet} using an Object\-Visitor. \item\end{CompactList}\item 
int {\bf get\-Owner} ()
\begin{CompactList}\small\item\em Get the playerid of the owner of the fleet. \item\end{CompactList}\item 
unsigned int {\bf get\-Damage} ()
\begin{CompactList}\small\item\em Get the amount of damage done to the fleet. \item\end{CompactList}\item 
int {\bf num\-Ships} (int stype)
\begin{CompactList}\small\item\em Get the number of ships of a type that are in the fleet. \item\end{CompactList}\item 
std::map$<$ int32\_\-t, int32\_\-t $>$ {\bf get\-Ships} () const
\begin{CompactList}\small\item\em Gets a map of shiptype to number of ships. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\doxyref{Fleet}{p.}{classTPProto_1_1Fleet} \doxyref{Object}{p.}{classTPProto_1_1Object}. 



\subsection{Member Function Documentation}
\index{TPProto::Fleet@{TPProto::Fleet}!unpackBuffer@{unpackBuffer}}
\index{unpackBuffer@{unpackBuffer}!TPProto::Fleet@{TPProto::Fleet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Fleet::unpack\-Buffer ({\bf Buffer} $\ast$ {\em buf})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1Fleet_8433094066474256b55e8ad706f44654}


Unpacks the \doxyref{Fleet}{p.}{classTPProto_1_1Fleet} \doxyref{Object}{p.}{classTPProto_1_1Object} \doxyref{Frame}{p.}{classTPProto_1_1Frame} from a \doxyref{Buffer}{p.}{classTPProto_1_1Buffer}. 

\begin{Desc}
\item[Returns:]True if successful, false otherwise. \end{Desc}


Reimplemented from {\bf TPProto::Object} \doxyref{}{p.}{classTPProto_1_1Object_d43ddace5d2485661818e62a044ce2d0}.\index{TPProto::Fleet@{TPProto::Fleet}!visit@{visit}}
\index{visit@{visit}!TPProto::Fleet@{TPProto::Fleet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Fleet::visit (Object\-Visitor $\ast$ {\em vis})}\label{classTPProto_1_1Fleet_54dbbbc9a60cac494fcea9c92cd66cee}


Visit the \doxyref{Fleet}{p.}{classTPProto_1_1Fleet} using an Object\-Visitor. 

Passes the \doxyref{Fleet}{p.}{classTPProto_1_1Fleet} (this) to Object\-Visitor::visit(Fleet$\ast$) method. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em vis}]The Object\-Visitor that wishes to visit this \doxyref{Fleet}{p.}{classTPProto_1_1Fleet}. \end{description}
\end{Desc}
\index{TPProto::Fleet@{TPProto::Fleet}!getOwner@{getOwner}}
\index{getOwner@{getOwner}!TPProto::Fleet@{TPProto::Fleet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TPProto::Fleet::get\-Owner ()}\label{classTPProto_1_1Fleet_2ae97972b33114062062234dd7b3b9d9}


Get the playerid of the owner of the fleet. 

\begin{Desc}
\item[Returns:]The Player\-Id of the owner (-1 if no or unknown owner). \end{Desc}
\index{TPProto::Fleet@{TPProto::Fleet}!getDamage@{getDamage}}
\index{getDamage@{getDamage}!TPProto::Fleet@{TPProto::Fleet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int TPProto::Fleet::get\-Damage ()}\label{classTPProto_1_1Fleet_1ac6b061516fd62bd92fc6925f098402}


Get the amount of damage done to the fleet. 

\begin{Desc}
\item[Returns:]The amount of damage. \end{Desc}
\index{TPProto::Fleet@{TPProto::Fleet}!numShips@{numShips}}
\index{numShips@{numShips}!TPProto::Fleet@{TPProto::Fleet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TPProto::Fleet::num\-Ships (int {\em stype})}\label{classTPProto_1_1Fleet_2e195a5d0bc1ae5382bf1bdd037cb52c}


Get the number of ships of a type that are in the fleet. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em stype}]The type of ship. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The number of ships of the stype type. \end{Desc}
\index{TPProto::Fleet@{TPProto::Fleet}!getShips@{getShips}}
\index{getShips@{getShips}!TPProto::Fleet@{TPProto::Fleet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::map$<$ int32\_\-t, int32\_\-t $>$ TPProto::Fleet::get\-Ships () const}\label{classTPProto_1_1Fleet_0bec41088c09cea3580d83e075bcbc69}


Gets a map of shiptype to number of ships. 

\begin{Desc}
\item[Returns:]A map of shiptype to number of ships. \end{Desc}


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