\hypertarget{classAdvancedGroup}{\section{\-Advanced\-Group \-Class \-Reference}
\label{classAdvancedGroup}\index{\-Advanced\-Group@{\-Advanced\-Group}}
}


{\ttfamily \#include $<$\-Advanced\-Group.\-h$>$}



\-Collaboration diagram for \-Advanced\-Group\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classAdvancedGroup__coll__graph}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classAdvancedGroup_aaacce776c15aa663eff3dc97eedfc934}{\-Advanced\-Group} ()
\item 
void \hyperlink{classAdvancedGroup_a139e4f38dc14a5ffa344afa69ca3f228}{update} (\hyperlink{classGoal}{\-Goal} goal)
\item 
void \hyperlink{classAdvancedGroup_ad2266fe585328af557a5b8d6539b2ded}{add\-Unit} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
void \hyperlink{classAdvancedGroup_a447cef4c2ff779df42796d7fa3b9c479}{remove\-Units} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classAdvancedGroup_afac907565b35ed1d2623a245ac0733f0}{m\-All\-Units}
\item 
std\-::map$<$ \hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit}, \hyperlink{classBehaviour}{\-Behaviour} $>$ \hyperlink{classAdvancedGroup_aab329c12d0f3d99e1b5d7e3652a3fdb8}{m\-Unit\-Behaviours}
\item 
\hyperlink{classGoal}{\-Goal} \hyperlink{classAdvancedGroup_a9eeeaf3aff4bd70027c4ebb10783a86b}{m\-Last\-Goal}
\item 
\hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classAdvancedGroup_a362b3e818c0f856a0eb10c72c3b56781}{m\-Currect\-Goal\-Group}
\item 
\hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classAdvancedGroup_a2c3b42a66a01effaca056aa5fbbd7420}{m\-Reinforcements}
\item 
std\-::list$<$ std\-::pair\*
$<$ \hyperlink{classUnitGroup}{\-Unit\-Group}, \hyperlink{classGoal}{\-Goal} $>$ $>$ \hyperlink{classAdvancedGroup_aa8427b1a37cb6571604bd49af0eed485}{m\-Stranded\-Units}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 8 of file \-Advanced\-Group.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classAdvancedGroup_aaacce776c15aa663eff3dc97eedfc934}{\index{\-Advanced\-Group@{\-Advanced\-Group}!\-Advanced\-Group@{\-Advanced\-Group}}
\index{\-Advanced\-Group@{\-Advanced\-Group}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{\-Advanced\-Group}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Advanced\-Group\-::\-Advanced\-Group} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classAdvancedGroup_aaacce776c15aa663eff3dc97eedfc934}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classAdvancedGroup_ad2266fe585328af557a5b8d6539b2ded}{\index{\-Advanced\-Group@{\-Advanced\-Group}!add\-Unit@{add\-Unit}}
\index{add\-Unit@{add\-Unit}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{add\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Advanced\-Group\-::add\-Unit} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)}}\label{classAdvancedGroup_ad2266fe585328af557a5b8d6539b2ded}


\-Definition at line 20 of file \-Advanced\-Group.\-cpp.



\-References \-Unit\-Group\-::insert(), m\-All\-Units, m\-Reinforcements, and m\-Unit\-Behaviours.


\begin{DoxyCode}
{
        mUnitBehaviours[unit] = Behaviour(unit);
        mReinforcements.insert(unit);
        mAllUnits.insert(unit);
}
\end{DoxyCode}


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


\hypertarget{classAdvancedGroup_a447cef4c2ff779df42796d7fa3b9c479}{\index{\-Advanced\-Group@{\-Advanced\-Group}!remove\-Units@{remove\-Units}}
\index{remove\-Units@{remove\-Units}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{remove\-Units}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Advanced\-Group\-::remove\-Units} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)}}\label{classAdvancedGroup_a447cef4c2ff779df42796d7fa3b9c479}


\-Definition at line 27 of file \-Advanced\-Group.\-cpp.



\-References \-Unit\-Group\-::erase(), m\-Currect\-Goal\-Group, m\-Reinforcements, m\-Stranded\-Units, and m\-Unit\-Behaviours.


\begin{DoxyCode}
{
        mCurrectGoalGroup.erase(unit);
        mReinforcements.erase(unit);

        for(std::list<std::pair<UnitGroup, Goal>>::iterator it = mStrandedUnits
      .begin(); it != mStrandedUnits.end(); ++it)
                it->first.erase(unit);

        mUnitBehaviours[unit].onDeleted();
        mUnitBehaviours.erase(unit);
}\end{DoxyCode}


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


\hypertarget{classAdvancedGroup_a139e4f38dc14a5ffa344afa69ca3f228}{\index{\-Advanced\-Group@{\-Advanced\-Group}!update@{update}}
\index{update@{update}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Advanced\-Group\-::update} (
\begin{DoxyParamCaption}
\item[{{\bf \-Goal}}]{goal}
\end{DoxyParamCaption}
)}}\label{classAdvancedGroup_a139e4f38dc14a5ffa344afa69ca3f228}


