\hypertarget{classRequirementGroup}{\section{\-Requirement\-Group \-Class \-Reference}
\label{classRequirementGroup}\index{\-Requirement\-Group@{\-Requirement\-Group}}
}


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

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classRequirementGroup_adedc6764af39da4ee200aab17245f191}{\-Requirement\-Group} ()
\item 
std\-::pair$<$ int, int $>$ \hyperlink{classRequirementGroup_af8fac14dc40479d4638011f1e93ee7af}{earliest\-Time} ()
\item 
bool \hyperlink{classRequirementGroup_ae854e168e990efc3f383ad1433f96bf2}{operator==} (const \hyperlink{classRequirementGroup}{\-Requirement\-Group} \&other) const 
\item 
bool \hyperlink{classRequirementGroup_a169df2e9b26c0402d0ea2747d99bddc1}{operator$<$} (const \hyperlink{classRequirementGroup}{\-Requirement\-Group} \&other) const 
\item 
void \hyperlink{classRequirementGroup_a4b721bea0dbd73ac4f2f3c062bc82663}{reserve} (int time)
\item 
bool \hyperlink{classRequirementGroup_adf5f3166cb068fd4d2b3168baa85bbe3}{empty} () const 
\item 
void \hyperlink{classRequirementGroup_acbd0b7d069e553c533c1f51b5804593a}{clear} ()
\item 
\hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classRequirementGroup_a9f470aa565fc7d06cc5ff565108d1868}{get\-Units} () const 
\item 
void \hyperlink{classRequirementGroup_ae7102569fb3f699da7a849757dbc79cc}{add\-Mineral\-Requirement} (int minerals)
\item 
void \hyperlink{classRequirementGroup_ad8043e144f4c22a4f07fb26a602cc19e}{add\-Gas\-Requirement} (int gas)
\item 
void \hyperlink{classRequirementGroup_a683a8e824b2f2becf662d9555d9905fe}{add\-Supply\-Requirement} (int supply)
\item 
void \hyperlink{classRequirementGroup_a537c9e011ee91eec0f6d099d6ff9ff10}{add\-Time\-Requirement} (int time)
\item 
void \hyperlink{classRequirementGroup_a5d9c22fecfb210fc8b0aa738fcdcc1d5}{add\-Unit\-Requirement} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit, int priority, int duration, \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} position=\hyperlink{namespaceBWAPI_1_1Positions_a7275e30a7c9f7113610178d4405dec9a}{\-B\-W\-A\-P\-I\-::\-Positions\-::\-None})
\item 
void \hyperlink{classRequirementGroup_aff41c1dab6f8632eede25970e6c41b48}{add\-Unit\-Filter\-Requirement} (int priority, int duration, \hyperlink{structUnitFilter}{\-Unit\-Filter} unit\-Filter, \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} position=\hyperlink{namespaceBWAPI_1_1Positions_a7275e30a7c9f7113610178d4405dec9a}{\-B\-W\-A\-P\-I\-::\-Positions\-::\-None})
\item 
void \hyperlink{classRequirementGroup_a186adf00bb89235ce38478c184fe1412}{add\-Unit\-Filter\-Requirement} (int priority, int duration, \hyperlink{structUnitFilter}{\-Unit\-Filter} unit\-Filter, int quantity, \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} position=\hyperlink{namespaceBWAPI_1_1Positions_a7275e30a7c9f7113610178d4405dec9a}{\-B\-W\-A\-P\-I\-::\-Positions\-::\-None})
\item 
void \hyperlink{classRequirementGroup_a0ea0a6b772e26fe211b01a2cab4625a1}{add\-Tech\-For\-Type\-Requirement} (\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} unit\-Type)
\item 
void \hyperlink{classRequirementGroup_a2fb5a39340d07325241ade95cd0ff4fb}{add\-Tech\-For\-Type\-Requirement} (\hyperlink{classBWAPI_1_1UpgradeType}{\-B\-W\-A\-P\-I\-::\-Upgrade\-Type} upgrade\-Type, int level)
\item 
void \hyperlink{classRequirementGroup_a2c1ccbaaea1c0cee5402dfc83ce85d4d}{add\-Tech\-For\-Type\-Requirement} (\hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} tech\-Type)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classRequirementGroup_a23e856d141d99b85d9ea209d6527f49d}{recurse\-For\-Unit\-Time} (int \&latest\-Time, std\-::vector$<$ \hyperlink{classRequirement}{\-Requirement} $>$\-::iterator current\-Requirement, int current\-Start\-Time, int current\-End\-Time, std\-::set$<$ \hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} $>$ \&current\-Units)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::vector$<$ \hyperlink{classRequirement}{\-Requirement} $>$ \hyperlink{classRequirementGroup_aa8487de7a41e40bd0310af800ace2543}{m\-Other\-Requirements}
\item 
std\-::vector$<$ \hyperlink{classRequirement}{\-Requirement} $>$ \hyperlink{classRequirementGroup_a14fdeb74200d76cc84ff138d9a7115fc}{m\-Unit\-Requirements}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


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



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


