\hypertarget{classBuildItem}{\section{\-Build\-Item \-Class \-Reference}
\label{classBuildItem}\index{\-Build\-Item@{\-Build\-Item}}
}


{\ttfamily \#include $<$\-Build\-Order.\-h$>$}



\-Collaboration diagram for \-Build\-Item\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classBuildItem__coll__graph}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classBuildItem_a18db86206e8c91054c22e8fb5a397ba3}{\-Build\-Item} (\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} unit\-Type, int count, int build\-I\-D, \hyperlink{Task_8h_a7b31e3712710b22657fc622787547497}{\-Task\-Type} task\-Type, \hyperlink{ReservedLocation_8h_a6492493e05598f5483be9ef982314a50}{\-Building\-Location} location, const std\-::list$<$ \hyperlink{classCallBack}{\-Call\-Back} $>$ \&call\-Backs)
\item 
\hyperlink{classBuildItem_aee03079b4b69700155d13ef31d06d269}{\-Build\-Item} (\hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} tech\-Type, int build\-I\-D, \hyperlink{Task_8h_a7b31e3712710b22657fc622787547497}{\-Task\-Type} task\-Type, const std\-::list$<$ \hyperlink{classCallBack}{\-Call\-Back} $>$ \&call\-Backs)
\item 
\hyperlink{classBuildItem_a0018fbb8042773694a629b739a2fdcbd}{\-Build\-Item} (\hyperlink{classBWAPI_1_1UpgradeType}{\-B\-W\-A\-P\-I\-::\-Upgrade\-Type} upgrade\-Type, int level, int build\-I\-D, \hyperlink{Task_8h_a7b31e3712710b22657fc622787547497}{\-Task\-Type} task\-Type, const std\-::list$<$ \hyperlink{classCallBack}{\-Call\-Back} $>$ \&call\-Backs)
\item 
bool \hyperlink{classBuildItem_ae55ba9990ff79474d1139d84ce3c63ee}{is\-Fulfilled} () const 
\item 
void \hyperlink{classBuildItem_a450eb8912d7c4678269cc4d580c8a775}{remove\-Callback} (int build\-I\-D, \hyperlink{BuildOrder_8h_a7d8e3661c946d552a654973d67fe53ad}{\-Call\-Back\-Type} callback\-Type)
\item 
\hyperlink{Requirement_8h_a10d9e68ef4957f6a76bc93eb32bf2670}{\-Task\-Pointer} \hyperlink{classBuildItem_a6ccb5e08830e8d895f37493c8973c93e}{create\-Task} () const 
\item 
int \hyperlink{classBuildItem_afcc0413bcedb300dbd38a4c00b54a6d2}{get\-I\-D} () const 
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} \hyperlink{classBuildItem_a1abdc6dd4423d20e72550d4d62ac4a5f}{m\-Unit\-Type}
\item 
\hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} \hyperlink{classBuildItem_a51c9283a179160219bc5aa2de64b497e}{m\-Tech\-Type}
\item 
\hyperlink{classBWAPI_1_1UpgradeType}{\-B\-W\-A\-P\-I\-::\-Upgrade\-Type} \hyperlink{classBuildItem_a3ee0e79f3ba07f1ca6cd07ce3ec5f830}{m\-Upgrade\-Type}
\item 
\hyperlink{ReservedLocation_8h_a6492493e05598f5483be9ef982314a50}{\-Building\-Location} \hyperlink{classBuildItem_a36f32d39265c44d677f8a8ebee06b346}{m\-Location}
\item 
int \hyperlink{classBuildItem_aa959e4eb72bec0ccb89c072e4ac6999a}{m\-Number}
\item 
int \hyperlink{classBuildItem_a6f71e2ebfe4d6d0380993786d0988d80}{m\-I\-D}
\item 
\hyperlink{Task_8h_a7b31e3712710b22657fc622787547497}{\-Task\-Type} \hyperlink{classBuildItem_ac62c3812158880f118a26915e23a2ad2}{m\-Task\-Type}
\item 
std\-::list$<$ \hyperlink{classCallBack}{\-Call\-Back} $>$ \hyperlink{classBuildItem_aaa6db7f9e3a7a136a3fb6783b9d3cf4f}{m\-Call\-Backs}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 81 of file \-Build\-Order.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classBuildItem_a18db86206e8c91054c22e8fb5a397ba3}{\index{\-Build\-Item@{\-Build\-Item}!\-Build\-Item@{\-Build\-Item}}
\index{\-Build\-Item@{\-Build\-Item}!BuildItem@{\-Build\-Item}}
\subsubsection[{\-Build\-Item}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Build\-Item\-::\-Build\-Item} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{unit\-Type, }
\item[{int}]{count, }
\item[{int}]{build\-I\-D, }
\item[{{\bf \-Task\-Type}}]{task\-Type, }
\item[{{\bf \-Building\-Location}}]{location, }
\item[{const std\-::list$<$ {\bf \-Call\-Back} $>$ \&}]{call\-Backs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classBuildItem_a18db86206e8c91054c22e8fb5a397ba3}


\-Definition at line 84 of file \-Build\-Order.\-h.


\begin{DoxyCode}
                : mUnitType(unitType)
                , mTechType(BWAPI::TechTypes::None)
                , mUpgradeType(BWAPI::UpgradeTypes::None)
                , mLocation(location)
                , mNumber(count)
                , mID(buildID)
                , mTaskType(taskType)
                , mCallBacks(callBacks)
        {}
\end{DoxyCode}
\hypertarget{classBuildItem_aee03079b4b69700155d13ef31d06d269}{\index{\-Build\-Item@{\-Build\-Item}!\-Build\-Item@{\-Build\-Item}}
\index{\-Build\-Item@{\-Build\-Item}!BuildItem@{\-Build\-Item}}
\subsubsection[{\-Build\-Item}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Build\-Item\-::\-Build\-Item} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Tech\-Type}}]{tech\-Type, }
\item[{int}]{build\-I\-D, }
\item[{{\bf \-Task\-Type}}]{task\-Type, }
\item[{const std\-::list$<$ {\bf \-Call\-Back} $>$ \&}]{call\-Backs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classBuildItem_aee03079b4b69700155d13ef31d06d269}


