\hypertarget{classTechTask}{\section{\-Tech\-Task \-Class \-Reference}
\label{classTechTask}\index{\-Tech\-Task@{\-Tech\-Task}}
}


{\ttfamily \#include $<$\-Tech\-Task.\-h$>$}



\-Inheritance diagram for \-Tech\-Task\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{classTechTask__inherit__graph}
\end{center}
\end{figure}


\-Collaboration diagram for \-Tech\-Task\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{classTechTask__coll__graph}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classTechTask_aca6a6c69afdac32ba51c096b08abdd26}{\-Tech\-Task} (\hyperlink{Task_8h_a7b31e3712710b22657fc622787547497}{\-Task\-Type} priority, \hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} type)
\item 
virtual int \hyperlink{classTechTask_a3938310369abc3a2dbf356a623e5f737}{get\-End\-Time} () const 
\item 
virtual int \hyperlink{classTechTask_ae96f0724b792180d09491aeda3123d11}{get\-End\-Time} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual int \hyperlink{classTechTask_ad082d0b3e5f37752d64f455d3eefa1f5}{get\-Priority} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classTechTask_a8afbbc48696cad0155c6d5ed3f45f5c6}{get\-Start\-Location} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classTechTask_adb66be4677efa5058a26ce285dee0f54}{get\-End\-Location} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual bool \hyperlink{classTechTask_aa052cf3e085b2b6b9585492f4c200d1e}{pre\-Update} ()
\item 
virtual bool \hyperlink{classTechTask_ac6085e6fc1bb42523fd0a03e68960c7a}{update} ()
\item 
virtual void \hyperlink{classTechTask_a6168812ba8e437051a6484df244f7833}{update\-Requirements} ()
\item 
virtual bool \hyperlink{classTechTask_a1337bf6e0ecc9b17e8bfce1e11a94505}{waiting\-For\-Unit} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual void \hyperlink{classTechTask_ab4b26292797be3ceec58af720247ceee}{give\-Unit} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
virtual void \hyperlink{classTechTask_ae3f1ad19cfad646eaa66daefd7f5fb2f}{return\-Unit} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
virtual bool \hyperlink{classTechTask_ae1d30d0773822ca6f260fa9e89200559}{morph} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit, \hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} previous\-Type)
\item 
virtual \hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classTechTask_a721410860951a2726fbdea65e9d81729}{get\-Finished\-Units} ()
\item 
virtual std\-::string \hyperlink{classTechTask_a0137e6087129261d660c938d2c69dc45}{get\-Task\-Name} () const 
\item 
virtual std\-::string \hyperlink{classTechTask_a97e6762ff6488854238cb0d78dd2dab3}{get\-Output\-Name} () const 
\item 
virtual void \hyperlink{classTechTask_a417671aefcc4f571b8605bf78a485598}{set\-Required\-Satisfy\-Time} (\hyperlink{classRequirementGroup}{\-Requirement\-Group} requirements, int time, int delay)
\item 
virtual int \hyperlink{classTechTask_aaf86205e01271d79f27559a255029327}{dispatch\-Time} () const 
\item 
virtual int \hyperlink{classTechTask_a2250799a2f7e26294fc3258df6e791ea}{start\-Time} () const 
\item 
virtual bool \hyperlink{classTechTask_aa1ba9aa741731f0c290023649931d981}{has\-Dispatched} () const 
\item 
virtual bool \hyperlink{classTechTask_a9d116b22b4060387fca44ce4e5dc3f2d}{in\-Progress} () const 
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} \hyperlink{classTechTask_a8f0e5481b08ef5e24c47aa6c6fa834d4}{m\-Type}
\item 
\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} \hyperlink{classTechTask_a6cb1c31e1dd2fff96bc6dfbaa5bcf488}{m\-Unit}
\item 
int \hyperlink{classTechTask_a52580f4732b3e40a78011d69f6c9c870}{m\-Required\-Satisfy\-Time}
\item 
bool \hyperlink{classTechTask_adc8dc8e35bd0871a3a128c8fbcc492d5}{m\-Reserved\-Resources}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 7 of file \-Tech\-Task.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classTechTask_aca6a6c69afdac32ba51c096b08abdd26}{\index{\-Tech\-Task@{\-Tech\-Task}!\-Tech\-Task@{\-Tech\-Task}}
\index{\-Tech\-Task@{\-Tech\-Task}!TechTask@{\-Tech\-Task}}
\subsubsection[{\-Tech\-Task}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Tech\-Task\-::\-Tech\-Task} (
\begin{DoxyParamCaption}
\item[{{\bf \-Task\-Type}}]{priority, }
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Tech\-Type}}]{type}
\end{DoxyParamCaption}
)}}\label{classTechTask_aca6a6c69afdac32ba51c096b08abdd26}