\-Definition at line 5 of file \-Requirement\-Group.\-cpp.


\begin{DoxyCode}
{
}
\end{DoxyCode}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classRequirementGroup_ad8043e144f4c22a4f07fb26a602cc19e}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Gas\-Requirement@{add\-Gas\-Requirement}}
\index{add\-Gas\-Requirement@{add\-Gas\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Gas\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Gas\-Requirement} (
\begin{DoxyParamCaption}
\item[{int}]{gas}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_ad8043e144f4c22a4f07fb26a602cc19e}


\-Definition at line 26 of file \-Requirement\-Group.\-h.



\-References \-Requirement\-Type\-Def\-::\-Gas, and m\-Other\-Requirements.



\-Referenced by \-Morph\-Task\-::update\-Requirements(), \-Upgrade\-Task\-::update\-Requirements(), \-Train\-Task\-::update\-Requirements(), \-Tech\-Task\-::update\-Requirements(), and \-Construction\-Task\-::update\-Requirements().


\begin{DoxyCode}
{ mOtherRequirements.push_back(Requirement(RequirementType(RequirementType::Gas
      ), gas)); }
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_ae7102569fb3f699da7a849757dbc79cc}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Mineral\-Requirement@{add\-Mineral\-Requirement}}
\index{add\-Mineral\-Requirement@{add\-Mineral\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Mineral\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Mineral\-Requirement} (
\begin{DoxyParamCaption}
\item[{int}]{minerals}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_ae7102569fb3f699da7a849757dbc79cc}


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



\-References \-Requirement\-Type\-Def\-::\-Mineral, and m\-Other\-Requirements.



\-Referenced by \-Morph\-Task\-::update\-Requirements(), \-Upgrade\-Task\-::update\-Requirements(), \-Train\-Task\-::update\-Requirements(), \-Tech\-Task\-::update\-Requirements(), and \-Construction\-Task\-::update\-Requirements().


\begin{DoxyCode}
{ mOtherRequirements.push_back(Requirement(RequirementType(
      RequirementType::Mineral), minerals)); }
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_a683a8e824b2f2becf662d9555d9905fe}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Supply\-Requirement@{add\-Supply\-Requirement}}
\index{add\-Supply\-Requirement@{add\-Supply\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Supply\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Supply\-Requirement} (
\begin{DoxyParamCaption}
\item[{int}]{supply}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_a683a8e824b2f2becf662d9555d9905fe}


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



\-References m\-Other\-Requirements, and \-Requirement\-Type\-Def\-::\-Supply.



\-Referenced by \-Morph\-Task\-::update\-Requirements(), \-Train\-Task\-::update\-Requirements(), and \-Construction\-Task\-::update\-Requirements().


\begin{DoxyCode}
{ mOtherRequirements.push_back(Requirement(RequirementType(
      RequirementType::Supply), supply)); }
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_a0ea0a6b772e26fe211b01a2cab4625a1}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Tech\-For\-Type\-Requirement@{add\-Tech\-For\-Type\-Requirement}}
\index{add\-Tech\-For\-Type\-Requirement@{add\-Tech\-For\-Type\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Tech\-For\-Type\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Tech\-For\-Type\-Requirement} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{unit\-Type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_a0ea0a6b772e26fe211b01a2cab4625a1}


\-Definition at line 34 of file \-Requirement\-Group.\-h.



\-References m\-Other\-Requirements.



\-Referenced by \-Morph\-Task\-::update\-Requirements(), \-Upgrade\-Task\-::update\-Requirements(), \-Train\-Task\-::update\-Requirements(), \-Tech\-Task\-::update\-Requirements(), and \-Construction\-Task\-::update\-Requirements().


\begin{DoxyCode}
{ mOtherRequirements.push_back(Requirement(unitType)); }
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_a2fb5a39340d07325241ade95cd0ff4fb}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Tech\-For\-Type\-Requirement@{add\-Tech\-For\-Type\-Requirement}}
\index{add\-Tech\-For\-Type\-Requirement@{add\-Tech\-For\-Type\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Tech\-For\-Type\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Tech\-For\-Type\-Requirement} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Upgrade\-Type}}]{upgrade\-Type, }
\item[{int}]{level}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_a2fb5a39340d07325241ade95cd0ff4fb}