\-Definition at line 3 of file \-Advanced\-Group.\-cpp.



\-References \-Unit\-Group\-::count(), \-Unit\-Group\-::empty(), \-Unit\-Group\-::get\-Closest\-Unit(), \-Goal\-::get\-Position\-For\-Merge(), m\-All\-Units, m\-Currect\-Goal\-Group, and m\-Last\-Goal.


\begin{DoxyCode}
{
        // Reshuffle the groups
        // closest unit to the goal is start of that group

        if(mAllUnits.empty())
                return;

        Unit closestUnit = mAllUnits.getClosestUnit(goal.getPositionForMerge())
      ;
        if(mCurrectGoalGroup.count(closestUnit) == 0)
        {
                ;
        }

        mLastGoal = goal;
}
\end{DoxyCode}


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




\subsection{\-Member \-Data \-Documentation}
\hypertarget{classAdvancedGroup_afac907565b35ed1d2623a245ac0733f0}{\index{\-Advanced\-Group@{\-Advanced\-Group}!m\-All\-Units@{m\-All\-Units}}
\index{m\-All\-Units@{m\-All\-Units}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{m\-All\-Units}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Advanced\-Group\-::m\-All\-Units}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classAdvancedGroup_afac907565b35ed1d2623a245ac0733f0}


\-Definition at line 19 of file \-Advanced\-Group.\-h.



\-Referenced by add\-Unit(), and update().

\hypertarget{classAdvancedGroup_a362b3e818c0f856a0eb10c72c3b56781}{\index{\-Advanced\-Group@{\-Advanced\-Group}!m\-Currect\-Goal\-Group@{m\-Currect\-Goal\-Group}}
\index{m\-Currect\-Goal\-Group@{m\-Currect\-Goal\-Group}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{m\-Currect\-Goal\-Group}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Advanced\-Group\-::m\-Currect\-Goal\-Group}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classAdvancedGroup_a362b3e818c0f856a0eb10c72c3b56781}


\-Definition at line 23 of file \-Advanced\-Group.\-h.



\-Referenced by remove\-Units(), and update().

\hypertarget{classAdvancedGroup_a9eeeaf3aff4bd70027c4ebb10783a86b}{\index{\-Advanced\-Group@{\-Advanced\-Group}!m\-Last\-Goal@{m\-Last\-Goal}}
\index{m\-Last\-Goal@{m\-Last\-Goal}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{m\-Last\-Goal}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Goal} {\bf \-Advanced\-Group\-::m\-Last\-Goal}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classAdvancedGroup_a9eeeaf3aff4bd70027c4ebb10783a86b}


\-Definition at line 22 of file \-Advanced\-Group.\-h.



\-Referenced by update().

\hypertarget{classAdvancedGroup_a2c3b42a66a01effaca056aa5fbbd7420}{\index{\-Advanced\-Group@{\-Advanced\-Group}!m\-Reinforcements@{m\-Reinforcements}}
\index{m\-Reinforcements@{m\-Reinforcements}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{m\-Reinforcements}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Advanced\-Group\-::m\-Reinforcements}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classAdvancedGroup_a2c3b42a66a01effaca056aa5fbbd7420}


\-Definition at line 25 of file \-Advanced\-Group.\-h.



\-Referenced by add\-Unit(), and remove\-Units().

\hypertarget{classAdvancedGroup_aa8427b1a37cb6571604bd49af0eed485}{\index{\-Advanced\-Group@{\-Advanced\-Group}!m\-Stranded\-Units@{m\-Stranded\-Units}}
\index{m\-Stranded\-Units@{m\-Stranded\-Units}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{m\-Stranded\-Units}]{\setlength{\rightskip}{0pt plus 5cm}std\-::list$<$std\-::pair$<${\bf \-Unit\-Group}, {\bf \-Goal}$>$ $>$ {\bf \-Advanced\-Group\-::m\-Stranded\-Units}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classAdvancedGroup_aa8427b1a37cb6571604bd49af0eed485}


\-Definition at line 27 of file \-Advanced\-Group.\-h.



\-Referenced by remove\-Units().

\hypertarget{classAdvancedGroup_aab329c12d0f3d99e1b5d7e3652a3fdb8}{\index{\-Advanced\-Group@{\-Advanced\-Group}!m\-Unit\-Behaviours@{m\-Unit\-Behaviours}}
\index{m\-Unit\-Behaviours@{m\-Unit\-Behaviours}!AdvancedGroup@{\-Advanced\-Group}}
\subsubsection[{m\-Unit\-Behaviours}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Unit}, {\bf \-Behaviour}$>$ {\bf \-Advanced\-Group\-::m\-Unit\-Behaviours}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classAdvancedGroup_aab329c12d0f3d99e1b5d7e3652a3fdb8}


\-Definition at line 20 of file \-Advanced\-Group.\-h.



\-Referenced by add\-Unit(), and remove\-Units().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{AdvancedGroup_8h}{\-Advanced\-Group.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{AdvancedGroup_8cpp}{\-Advanced\-Group.\-cpp}\end{DoxyCompactItemize}