\-Definition at line 5 of file \-Tech\-Task.\-cpp.


\begin{DoxyCode}
        : Task(priority)
        , mType(type)
        , mReservedResources(false)
        , mRequiredSatisfyTime(BWAPI::Broodwar->getFrameCount())
{
}
\end{DoxyCode}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classTechTask_aaf86205e01271d79f27559a255029327}{\index{\-Tech\-Task@{\-Tech\-Task}!dispatch\-Time@{dispatch\-Time}}
\index{dispatch\-Time@{dispatch\-Time}!TechTask@{\-Tech\-Task}}
\subsubsection[{dispatch\-Time}]{\setlength{\rightskip}{0pt plus 5cm}virtual int {\bf \-Tech\-Task\-::dispatch\-Time} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classTechTask_aaf86205e01271d79f27559a255029327}


\-Reimplemented from \hyperlink{classTask_ae603a1e9219f50d18be9b1703221ad5a}{\-Task}.



\-Definition at line 36 of file \-Tech\-Task.\-h.



\-References m\-Required\-Satisfy\-Time.


\begin{DoxyCode}
{ return mRequiredSatisfyTime; }
\end{DoxyCode}
\hypertarget{classTechTask_adb66be4677efa5058a26ce285dee0f54}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-End\-Location@{get\-End\-Location}}
\index{get\-End\-Location@{get\-End\-Location}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-End\-Location}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Tech\-Task\-::get\-End\-Location} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_adb66be4677efa5058a26ce285dee0f54}


\-Implements \hyperlink{classTask_ae1c96f2085a7126fb0baf5f039caeee4}{\-Task}.



\-Definition at line 34 of file \-Tech\-Task.\-cpp.


\begin{DoxyCode}
{
        return unit->getPosition();
}
\end{DoxyCode}
\hypertarget{classTechTask_a3938310369abc3a2dbf356a623e5f737}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-End\-Time@{get\-End\-Time}}
\index{get\-End\-Time@{get\-End\-Time}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-End\-Time}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Tech\-Task\-::get\-End\-Time} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_a3938310369abc3a2dbf356a623e5f737}


\-Implements \hyperlink{classTask_a2d89c4f298ec499a3ecc02c45c361f41}{\-Task}.



\-Definition at line 13 of file \-Tech\-Task.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Game\-::get\-Frame\-Count(), \-Requirement\-::max\-Time, m\-Required\-Satisfy\-Time, m\-Type, m\-Unit, and \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::research\-Time().



\-Referenced by get\-End\-Time().


\begin{DoxyCode}
{
        if(mUnit)
                return BWAPI::Broodwar->getFrameCount() + mUnit->
      getRemainingResearchTime();

        if(mRequiredSatisfyTime == Requirement::maxTime)
                return mRequiredSatisfyTime;

        return mRequiredSatisfyTime + mType.researchTime();
}
\end{DoxyCode}


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




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


\hypertarget{classTechTask_ae96f0724b792180d09491aeda3123d11}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-End\-Time@{get\-End\-Time}}
\index{get\-End\-Time@{get\-End\-Time}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-End\-Time}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Tech\-Task\-::get\-End\-Time} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_ae96f0724b792180d09491aeda3123d11}