\-Definition at line 35 of file \-Requirement\-Group.\-h.



\-References m\-Other\-Requirements.


\begin{DoxyCode}
{ mOtherRequirements.push_back(Requirement(upgradeType, level)); }
\end{DoxyCode}
\hypertarget{classRequirementGroup_a2c1ccbaaea1c0cee5402dfc83ce85d4d}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Tech\-For\-Type\-Requirement@{add\-Tech\-For\-Type\-Requirement}}
\index{add\-Tech\-For\-Type\-Requirement@{add\-Tech\-For\-Type\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Tech\-For\-Type\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Tech\-For\-Type\-Requirement} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Tech\-Type}}]{tech\-Type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_a2c1ccbaaea1c0cee5402dfc83ce85d4d}


\-Definition at line 36 of file \-Requirement\-Group.\-h.



\-References m\-Other\-Requirements.


\begin{DoxyCode}
{ mOtherRequirements.push_back(Requirement(techType)); }
\end{DoxyCode}
\hypertarget{classRequirementGroup_a537c9e011ee91eec0f6d099d6ff9ff10}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Time\-Requirement@{add\-Time\-Requirement}}
\index{add\-Time\-Requirement@{add\-Time\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Time\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Time\-Requirement} (
\begin{DoxyParamCaption}
\item[{int}]{time}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_a537c9e011ee91eec0f6d099d6ff9ff10}


\-Definition at line 28 of file \-Requirement\-Group.\-h.



\-References m\-Other\-Requirements, and \-Requirement\-Type\-Def\-::\-Time.



\-Referenced by \-Gather\-Task\-::update\-Requirements().


\begin{DoxyCode}
{ mOtherRequirements.push_back(Requirement(RequirementType(RequirementType::Time
      ), time)); }
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_aff41c1dab6f8632eede25970e6c41b48}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Unit\-Filter\-Requirement@{add\-Unit\-Filter\-Requirement}}
\index{add\-Unit\-Filter\-Requirement@{add\-Unit\-Filter\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Unit\-Filter\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Unit\-Filter\-Requirement} (
\begin{DoxyParamCaption}
\item[{int}]{priority, }
\item[{int}]{duration, }
\item[{{\bf \-Unit\-Filter}}]{unit\-Filter, }
\item[{{\bf \-Position}}]{position = {\ttfamily {\bf \-B\-W\-A\-P\-I\-::\-Positions\-::\-None}}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_aff41c1dab6f8632eede25970e6c41b48}


\-Definition at line 31 of file \-Requirement\-Group.\-h.



\-References m\-Unit\-Requirements.



\-Referenced by add\-Unit\-Filter\-Requirement(), \-Morph\-Task\-::update\-Requirements(), \-Upgrade\-Task\-::update\-Requirements(), \-Tech\-Task\-::update\-Requirements(), \-Train\-Task\-::update\-Requirements(), \-Gather\-Task\-::update\-Requirements(), \-Mine\-Blocking\-Mineral\-Task\-::update\-Requirements(), \-Construction\-Task\-::update\-Requirements(), \-Worker\-Scout\-Task\-::update\-Requirements(), \-Observer\-Scout\-Task\-::update\-Requirements(), \-Default\-Squad\-Task\-::update\-Requirements(), and \-Defense\-Squad\-Task\-::update\-Requirements().


\begin{DoxyCode}
{ mUnitRequirements.push_back(Requirement(priority, duration, unitFilter, 
      position)); }
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_a186adf00bb89235ce38478c184fe1412}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Unit\-Filter\-Requirement@{add\-Unit\-Filter\-Requirement}}
\index{add\-Unit\-Filter\-Requirement@{add\-Unit\-Filter\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Unit\-Filter\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Unit\-Filter\-Requirement} (
\begin{DoxyParamCaption}
\item[{int}]{priority, }
\item[{int}]{duration, }
\item[{{\bf \-Unit\-Filter}}]{unit\-Filter, }
\item[{int}]{quantity, }
\item[{{\bf \-Position}}]{position = {\ttfamily {\bf \-B\-W\-A\-P\-I\-::\-Positions\-::\-None}}}
\end{DoxyParamCaption}
)}}\label{classRequirementGroup_a186adf00bb89235ce38478c184fe1412}