\-Definition at line 95 of file \-Build\-Order.\-h.


\begin{DoxyCode}
                : mUnitType(BWAPI::UnitTypes::None)
                , mTechType(techType)
                , mUpgradeType(BWAPI::UpgradeTypes::None)
                , mLocation()
                , mNumber()
                , mID(buildID)
                , mTaskType(taskType)
                , mCallBacks(callBacks)
        {}
\end{DoxyCode}
\hypertarget{classBuildItem_a0018fbb8042773694a629b739a2fdcbd}{\index{\-Build\-Item@{\-Build\-Item}!\-Build\-Item@{\-Build\-Item}}
\index{\-Build\-Item@{\-Build\-Item}!BuildItem@{\-Build\-Item}}
\subsubsection[{\-Build\-Item}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Build\-Item\-::\-Build\-Item} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Upgrade\-Type}}]{upgrade\-Type, }
\item[{int}]{level, }
\item[{int}]{build\-I\-D, }
\item[{{\bf \-Task\-Type}}]{task\-Type, }
\item[{const std\-::list$<$ {\bf \-Call\-Back} $>$ \&}]{call\-Backs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classBuildItem_a0018fbb8042773694a629b739a2fdcbd}


\-Definition at line 106 of file \-Build\-Order.\-h.


\begin{DoxyCode}
                : mUnitType(BWAPI::UnitTypes::None)
                , mTechType(BWAPI::TechTypes::None)
                , mUpgradeType(upgradeType)
                , mLocation()
                , mNumber(level)
                , mID(buildID)
                , mTaskType(taskType)
                , mCallBacks(callBacks)
        {}
\end{DoxyCode}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classBuildItem_a6ccb5e08830e8d895f37493c8973c93e}{\index{\-Build\-Item@{\-Build\-Item}!create\-Task@{create\-Task}}
\index{create\-Task@{create\-Task}!BuildItem@{\-Build\-Item}}
\subsubsection[{create\-Task}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Task\-Pointer} {\bf \-Build\-Item\-::create\-Task} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classBuildItem_a6ccb5e08830e8d895f37493c8973c93e}


\-Definition at line 130 of file \-Build\-Order.\-h.



