\hypertarget{classBW_1_1UnitTarget}{\section{\-B\-W\-:\-:\-Unit\-Target \-Class \-Reference}
\label{classBW_1_1UnitTarget}\index{\-B\-W\-::\-Unit\-Target@{\-B\-W\-::\-Unit\-Target}}
}


{\ttfamily \#include $<$\-Unit\-Target.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classBW_1_1UnitTarget_a99b2ba4c2dd6b4f5fb6091794e7df2b4}{\-Unit\-Target} ()
\item 
\hyperlink{classBW_1_1UnitTarget_ae3be9214fde56536ae0749e213d43b50}{\-Unit\-Target} (\hyperlink{classBWAPI_1_1UnitImpl}{\-B\-W\-A\-P\-I\-::\-Unit\-Impl} $\ast$target)
\item 
\hyperlink{classBW_1_1UnitTarget_aab4b8cdd6d5479065c249ec7a8c765c8}{\-Unit\-Target} (\hyperlink{classBW_1_1Unit}{\-B\-W\-::\-Unit} $\ast$target)
\item 
\hyperlink{NewHackUtil_8h_ac8008e9f99a9e3bdd6649ba6fe685975}{u16} \hyperlink{classBW_1_1UnitTarget_aa7ffb4cf037fc2ecdf2ad47492620833}{get\-Target} () const 
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-Representation of pointer to unit in bw structure that uses index (not pointer). \-When pointer to another unit is present in bw structure, it uses two ways to do it 1) \-Pointer to bw memory where is the unit stored (in \-Unit\-Node\-Table) \-This is used for example in \hyperlink{classBW_1_1Unit_a4b5e9be808b5f90dff92b14249cd6577}{\-Unit.\-next}, this representation takes 4 bytes. 2) unit\-Indes in the \-Unit\-Node\-Table, this is used for example in \hyperlink{namespaceBW_1_1Orders}{\-Orders}, the motivation probably was to save network data capacity, as only 2 bytes are needed to store the index. \-But for some unkown reason, value there is unit index + 1 $<$$<$ 11 (1 in the binary code on 11th place) 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classBW_1_1UnitTarget_a99b2ba4c2dd6b4f5fb6091794e7df2b4}{\index{\-B\-W\-::\-Unit\-Target@{\-B\-W\-::\-Unit\-Target}!\-Unit\-Target@{\-Unit\-Target}}
\index{\-Unit\-Target@{\-Unit\-Target}!BW::UnitTarget@{\-B\-W\-::\-Unit\-Target}}
\subsubsection[{\-Unit\-Target}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-::\-Unit\-Target\-::\-Unit\-Target} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classBW_1_1UnitTarget_a99b2ba4c2dd6b4f5fb6091794e7df2b4}
\-Default contructor, sets x and y to 0. \hypertarget{classBW_1_1UnitTarget_ae3be9214fde56536ae0749e213d43b50}{\index{\-B\-W\-::\-Unit\-Target@{\-B\-W\-::\-Unit\-Target}!\-Unit\-Target@{\-Unit\-Target}}
\index{\-Unit\-Target@{\-Unit\-Target}!BW::UnitTarget@{\-B\-W\-::\-Unit\-Target}}
\subsubsection[{\-Unit\-Target}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-::\-Unit\-Target\-::\-Unit\-Target} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Impl} $\ast$}]{target}
\end{DoxyParamCaption}
)}}\label{classBW_1_1UnitTarget_ae3be9214fde56536ae0749e213d43b50}
\-Constructor, takes \hyperlink{namespaceBWAPI}{\-B\-W\-A\-P\-I} unit pointer, and decodes it to bw index type. \hypertarget{classBW_1_1UnitTarget_aab4b8cdd6d5479065c249ec7a8c765c8}{\index{\-B\-W\-::\-Unit\-Target@{\-B\-W\-::\-Unit\-Target}!\-Unit\-Target@{\-Unit\-Target}}
\index{\-Unit\-Target@{\-Unit\-Target}!BW::UnitTarget@{\-B\-W\-::\-Unit\-Target}}
\subsubsection[{\-Unit\-Target}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-::\-Unit\-Target\-::\-Unit\-Target} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-::\-Unit} $\ast$}]{target}
\end{DoxyParamCaption}
)}}\label{classBW_1_1UnitTarget_aab4b8cdd6d5479065c249ec7a8c765c8}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classBW_1_1UnitTarget_aa7ffb4cf037fc2ecdf2ad47492620833}{\index{\-B\-W\-::\-Unit\-Target@{\-B\-W\-::\-Unit\-Target}!get\-Target@{get\-Target}}
\index{get\-Target@{get\-Target}!BW::UnitTarget@{\-B\-W\-::\-Unit\-Target}}
\subsubsection[{get\-Target}]{\setlength{\rightskip}{0pt plus 5cm}{\bf u16} {\bf \-B\-W\-::\-Unit\-Target\-::get\-Target} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{classBW_1_1UnitTarget_aa7ffb4cf037fc2ecdf2ad47492620833}


\-Here is the caller graph for this function\-:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classBW_1_1UnitTarget_aa7ffb4cf037fc2ecdf2ad47492620833_icgraph}
\end{center}
\end{figure}




\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
trunk/bwapi/\-B\-W\-A\-P\-I/\-Source/\-B\-W/\hyperlink{UnitTarget_8h}{\-Unit\-Target.\-h}\item 
trunk/bwapi/\-B\-W\-A\-P\-I/\-Source/\-B\-W/\hyperlink{UnitTarget_8cpp}{\-Unit\-Target.\-cpp}\end{DoxyCompactItemize}