\-Definition at line 125 of file \-Requirement\-Group.\-cpp.



\-References add\-Unit\-Filter\-Requirement().


\begin{DoxyCode}
{
        for(int i = 0; i < quantity; ++i)
                addUnitFilterRequirement(priority, duration, unitFilter, 
      position);
}\end{DoxyCode}


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


\hypertarget{classRequirementGroup_a5d9c22fecfb210fc8b0aa738fcdcc1d5}{\index{\-Requirement\-Group@{\-Requirement\-Group}!add\-Unit\-Requirement@{add\-Unit\-Requirement}}
\index{add\-Unit\-Requirement@{add\-Unit\-Requirement}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{add\-Unit\-Requirement}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::add\-Unit\-Requirement} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit, }
\item[{int}]{priority, }
\item[{int}]{duration, }
\item[{{\bf \-Position}}]{position = {\ttfamily {\bf \-B\-W\-A\-P\-I\-::\-Positions\-::\-None}}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classRequirementGroup_a5d9c22fecfb210fc8b0aa738fcdcc1d5}


\-Definition at line 30 of file \-Requirement\-Group.\-h.



\-References m\-Unit\-Requirements.



\-Referenced by \-Default\-Squad\-Task\-::update\-Requirements().


\begin{DoxyCode}
{ mUnitRequirements.push_back(Requirement(priority, duration, unit, position));
       }
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_acbd0b7d069e553c533c1f51b5804593a}{\index{\-Requirement\-Group@{\-Requirement\-Group}!clear@{clear}}
\index{clear@{clear}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::clear} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classRequirementGroup_acbd0b7d069e553c533c1f51b5804593a}


\-Definition at line 101 of file \-Requirement\-Group.\-cpp.



\-References m\-Other\-Requirements, and m\-Unit\-Requirements.