\-References \-Singleton$<$ T $>$\-::\-Instance(), m\-Location, m\-Number, m\-Task\-Type, m\-Tech\-Type, m\-Unit\-Type, m\-Upgrade\-Type, \-B\-W\-A\-P\-I\-::\-Tech\-Types\-::\-None, \-B\-W\-A\-P\-I\-::\-Upgrade\-Types\-::\-None, and \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-None.



\-Referenced by \-Build\-Order\-Manager\-Class\-::handle\-Build\-Item().


\begin{DoxyCode}
        {
                if(mUnitType != BWAPI::UnitTypes::None)
                {
                        for(int i = 0; i < mNumber-1; ++i)
                                TaskManager::Instance().build(mUnitType, 
      mTaskType, mLocation);

                        return TaskManager::Instance().build(mUnitType, 
      mTaskType, mLocation);
                }
                else if(mTechType != BWAPI::TechTypes::None)
                        return TaskManager::Instance().research(mTechType, 
      mTaskType);
                else if(mUpgradeType != BWAPI::UpgradeTypes::None)
                        return TaskManager::Instance().upgrade(mUpgradeType, 
      mNumber, mTaskType);

                return TaskPointer();
        }
\end{DoxyCode}


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




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


\hypertarget{classBuildItem_afcc0413bcedb300dbd38a4c00b54a6d2}{\index{\-Build\-Item@{\-Build\-Item}!get\-I\-D@{get\-I\-D}}
\index{get\-I\-D@{get\-I\-D}!BuildItem@{\-Build\-Item}}
\subsubsection[{get\-I\-D}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Build\-Item\-::get\-I\-D} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classBuildItem_afcc0413bcedb300dbd38a4c00b54a6d2}


\-Definition at line 147 of file \-Build\-Order.\-h.



\-References m\-I\-D.



\-Referenced by \-Build\-Order\-Manager\-Class\-::handle\-Build\-Item().


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


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


\hypertarget{classBuildItem_ae55ba9990ff79474d1139d84ce3c63ee}{\index{\-Build\-Item@{\-Build\-Item}!is\-Fulfilled@{is\-Fulfilled}}
\index{is\-Fulfilled@{is\-Fulfilled}!BuildItem@{\-Build\-Item}}
\subsubsection[{is\-Fulfilled}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Build\-Item\-::is\-Fulfilled} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classBuildItem_ae55ba9990ff79474d1139d84ce3c63ee}


\-Definition at line 117 of file \-Build\-Order.\-h.



\-References m\-Call\-Backs.



\-Referenced by \-Build\-Order\-Manager\-Class\-::change\-Current\-Build().


\begin{DoxyCode}
{ return mCallBacks.empty(); }
\end{DoxyCode}


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