\-Implements \hyperlink{classTask_afba4a0f2a63ee2bd30b29bee33324982}{\-Task}.



\-Definition at line 24 of file \-Tech\-Task.\-cpp.



\-References get\-End\-Time().


\begin{DoxyCode}
{
        return getEndTime();
}
\end{DoxyCode}


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


\hypertarget{classTechTask_a721410860951a2726fbdea65e9d81729}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-Finished\-Units@{get\-Finished\-Units}}
\index{get\-Finished\-Units@{get\-Finished\-Units}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-Finished\-Units}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Tech\-Task\-::get\-Finished\-Units} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_a721410860951a2726fbdea65e9d81729}


\-Implements \hyperlink{classTask_af44e192b780e39d89c79f40d92a1e2a8}{\-Task}.



\-Definition at line 113 of file \-Tech\-Task.\-cpp.



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


\begin{DoxyCode}
{
        UnitGroup returnUnits;

        if(mUnit)
                returnUnits.insert(mUnit);

        return returnUnits;
}
\end{DoxyCode}


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


\hypertarget{classTechTask_a97e6762ff6488854238cb0d78dd2dab3}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-Output\-Name@{get\-Output\-Name}}
\index{get\-Output\-Name@{get\-Output\-Name}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-Output\-Name}]{\setlength{\rightskip}{0pt plus 5cm}virtual std\-::string {\bf \-Tech\-Task\-::get\-Output\-Name} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classTechTask_a97e6762ff6488854238cb0d78dd2dab3}


\-Implements \hyperlink{classTask_ad6349b722f8dd48bcde4020d225d047b}{\-Task}.



\-Definition at line 32 of file \-Tech\-Task.\-h.



\-References \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::get\-Name(), and m\-Type.


\begin{DoxyCode}
{ return mType.getName(); }
\end{DoxyCode}


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


\hypertarget{classTechTask_ad082d0b3e5f37752d64f455d3eefa1f5}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-Priority@{get\-Priority}}
\index{get\-Priority@{get\-Priority}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-Priority}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Tech\-Task\-::get\-Priority} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_ad082d0b3e5f37752d64f455d3eefa1f5}


\-Implements \hyperlink{classTask_a01453612cced63eaf9e8c1de24742415}{\-Task}.



\-Definition at line 123 of file \-Tech\-Task.\-cpp.


\begin{DoxyCode}
{
        return 40;
}
\end{DoxyCode}
\hypertarget{classTechTask_a8afbbc48696cad0155c6d5ed3f45f5c6}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-Start\-Location@{get\-Start\-Location}}
\index{get\-Start\-Location@{get\-Start\-Location}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-Start\-Location}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Tech\-Task\-::get\-Start\-Location} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_a8afbbc48696cad0155c6d5ed3f45f5c6}


\-Implements \hyperlink{classTask_a5b911073755ecca5536db6c73fb85127}{\-Task}.



\-Definition at line 29 of file \-Tech\-Task.\-cpp.