\begin{DoxyCode}
{
        mOtherRequirements.clear();
        mUnitRequirements.clear();
}
\end{DoxyCode}
\hypertarget{classRequirementGroup_af8fac14dc40479d4638011f1e93ee7af}{\index{\-Requirement\-Group@{\-Requirement\-Group}!earliest\-Time@{earliest\-Time}}
\index{earliest\-Time@{earliest\-Time}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{earliest\-Time}]{\setlength{\rightskip}{0pt plus 5cm}std\-::pair$<$ int, int $>$ {\bf \-Requirement\-Group\-::earliest\-Time} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classRequirementGroup_af8fac14dc40479d4638011f1e93ee7af}


\-Definition at line 9 of file \-Requirement\-Group.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Game\-::get\-Frame\-Count(), \-Requirement\-::max\-Time, m\-Other\-Requirements, m\-Unit\-Requirements, and recurse\-For\-Unit\-Time().



\-Referenced by \-Task\-Manager\-Class\-::update\-Requirement().


\begin{DoxyCode}
{
        int latestTime = BWAPI::Broodwar->getFrameCount();

        // Loop through all normal requirements
        for(std::vector<Requirement>::iterator requirement = mOtherRequirements
      .begin(); requirement != mOtherRequirements.end(); ++requirement)
        {
                assert(!requirement->unitRequirement());

                // If the easliest time this requirement is ready is the latest
       yet, save it
                int thisTime = requirement->earliestTime();
                if(thisTime > latestTime)
                        latestTime = thisTime;
        }

        // Recurse through unit requirements
        std::set<Unit> units;
        if(recurseForUnitTime(latestTime, mUnitRequirements.begin(), latestTime
      , Requirement::maxTime, units))
        {
                int biggestDelay = 0;
                // now loop through to find any delay in the execution
                for(std::vector<Requirement>::iterator requirement = 
      mUnitRequirements.begin(); requirement != mUnitRequirements.end(); ++
      requirement)
                {
                        int thisDelay = requirement->getDelay();
                        if(thisDelay > biggestDelay)
                                biggestDelay = thisDelay;
                }

                return std::make_pair(latestTime, biggestDelay);
        }

        // if it didn't find a time, just return
        return std::make_pair(Requirement::maxTime, 0);
}
\end{DoxyCode}


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




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


\hypertarget{classRequirementGroup_adf5f3166cb068fd4d2b3168baa85bbe3}{\index{\-Requirement\-Group@{\-Requirement\-Group}!empty@{empty}}
\index{empty@{empty}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{empty}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Requirement\-Group\-::empty} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{classRequirementGroup_adf5f3166cb068fd4d2b3168baa85bbe3}


\-Definition at line 93 of file \-Requirement\-Group.\-cpp.



\-References m\-Other\-Requirements, and m\-Unit\-Requirements.



\-Referenced by \-Task\-Manager\-Class\-::update\-Requirement().


\begin{DoxyCode}
{
        if(!mOtherRequirements.empty())
                return false;

        return mUnitRequirements.empty();
}
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_a9f470aa565fc7d06cc5ff565108d1868}{\index{\-Requirement\-Group@{\-Requirement\-Group}!get\-Units@{get\-Units}}
\index{get\-Units@{get\-Units}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{get\-Units}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Requirement\-Group\-::get\-Units} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{classRequirementGroup_a9f470aa565fc7d06cc5ff565108d1868}


\-Definition at line 107 of file \-Requirement\-Group.\-cpp.



\-References \-Unit\-Group\-::insert(), and m\-Unit\-Requirements.



\-Referenced by \-Task\-Manager\-Class\-::update\-Requirement().


\begin{DoxyCode}
{
        UnitGroup units;
        for(std::vector<Requirement>::const_iterator requirement = 
      mUnitRequirements.begin(); requirement != mUnitRequirements.end(); ++
      requirement)
                units.insert(requirement->getUnit());

        return units;
}
\end{DoxyCode}


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




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


\hypertarget{classRequirementGroup_a169df2e9b26c0402d0ea2747d99bddc1}{\index{\-Requirement\-Group@{\-Requirement\-Group}!operator$<$@{operator$<$}}
\index{operator$<$@{operator$<$}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{operator$<$}]{\setlength{\rightskip}{0pt plus 5cm}bool \-Requirement\-Group\-::operator$<$ (
\begin{DoxyParamCaption}
\item[{const {\bf \-Requirement\-Group} \&}]{other}
\end{DoxyParamCaption}
) const}}\label{classRequirementGroup_a169df2e9b26c0402d0ea2747d99bddc1}


\-Definition at line 85 of file \-Requirement\-Group.\-cpp.



\-References m\-Other\-Requirements, and m\-Unit\-Requirements.


\begin{DoxyCode}
{
        if(mOtherRequirements < other.mOtherRequirements)
                return true;

        return mUnitRequirements < other.mUnitRequirements;
}
\end{DoxyCode}
\hypertarget{classRequirementGroup_ae854e168e990efc3f383ad1433f96bf2}{\index{\-Requirement\-Group@{\-Requirement\-Group}!operator==@{operator==}}
\index{operator==@{operator==}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}bool \-Requirement\-Group\-::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf \-Requirement\-Group} \&}]{other}
\end{DoxyParamCaption}
) const}}\label{classRequirementGroup_ae854e168e990efc3f383ad1433f96bf2}


\-Definition at line 77 of file \-Requirement\-Group.\-cpp.



\-References m\-Other\-Requirements, and m\-Unit\-Requirements.