\hypertarget{classBuildItem_a450eb8912d7c4678269cc4d580c8a775}{\index{\-Build\-Item@{\-Build\-Item}!remove\-Callback@{remove\-Callback}}
\index{remove\-Callback@{remove\-Callback}!BuildItem@{\-Build\-Item}}
\subsubsection[{remove\-Callback}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Build\-Item\-::remove\-Callback} (
\begin{DoxyParamCaption}
\item[{int}]{build\-I\-D, }
\item[{{\bf \-Call\-Back\-Type}}]{callback\-Type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classBuildItem_a450eb8912d7c4678269cc4d580c8a775}


\-Definition at line 119 of file \-Build\-Order.\-h.



\-References m\-Call\-Backs.


\begin{DoxyCode}
        {
                for(std::list<CallBack>::iterator callback = mCallBacks.begin()
      ; callback != mCallBacks.end();)
                {
                        if(callback->getID() == buildID && callback->getType() 
      == callbackType)
                                mCallBacks.erase(callback++);
                        else
                                ++callback;
                }
        }
\end{DoxyCode}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classBuildItem_aaa6db7f9e3a7a136a3fb6783b9d3cf4f}{\index{\-Build\-Item@{\-Build\-Item}!m\-Call\-Backs@{m\-Call\-Backs}}
\index{m\-Call\-Backs@{m\-Call\-Backs}!BuildItem@{\-Build\-Item}}
\subsubsection[{m\-Call\-Backs}]{\setlength{\rightskip}{0pt plus 5cm}std\-::list$<${\bf \-Call\-Back}$>$ {\bf \-Build\-Item\-::m\-Call\-Backs}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classBuildItem_aaa6db7f9e3a7a136a3fb6783b9d3cf4f}


\-Definition at line 158 of file \-Build\-Order.\-h.



\-Referenced by is\-Fulfilled(), and remove\-Callback().

\hypertarget{classBuildItem_a6f71e2ebfe4d6d0380993786d0988d80}{\index{\-Build\-Item@{\-Build\-Item}!m\-I\-D@{m\-I\-D}}
\index{m\-I\-D@{m\-I\-D}!BuildItem@{\-Build\-Item}}
\subsubsection[{m\-I\-D}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Build\-Item\-::m\-I\-D}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classBuildItem_a6f71e2ebfe4d6d0380993786d0988d80}


\-Definition at line 155 of file \-Build\-Order.\-h.



\-Referenced by get\-I\-D().

\hypertarget{classBuildItem_a36f32d39265c44d677f8a8ebee06b346}{\index{\-Build\-Item@{\-Build\-Item}!m\-Location@{m\-Location}}
\index{m\-Location@{m\-Location}!BuildItem@{\-Build\-Item}}
\subsubsection[{m\-Location}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Building\-Location} {\bf \-Build\-Item\-::m\-Location}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classBuildItem_a36f32d39265c44d677f8a8ebee06b346}


\-Definition at line 153 of file \-Build\-Order.\-h.



\-Referenced by create\-Task().

\hypertarget{classBuildItem_aa959e4eb72bec0ccb89c072e4ac6999a}{\index{\-Build\-Item@{\-Build\-Item}!m\-Number@{m\-Number}}
\index{m\-Number@{m\-Number}!BuildItem@{\-Build\-Item}}
\subsubsection[{m\-Number}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Build\-Item\-::m\-Number}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classBuildItem_aa959e4eb72bec0ccb89c072e4ac6999a}


\-Definition at line 154 of file \-Build\-Order.\-h.



\-Referenced by create\-Task().

\hypertarget{classBuildItem_ac62c3812158880f118a26915e23a2ad2}{\index{\-Build\-Item@{\-Build\-Item}!m\-Task\-Type@{m\-Task\-Type}}
\index{m\-Task\-Type@{m\-Task\-Type}!BuildItem@{\-Build\-Item}}
\subsubsection[{m\-Task\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Task\-Type} {\bf \-Build\-Item\-::m\-Task\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classBuildItem_ac62c3812158880f118a26915e23a2ad2}


\-Definition at line 156 of file \-Build\-Order.\-h.



\-Referenced by create\-Task().

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


\-Definition at line 151 of file \-Build\-Order.\-h.



\-Referenced by create\-Task().

\hypertarget{classBuildItem_a1abdc6dd4423d20e72550d4d62ac4a5f}{\index{\-Build\-Item@{\-Build\-Item}!m\-Unit\-Type@{m\-Unit\-Type}}
\index{m\-Unit\-Type@{m\-Unit\-Type}!BuildItem@{\-Build\-Item}}
\subsubsection[{m\-Unit\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type} {\bf \-Build\-Item\-::m\-Unit\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classBuildItem_a1abdc6dd4423d20e72550d4d62ac4a5f}


\-Definition at line 150 of file \-Build\-Order.\-h.



\-Referenced by create\-Task().

\hypertarget{classBuildItem_a3ee0e79f3ba07f1ca6cd07ce3ec5f830}{\index{\-Build\-Item@{\-Build\-Item}!m\-Upgrade\-Type@{m\-Upgrade\-Type}}
\index{m\-Upgrade\-Type@{m\-Upgrade\-Type}!BuildItem@{\-Build\-Item}}
\subsubsection[{m\-Upgrade\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-A\-P\-I\-::\-Upgrade\-Type} {\bf \-Build\-Item\-::m\-Upgrade\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classBuildItem_a3ee0e79f3ba07f1ca6cd07ce3ec5f830}


\-Definition at line 152 of file \-Build\-Order.\-h.



\-Referenced by create\-Task().



\-The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{BuildOrder_8h}{\-Build\-Order.\-h}\end{DoxyCompactItemize}