\begin{DoxyCode}
{
        return unit->getPosition();
}
\end{DoxyCode}
\hypertarget{classTechTask_a0137e6087129261d660c938d2c69dc45}{\index{\-Tech\-Task@{\-Tech\-Task}!get\-Task\-Name@{get\-Task\-Name}}
\index{get\-Task\-Name@{get\-Task\-Name}!TechTask@{\-Tech\-Task}}
\subsubsection[{get\-Task\-Name}]{\setlength{\rightskip}{0pt plus 5cm}virtual std\-::string {\bf \-Tech\-Task\-::get\-Task\-Name} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classTechTask_a0137e6087129261d660c938d2c69dc45}


\-Implements \hyperlink{classTask_ad188a18386ae1120317eac922228ce18}{\-Task}.



\-Definition at line 31 of file \-Tech\-Task.\-h.


\begin{DoxyCode}
{ return "Researching"; }
\end{DoxyCode}
\hypertarget{classTechTask_ab4b26292797be3ceec58af720247ceee}{\index{\-Tech\-Task@{\-Tech\-Task}!give\-Unit@{give\-Unit}}
\index{give\-Unit@{give\-Unit}!TechTask@{\-Tech\-Task}}
\subsubsection[{give\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Tech\-Task\-::give\-Unit} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_ab4b26292797be3ceec58af720247ceee}


\-Implements \hyperlink{classTask_a40f1808c208279c99223c1ce5bc9607d}{\-Task}.



\-Definition at line 79 of file \-Tech\-Task.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::gas\-Price(), \-Singleton$<$ T $>$\-::\-Instance(), \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::mineral\-Price(), m\-Required\-Satisfy\-Time, m\-Reserved\-Resources, m\-Type, m\-Unit, and \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::what\-Researches().


\begin{DoxyCode}
{
        if(unit->getType() == mType.whatResearches())
        {
                mUnit = unit;
                assert(mReservedResources == false);
                ResourceTracker::Instance().reserveCurrentMinerals(
      mRequiredSatisfyTime, mType.mineralPrice());
                ResourceTracker::Instance().reserveCurrentGas(
      mRequiredSatisfyTime, mType.gasPrice());
                mReservedResources = true;
        }
}
\end{DoxyCode}


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


\hypertarget{classTechTask_aa1ba9aa741731f0c290023649931d981}{\index{\-Tech\-Task@{\-Tech\-Task}!has\-Dispatched@{has\-Dispatched}}
\index{has\-Dispatched@{has\-Dispatched}!TechTask@{\-Tech\-Task}}
\subsubsection[{has\-Dispatched}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool {\bf \-Tech\-Task\-::has\-Dispatched} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classTechTask_aa1ba9aa741731f0c290023649931d981}


\-Reimplemented from \hyperlink{classTask_aefd6e8cb4553c8cb14574d3310bfe7d3}{\-Task}.



\-Definition at line 39 of file \-Tech\-Task.\-h.



\-References m\-Unit.


\begin{DoxyCode}
{ return mUnit; }
\end{DoxyCode}
\hypertarget{classTechTask_a9d116b22b4060387fca44ce4e5dc3f2d}{\index{\-Tech\-Task@{\-Tech\-Task}!in\-Progress@{in\-Progress}}
\index{in\-Progress@{in\-Progress}!TechTask@{\-Tech\-Task}}
\subsubsection[{in\-Progress}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool {\bf \-Tech\-Task\-::in\-Progress} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classTechTask_a9d116b22b4060387fca44ce4e5dc3f2d}


\-Reimplemented from \hyperlink{classTask_a9c4d97cf083995bf422db9bcef446ae0}{\-Task}.



\-Definition at line 40 of file \-Tech\-Task.\-h.



\-References m\-Unit.


\begin{DoxyCode}
{ return mUnit && mUnit->isResearching(); }
\end{DoxyCode}
\hypertarget{classTechTask_ae1d30d0773822ca6f260fa9e89200559}{\index{\-Tech\-Task@{\-Tech\-Task}!morph@{morph}}
\index{morph@{morph}!TechTask@{\-Tech\-Task}}
\subsubsection[{morph}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Tech\-Task\-::morph} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit, }
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{previous\-Type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_ae1d30d0773822ca6f260fa9e89200559}


\-Implements \hyperlink{classTask_a084117559b93bfb82c4f6c3b88c6609c}{\-Task}.



\-Definition at line 108 of file \-Tech\-Task.\-cpp.


\begin{DoxyCode}
{
        return true;
}
\end{DoxyCode}
\hypertarget{classTechTask_aa052cf3e085b2b6b9585492f4c200d1e}{\index{\-Tech\-Task@{\-Tech\-Task}!pre\-Update@{pre\-Update}}
\index{pre\-Update@{pre\-Update}!TechTask@{\-Tech\-Task}}
\subsubsection[{pre\-Update}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Tech\-Task\-::pre\-Update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_aa052cf3e085b2b6b9585492f4c200d1e}


\-Implements \hyperlink{classTask_a3cb1ce7dab90a8a2290381f78b665fe4}{\-Task}.



\-Definition at line 39 of file \-Tech\-Task.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-Task\-::complete(), \-Task\-::is\-Canceled(), \-Task\-::is\-Completed(), \-Task\-::is\-Stopped(), m\-Type, m\-Unit, and update\-Requirements().


\begin{DoxyCode}
{
        if(BWAPI::Broodwar->self()->hasResearched(mType))
                complete();

        if((isStopped() || isCanceled() || isCompleted()) && mUnit && !mUnit->
      isResearching())
                return true;

        updateRequirements();

        return false;
}
\end{DoxyCode}


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


\hypertarget{classTechTask_ae3f1ad19cfad646eaa66daefd7f5fb2f}{\index{\-Tech\-Task@{\-Tech\-Task}!return\-Unit@{return\-Unit}}
\index{return\-Unit@{return\-Unit}!TechTask@{\-Tech\-Task}}
\subsubsection[{return\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Tech\-Task\-::return\-Unit} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_ae3f1ad19cfad646eaa66daefd7f5fb2f}


\-Implements \hyperlink{classTask_a34a365e54af1b184d43fcbf7a7730696}{\-Task}.



\-Definition at line 91 of file \-Tech\-Task.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::gas\-Price(), \-Singleton$<$ T $>$\-::\-Instance(), \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::mineral\-Price(), m\-Required\-Satisfy\-Time, m\-Reserved\-Resources, m\-Type, m\-Unit, and \-Static\-Units\-::nullunit.


\begin{DoxyCode}
{
        if(mUnit == unit)
        {
                mUnit = StaticUnits::nullunit;

                if(mReservedResources)
                {
                        ResourceTracker::Instance().releaseCurrentMinerals(
      mRequiredSatisfyTime, mType.mineralPrice());
                        ResourceTracker::Instance().releaseCurrentGas(
      mRequiredSatisfyTime, mType.gasPrice());
                        mReservedResources = false;
                }
        }
        else
                assert(false);
}
\end{DoxyCode}


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


\hypertarget{classTechTask_a417671aefcc4f571b8605bf78a485598}{\index{\-Tech\-Task@{\-Tech\-Task}!set\-Required\-Satisfy\-Time@{set\-Required\-Satisfy\-Time}}
\index{set\-Required\-Satisfy\-Time@{set\-Required\-Satisfy\-Time}!TechTask@{\-Tech\-Task}}
\subsubsection[{set\-Required\-Satisfy\-Time}]{\setlength{\rightskip}{0pt plus 5cm}virtual void {\bf \-Tech\-Task\-::set\-Required\-Satisfy\-Time} (
\begin{DoxyParamCaption}
\item[{{\bf \-Requirement\-Group}}]{requirements, }
\item[{int}]{time, }
\item[{int}]{delay}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classTechTask_a417671aefcc4f571b8605bf78a485598}


\-Reimplemented from \hyperlink{classTask_a54cd8666ee7cf48ba67fb4b358dbb9b1}{\-Task}.



\-Definition at line 34 of file \-Tech\-Task.\-h.



\-References m\-Required\-Satisfy\-Time.


\begin{DoxyCode}
{ mRequiredSatisfyTime = time; }
\end{DoxyCode}
\hypertarget{classTechTask_a2250799a2f7e26294fc3258df6e791ea}{\index{\-Tech\-Task@{\-Tech\-Task}!start\-Time@{start\-Time}}
\index{start\-Time@{start\-Time}!TechTask@{\-Tech\-Task}}
\subsubsection[{start\-Time}]{\setlength{\rightskip}{0pt plus 5cm}virtual int {\bf \-Tech\-Task\-::start\-Time} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classTechTask_a2250799a2f7e26294fc3258df6e791ea}


\-Reimplemented from \hyperlink{classTask_a8e2de3281bb4e79abe983bd0419c71f8}{\-Task}.



\-Definition at line 37 of file \-Tech\-Task.\-h.



\-References m\-Required\-Satisfy\-Time.


\begin{DoxyCode}
{ return mRequiredSatisfyTime; }
\end{DoxyCode}
\hypertarget{classTechTask_ac6085e6fc1bb42523fd0a03e68960c7a}{\index{\-Tech\-Task@{\-Tech\-Task}!update@{update}}
\index{update@{update}!TechTask@{\-Tech\-Task}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Tech\-Task\-::update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_ac6085e6fc1bb42523fd0a03e68960c7a}


\-Implements \hyperlink{classTask_a88e5096a1943df5d72f3329af2bc2562}{\-Task}.



\-Definition at line 52 of file \-Tech\-Task.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::gas\-Price(), \-Task\-::has\-Ended(), \-Singleton$<$ T $>$\-::\-Instance(), \-Task\-::is\-Canceled(), \-Task\-::is\-Paused(), \-Task\-::is\-Stopped(), \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::mineral\-Price(), m\-Required\-Satisfy\-Time, m\-Reserved\-Resources, m\-Type, m\-Unit, and \-Task\-::should\-Return\-Unit().


\begin{DoxyCode}
{
        if(mUnit)
        {
                if(mUnit->isResearching())
                {
                        if(mUnit->getTech() != mType || isStopped() || isPaused
      () || isCanceled())
                                mUnit->cancel();
                        else if(mReservedResources)
                        {
                                ResourceTracker::Instance().
      releaseCurrentMinerals(mRequiredSatisfyTime, mType.mineralPrice());
                                ResourceTracker::Instance().releaseCurrentGas(
      mRequiredSatisfyTime, mType.gasPrice());
                                mReservedResources = false;
                        }
                }
                else if(!shouldReturnUnit())
                        mUnit->research(mType);
        }

        return hasEnded() && !mUnit;
}
\end{DoxyCode}


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


\hypertarget{classTechTask_a6168812ba8e437051a6484df244f7833}{\index{\-Tech\-Task@{\-Tech\-Task}!update\-Requirements@{update\-Requirements}}
\index{update\-Requirements@{update\-Requirements}!TechTask@{\-Tech\-Task}}
\subsubsection[{update\-Requirements}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Tech\-Task\-::update\-Requirements} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_a6168812ba8e437051a6484df244f7833}


\-Reimplemented from \hyperlink{classTask_a939d9adfef004e349e78d5949ba37dd8}{\-Task}.



\-Definition at line 128 of file \-Tech\-Task.\-cpp.



\-References \-Requirement\-Group\-::add\-Gas\-Requirement(), \-Requirement\-Group\-::add\-Mineral\-Requirement(), \-Task\-::add\-Requirement(), \-Requirement\-Group\-::add\-Tech\-For\-Type\-Requirement(), \-Requirement\-Group\-::add\-Unit\-Filter\-Requirement(), \-Task\-::clear\-Requirements(), \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::gas\-Price(), \-Unit\-Filter\-Flags\-::\-Is\-Complete, \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::mineral\-Price(), m\-Reserved\-Resources, m\-Type, m\-Unit, \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::research\-Time(), \-Task\-::should\-Return\-Unit(), and \-B\-W\-A\-P\-I\-::\-Tech\-Type\-::what\-Researches().



\-Referenced by pre\-Update().


\begin{DoxyCode}
{
        clearRequirements();

        if(!mUnit && !shouldReturnUnit())
        {
                RequirementGroup requiredConditions;

                assert(mReservedResources == false);
                requiredConditions.addTechForTypeRequirement(mType);
                requiredConditions.addUnitFilterRequirement(40, mType.
      researchTime(), UnitFilter(mType.whatResearches()) && UnitFilter(
      UnitFilterFlags::IsComplete));
                requiredConditions.addMineralRequirement(mType.mineralPrice());
                requiredConditions.addGasRequirement(mType.gasPrice());

                addRequirement(requiredConditions);
        }
}\end{DoxyCode}


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




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


\hypertarget{classTechTask_a1337bf6e0ecc9b17e8bfce1e11a94505}{\index{\-Tech\-Task@{\-Tech\-Task}!waiting\-For\-Unit@{waiting\-For\-Unit}}
\index{waiting\-For\-Unit@{waiting\-For\-Unit}!TechTask@{\-Tech\-Task}}
\subsubsection[{waiting\-For\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Tech\-Task\-::waiting\-For\-Unit} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classTechTask_a1337bf6e0ecc9b17e8bfce1e11a94505}


\-Implements \hyperlink{classTask_a173eafb86a3d9d6c148d005f7778361c}{\-Task}.



\-Definition at line 74 of file \-Tech\-Task.\-cpp.


\begin{DoxyCode}
{
        return false;
}
\end{DoxyCode}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classTechTask_a52580f4732b3e40a78011d69f6c9c870}{\index{\-Tech\-Task@{\-Tech\-Task}!m\-Required\-Satisfy\-Time@{m\-Required\-Satisfy\-Time}}
\index{m\-Required\-Satisfy\-Time@{m\-Required\-Satisfy\-Time}!TechTask@{\-Tech\-Task}}
\subsubsection[{m\-Required\-Satisfy\-Time}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Tech\-Task\-::m\-Required\-Satisfy\-Time}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classTechTask_a52580f4732b3e40a78011d69f6c9c870}


\-Definition at line 47 of file \-Tech\-Task.\-h.



\-Referenced by dispatch\-Time(), get\-End\-Time(), give\-Unit(), return\-Unit(), set\-Required\-Satisfy\-Time(), start\-Time(), and update().

\hypertarget{classTechTask_adc8dc8e35bd0871a3a128c8fbcc492d5}{\index{\-Tech\-Task@{\-Tech\-Task}!m\-Reserved\-Resources@{m\-Reserved\-Resources}}
\index{m\-Reserved\-Resources@{m\-Reserved\-Resources}!TechTask@{\-Tech\-Task}}
\subsubsection[{m\-Reserved\-Resources}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Tech\-Task\-::m\-Reserved\-Resources}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classTechTask_adc8dc8e35bd0871a3a128c8fbcc492d5}


\-Definition at line 49 of file \-Tech\-Task.\-h.



\-Referenced by give\-Unit(), return\-Unit(), update(), and update\-Requirements().

\hypertarget{classTechTask_a8f0e5481b08ef5e24c47aa6c6fa834d4}{\index{\-Tech\-Task@{\-Tech\-Task}!m\-Type@{m\-Type}}
\index{m\-Type@{m\-Type}!TechTask@{\-Tech\-Task}}
\subsubsection[{m\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-A\-P\-I\-::\-Tech\-Type} {\bf \-Tech\-Task\-::m\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classTechTask_a8f0e5481b08ef5e24c47aa6c6fa834d4}


\-Definition at line 43 of file \-Tech\-Task.\-h.



\-Referenced by get\-End\-Time(), get\-Output\-Name(), give\-Unit(), pre\-Update(), return\-Unit(), update(), and update\-Requirements().

\hypertarget{classTechTask_a6cb1c31e1dd2fff96bc6dfbaa5bcf488}{\index{\-Tech\-Task@{\-Tech\-Task}!m\-Unit@{m\-Unit}}
\index{m\-Unit@{m\-Unit}!TechTask@{\-Tech\-Task}}
\subsubsection[{m\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit} {\bf \-Tech\-Task\-::m\-Unit}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classTechTask_a6cb1c31e1dd2fff96bc6dfbaa5bcf488}


\-Definition at line 45 of file \-Tech\-Task.\-h.



\-Referenced by get\-End\-Time(), get\-Finished\-Units(), give\-Unit(), has\-Dispatched(), in\-Progress(), pre\-Update(), return\-Unit(), update(), and update\-Requirements().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{TechTask_8h}{\-Tech\-Task.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{TechTask_8cpp}{\-Tech\-Task.\-cpp}\end{DoxyCompactItemize}