\begin{DoxyCode}
{
        if(mOtherRequirements == other.mOtherRequirements)
                return mUnitRequirements == other.mUnitRequirements;

        return false;
}
\end{DoxyCode}
\hypertarget{classRequirementGroup_a23e856d141d99b85d9ea209d6527f49d}{\index{\-Requirement\-Group@{\-Requirement\-Group}!recurse\-For\-Unit\-Time@{recurse\-For\-Unit\-Time}}
\index{recurse\-For\-Unit\-Time@{recurse\-For\-Unit\-Time}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{recurse\-For\-Unit\-Time}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Requirement\-Group\-::recurse\-For\-Unit\-Time} (
\begin{DoxyParamCaption}
\item[{int \&}]{latest\-Time, }
\item[{std\-::vector$<$ {\bf \-Requirement} $>$\-::iterator}]{current\-Requirement, }
\item[{int}]{current\-Start\-Time, }
\item[{int}]{current\-End\-Time, }
\item[{std\-::set$<$ {\bf \-Unit} $>$ \&}]{current\-Units}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classRequirementGroup_a23e856d141d99b85d9ea209d6527f49d}


\-Definition at line 44 of file \-Requirement\-Group.\-cpp.



\-References \-Requirement\-::max\-Time, and m\-Unit\-Requirements.



\-Referenced by earliest\-Time().


\begin{DoxyCode}
{
        // If we have reached the end we have found a time, save it and return
        if(currentRequirement == mUnitRequirements.end())
        {
                latestTime = currentStartTime;
                return true;
        }

        assert(currentRequirement->unitRequirement());

        // get a selection of free times for this requirement
        const std::map<int, int> &unitTimes = currentRequirement->
      earliestUnitTime(currentStartTime, currentEndTime, currentUnits);

        // For each one
        for(std::map<int, int>::const_iterator it = unitTimes.begin(); it != 
      unitTimes.end(); ++it)
        {
                currentUnits.insert(currentRequirement->getUnit());

                int newEndTime = it->second;
                if(newEndTime != Requirement::maxTime)
                        newEndTime += it->first;

                // go to the next requirement with these times to see if it is
       suitable for the rest too
                if(recurseForUnitTime(latestTime, ++(
      std::vector<Requirement>::iterator(currentRequirement)), it->first, newEndTime, currentUnits))
                        return true;

                currentUnits.erase(currentRequirement->getUnit());
        }

        return false;
}
\end{DoxyCode}


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


\hypertarget{classRequirementGroup_a4b721bea0dbd73ac4f2f3c062bc82663}{\index{\-Requirement\-Group@{\-Requirement\-Group}!reserve@{reserve}}
\index{reserve@{reserve}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{reserve}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Requirement\-Group\-::reserve} (
\begin{DoxyParamCaption}
\item[{int}]{time}
\end{DoxyParamCaption}
)}}\label{classRequirementGroup_a4b721bea0dbd73ac4f2f3c062bc82663}


\-Definition at line 116 of file \-Requirement\-Group.\-cpp.



\-References m\-Other\-Requirements, and m\-Unit\-Requirements.



\-Referenced by \-Task\-Manager\-Class\-::update\-Requirement().


\begin{DoxyCode}
{
        for(std::vector<Requirement>::iterator requirement = mOtherRequirements
      .begin(); requirement != mOtherRequirements.end(); ++requirement)
                requirement->reserve(time);

        for(std::vector<Requirement>::iterator requirement = mUnitRequirements.
      begin(); requirement != mUnitRequirements.end(); ++requirement)
                requirement->reserve(time);
}
\end{DoxyCode}


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




\subsection{\-Member \-Data \-Documentation}
\hypertarget{classRequirementGroup_aa8487de7a41e40bd0310af800ace2543}{\index{\-Requirement\-Group@{\-Requirement\-Group}!m\-Other\-Requirements@{m\-Other\-Requirements}}
\index{m\-Other\-Requirements@{m\-Other\-Requirements}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{m\-Other\-Requirements}]{\setlength{\rightskip}{0pt plus 5cm}std\-::vector$<${\bf \-Requirement}$>$ {\bf \-Requirement\-Group\-::m\-Other\-Requirements}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classRequirementGroup_aa8487de7a41e40bd0310af800ace2543}


\-Definition at line 41 of file \-Requirement\-Group.\-h.



\-Referenced by add\-Gas\-Requirement(), add\-Mineral\-Requirement(), add\-Supply\-Requirement(), add\-Tech\-For\-Type\-Requirement(), add\-Time\-Requirement(), clear(), earliest\-Time(), empty(), operator$<$(), operator==(), and reserve().

\hypertarget{classRequirementGroup_a14fdeb74200d76cc84ff138d9a7115fc}{\index{\-Requirement\-Group@{\-Requirement\-Group}!m\-Unit\-Requirements@{m\-Unit\-Requirements}}
\index{m\-Unit\-Requirements@{m\-Unit\-Requirements}!RequirementGroup@{\-Requirement\-Group}}
\subsubsection[{m\-Unit\-Requirements}]{\setlength{\rightskip}{0pt plus 5cm}std\-::vector$<${\bf \-Requirement}$>$ {\bf \-Requirement\-Group\-::m\-Unit\-Requirements}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classRequirementGroup_a14fdeb74200d76cc84ff138d9a7115fc}


\-Definition at line 44 of file \-Requirement\-Group.\-h.



\-Referenced by add\-Unit\-Filter\-Requirement(), add\-Unit\-Requirement(), clear(), earliest\-Time(), empty(), get\-Units(), operator$<$(), operator==(), recurse\-For\-Unit\-Time(), and reserve().



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