\hypertarget{classReservedLocationClass}{\section{\-Reserved\-Location\-Class \-Class \-Reference}
\label{classReservedLocationClass}\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}}
}


{\ttfamily \#include $<$\-Reserved\-Location.\-h$>$}



\-Collaboration diagram for \-Reserved\-Location\-Class\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classReservedLocationClass__coll__graph}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classReservedLocationClass_a956d2acaaa559eedb04bae33a9a38daf}{\-Reserved\-Location\-Class} (\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} type, \hyperlink{ReservedLocation_8h_a6492493e05598f5483be9ef982314a50}{\-Building\-Location} location)
\item 
\hyperlink{classReservedLocationClass_acd7bd3f36dacf6d9dd01b432f1430a29}{\-Reserved\-Location\-Class} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
\hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} \hyperlink{classReservedLocationClass_a05200099980655528c6a8e215876868e}{get\-Tile\-Position} ()
\item 
\hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classReservedLocationClass_a1ccc45ee4589abc6f935d5464638931d}{get\-Position} ()
\item 
\hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base} \hyperlink{classReservedLocationClass_ae563f14fab7429d35451d6ba7465a33f}{get\-Base} ()
\item 
\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} \hyperlink{classReservedLocationClass_ac93a3343ed2c40588a67e112f5c5afc9}{get\-Unit\-Type} ()
\item 
bool \hyperlink{classReservedLocationClass_a0d351fd883360ce9638e347ef449d9fa}{update} ()
\item 
\hyperlink{ReservedLocation_8h_a6492493e05598f5483be9ef982314a50}{\-Building\-Location} \hyperlink{classReservedLocationClass_a3fbdc94e4489b9ea8e25f17817d26242}{get\-Build\-Location} ()
\item 
\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} \hyperlink{classReservedLocationClass_ae131f110672a5c96f47347d94223ab18}{get\-Unit\-Prediction} ()
\item 
bool \hyperlink{classReservedLocationClass_a49f006af68cb482c5a110f0685af516f}{is\-Calculated} ()
\item 
void \hyperlink{classReservedLocationClass_a0a6f13c17f4147fd541a6051c38104fe}{set\-Start\-Time} (int time)
\item 
void \hyperlink{classReservedLocationClass_ab63f4f4df8545e2feade67267f16dd46}{force\-Completed} ()
\end{DoxyCompactItemize}
\subsection*{\-Private \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classReservedLocationClass_ac84882da7e6f92d8ef160dce24c5d9cb}{should\-Free} ()
\item 
void \hyperlink{classReservedLocationClass_a9e63011d57267b98605a292bcb512326}{set\-Tile\-Position} (\hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} position)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{ReservedLocation_8h_a387018cb0be5379daf27a8c63fd5da27}{\-Reservation\-Type} \hyperlink{classReservedLocationClass_a92cc83ba2024f74a9fa7eef45b2c402d}{m\-Type}
\item 
\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} \hyperlink{classReservedLocationClass_a06d5134f80d4ead479fed8c2f158e66f}{m\-Unit\-Type}
\item 
\hyperlink{ReservedLocation_8h_a6492493e05598f5483be9ef982314a50}{\-Building\-Location} \hyperlink{classReservedLocationClass_a8801736bddd2efe9e56259a5f55aee25}{m\-Location}
\item 
\hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base} \hyperlink{classReservedLocationClass_af978b0f2efd59aa5cbeb8012d65d850f}{m\-Base}
\item 
\hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} \hyperlink{classReservedLocationClass_a256bbfbdea2d15ac512ffd3a5798ecc0}{m\-Tile\-Position}
\item 
\hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classReservedLocationClass_a7fc8ce070056327bc27515bdc8636939}{m\-Position}
\item 
\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} \hyperlink{classReservedLocationClass_a71c7e30ff748f70b486829079ae90b6f}{m\-Unit}
\item 
int \hyperlink{classReservedLocationClass_a1f775bf77ff86e7f651459922ca0b331}{m\-Next\-Calculation\-Attempt}
\item 
int \hyperlink{classReservedLocationClass_aabd0fd6ca3ede80c93459d2722b9a834}{m\-Start\-Time}
\item 
\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} \hyperlink{classReservedLocationClass_afb137aa362a1611048a9bdc097f3a954}{m\-Unit\-Prediction}
\item 
bool \hyperlink{classReservedLocationClass_afa0b624e4dd61cba2c7ceff449d4e93b}{m\-Forced\-Completed}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 37 of file \-Reserved\-Location.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classReservedLocationClass_a956d2acaaa559eedb04bae33a9a38daf}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}}
\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{\-Reserved\-Location\-Class}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Reserved\-Location\-Class\-::\-Reserved\-Location\-Class} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{type, }
\item[{{\bf \-Building\-Location}}]{location}
\end{DoxyParamCaption}
)}}\label{classReservedLocationClass_a956d2acaaa559eedb04bae33a9a38daf}


\-Definition at line 9 of file \-Reserved\-Location.\-cpp.


\begin{DoxyCode}
        : mType(ReservationType::BuildingPosition)
        , mUnitType(type)
        , mLocation(location)
        , mTilePosition(BWAPI::TilePositions::None)
        , mPosition(BWAPI::Positions::None)
        , mUnit()
        , mNextCalculationAttempt(0)
        , mBase()
        , mUnitPrediction()
        , mForcedCompleted(false)
        , mStartTime(std::numeric_limits<int>::max())
{
}
\end{DoxyCode}
\hypertarget{classReservedLocationClass_acd7bd3f36dacf6d9dd01b432f1430a29}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}}
\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{\-Reserved\-Location\-Class}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Reserved\-Location\-Class\-::\-Reserved\-Location\-Class} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)}}\label{classReservedLocationClass_acd7bd3f36dacf6d9dd01b432f1430a29}


\-Definition at line 24 of file \-Reserved\-Location.\-cpp.


\begin{DoxyCode}
        : mType(ReservationType::LandingPosition)
        , mUnitType(unit->getType())
        , mLocation(BuildingLocation::None)
        , mTilePosition(BWAPI::TilePositions::None)
        , mPosition(BWAPI::Positions::None)
        , mUnit(unit)
        , mNextCalculationAttempt(0)
        , mBase()
        , mUnitPrediction()
        , mForcedCompleted(false)
        , mStartTime(std::numeric_limits<int>::max())
{
}
\end{DoxyCode}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classReservedLocationClass_ab63f4f4df8545e2feade67267f16dd46}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!force\-Completed@{force\-Completed}}
\index{force\-Completed@{force\-Completed}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{force\-Completed}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Reserved\-Location\-Class\-::force\-Completed} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_ab63f4f4df8545e2feade67267f16dd46}


\-Definition at line 59 of file \-Reserved\-Location.\-h.



\-References m\-Forced\-Completed.


\begin{DoxyCode}
{ mForcedCompleted = true; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_ae563f14fab7429d35451d6ba7465a33f}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!get\-Base@{get\-Base}}
\index{get\-Base@{get\-Base}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{get\-Base}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Base} {\bf \-Reserved\-Location\-Class\-::get\-Base} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_ae563f14fab7429d35451d6ba7465a33f}


\-Definition at line 46 of file \-Reserved\-Location.\-h.



\-References m\-Base.


\begin{DoxyCode}
{ return mBase; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_a3fbdc94e4489b9ea8e25f17817d26242}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!get\-Build\-Location@{get\-Build\-Location}}
\index{get\-Build\-Location@{get\-Build\-Location}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{get\-Build\-Location}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Building\-Location} {\bf \-Reserved\-Location\-Class\-::get\-Build\-Location} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_a3fbdc94e4489b9ea8e25f17817d26242}


\-Definition at line 52 of file \-Reserved\-Location.\-h.



\-References m\-Location.


\begin{DoxyCode}
{ return mLocation; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_a1ccc45ee4589abc6f935d5464638931d}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!get\-Position@{get\-Position}}
\index{get\-Position@{get\-Position}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{get\-Position}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Reserved\-Location\-Class\-::get\-Position} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_a1ccc45ee4589abc6f935d5464638931d}


\-Definition at line 44 of file \-Reserved\-Location.\-h.



\-References m\-Position.


\begin{DoxyCode}
{ return mPosition; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_a05200099980655528c6a8e215876868e}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!get\-Tile\-Position@{get\-Tile\-Position}}
\index{get\-Tile\-Position@{get\-Tile\-Position}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{get\-Tile\-Position}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Tile\-Position} {\bf \-Reserved\-Location\-Class\-::get\-Tile\-Position} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_a05200099980655528c6a8e215876868e}


\-Definition at line 43 of file \-Reserved\-Location.\-h.



\-References m\-Tile\-Position.


\begin{DoxyCode}
{ return mTilePosition; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_ae131f110672a5c96f47347d94223ab18}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!get\-Unit\-Prediction@{get\-Unit\-Prediction}}
\index{get\-Unit\-Prediction@{get\-Unit\-Prediction}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{get\-Unit\-Prediction}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit} {\bf \-Reserved\-Location\-Class\-::get\-Unit\-Prediction} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_ae131f110672a5c96f47347d94223ab18}


\-Definition at line 53 of file \-Reserved\-Location.\-h.



\-References m\-Unit\-Prediction.


\begin{DoxyCode}
{ return mUnitPrediction; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_ac93a3343ed2c40588a67e112f5c5afc9}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!get\-Unit\-Type@{get\-Unit\-Type}}
\index{get\-Unit\-Type@{get\-Unit\-Type}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{get\-Unit\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type} {\bf \-Reserved\-Location\-Class\-::get\-Unit\-Type} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_ac93a3343ed2c40588a67e112f5c5afc9}


\-Definition at line 48 of file \-Reserved\-Location.\-h.



\-References m\-Unit\-Type.


\begin{DoxyCode}
{ return mUnitType; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_a49f006af68cb482c5a110f0685af516f}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!is\-Calculated@{is\-Calculated}}
\index{is\-Calculated@{is\-Calculated}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{is\-Calculated}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Reserved\-Location\-Class\-::is\-Calculated} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classReservedLocationClass_a49f006af68cb482c5a110f0685af516f}


\-Definition at line 55 of file \-Reserved\-Location.\-h.



\-References m\-Tile\-Position, and \-B\-W\-A\-P\-I\-::\-Bullet\-Types\-::\-None.


\begin{DoxyCode}
{ return mTilePosition != BWAPI::TilePositions::None; }
\end{DoxyCode}
\hypertarget{classReservedLocationClass_a0a6f13c17f4147fd541a6051c38104fe}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!set\-Start\-Time@{set\-Start\-Time}}
\index{set\-Start\-Time@{set\-Start\-Time}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{set\-Start\-Time}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Reserved\-Location\-Class\-::set\-Start\-Time} (
\begin{DoxyParamCaption}
\item[{int}]{time}
\end{DoxyParamCaption}
)}}\label{classReservedLocationClass_a0a6f13c17f4147fd541a6051c38104fe}


\-Definition at line 120 of file \-Reserved\-Location.\-cpp.



\-References m\-Start\-Time, and m\-Unit\-Prediction.


\begin{DoxyCode}
{
        mStartTime = time;

        if(mUnitPrediction)
                mUnitPrediction->setBuildTime(time);
}\end{DoxyCode}
\hypertarget{classReservedLocationClass_a9e63011d57267b98605a292bcb512326}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!set\-Tile\-Position@{set\-Tile\-Position}}
\index{set\-Tile\-Position@{set\-Tile\-Position}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{set\-Tile\-Position}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Reserved\-Location\-Class\-::set\-Tile\-Position} (
\begin{DoxyParamCaption}
\item[{{\bf \-Tile\-Position}}]{position}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a9e63011d57267b98605a292bcb512326}


\-Definition at line 39 of file \-Reserved\-Location.\-cpp.



\-References \-Singleton$<$ T $>$\-::\-Instance(), m\-Position, m\-Start\-Time, m\-Tile\-Position, m\-Unit\-Prediction, m\-Unit\-Type, \-B\-W\-A\-P\-I\-::\-Tile\-Positions\-::\-None, \-B\-W\-A\-P\-I\-::\-Positions\-::\-None, \-B\-W\-A\-P\-I\-::\-Bullet\-Types\-::\-None, \-Static\-Units\-::nullunit, \-B\-W\-A\-P\-I\-::\-Unit\-Type\-::tile\-Height(), \-B\-W\-A\-P\-I\-::\-Unit\-Type\-::tile\-Width(), \-B\-W\-A\-P\-I\-::\-Tile\-Position\-::x(), and \-B\-W\-A\-P\-I\-::\-Tile\-Position\-::y().



\-Referenced by update().


\begin{DoxyCode}
{
        mTilePosition = position;
        if(position != BWAPI::TilePositions::None)
                mPosition = Position(position.x()*32+(mUnitType.tileWidth()*16)
      , position.y()*32+(mUnitType.tileHeight()*16));
        else
                mPosition = BWAPI::Positions::None;

        if(mUnitPrediction)
        {
                if(mPosition == BWAPI::Positions::None)
                {
                        UnitPredictor::Instance().deletePrediction(
      mUnitPrediction);
                        mUnitPrediction = StaticUnits::nullunit;
                }
                else
                        mUnitPrediction->setPosition(mPosition);
        }
        else if(mPosition != BWAPI::Positions::None)
        {
                mUnitPrediction = UnitPredictor::Instance().createPrediction(
      mPosition, mUnitType, mStartTime);
                UnitPredictor::Instance().savePrediction(mUnitPrediction);
        }
}
\end{DoxyCode}


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




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


\hypertarget{classReservedLocationClass_ac84882da7e6f92d8ef160dce24c5d9cb}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!should\-Free@{should\-Free}}
\index{should\-Free@{should\-Free}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{should\-Free}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Reserved\-Location\-Class\-::should\-Free} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_ac84882da7e6f92d8ef160dce24c5d9cb}


\-Definition at line 99 of file \-Reserved\-Location.\-cpp.



\-References \-Building\-Location\-Def\-::\-Base, \-Singleton$<$ T $>$\-::\-Instance(), m\-Base, m\-Forced\-Completed, m\-Location, m\-Tile\-Position, m\-Unit\-Prediction, m\-Unit\-Type, and \-B\-W\-A\-P\-I\-::\-Tile\-Positions\-::\-None.



\-Referenced by update().


\begin{DoxyCode}
{
        if(mTilePosition != BWAPI::TilePositions::None)
        {
                if(mForcedCompleted || (mUnitPrediction && mUnitPrediction->
      exists()))
                        return true;

                if(!BuildingPlacer::Instance().isLocationBuildable(mTilePosition
      , mUnitType, true))
                        return true;

                if(mLocation == BuildingLocation::Base)
                {
                        const std::vector<Base> &bases = 
      BuildingPlacer::Instance().baseToBuildAtOrder(mUnitType);
                        if(std::find(bases.begin(), bases.end(), mBase) == 
      bases.end())
                                return true;
                }
        }

        return false;
}
\end{DoxyCode}


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




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


\hypertarget{classReservedLocationClass_a0d351fd883360ce9638e347ef449d9fa}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!update@{update}}
\index{update@{update}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Reserved\-Location\-Class\-::update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classReservedLocationClass_a0d351fd883360ce9638e347ef449d9fa}


\-Definition at line 64 of file \-Reserved\-Location.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-Reservation\-Type\-Def\-::\-Building\-Position, \-B\-W\-A\-P\-I\-::\-Game\-::get\-Frame\-Count(), \-Singleton$<$ T $>$\-::\-Instance(), \-Reservation\-Type\-Def\-::\-Landing\-Position, m\-Base, m\-Forced\-Completed, m\-Location, m\-Next\-Calculation\-Attempt, m\-Tile\-Position, m\-Type, m\-Unit, m\-Unit\-Prediction, m\-Unit\-Type, \-B\-W\-A\-P\-I\-::\-Tile\-Positions\-::\-None, set\-Tile\-Position(), and should\-Free().


\begin{DoxyCode}
{
        bool isFinished = mUnitPrediction && mUnitPrediction->exists();
        if(shouldFree())
        {
                BuildingPlacer::Instance().free(shared_from_this());
                setTilePosition(BWAPI::TilePositions::None);
        }

        if(isFinished || mForcedCompleted)
                return true;

        if(mTilePosition == BWAPI::TilePositions::None && 
      mNextCalculationAttempt <= BWAPI::Broodwar->getFrameCount())
        {
                std::pair<TilePosition, Base> locationPair;
                if(mType == ReservationType::BuildingPosition)
                        locationPair = BuildingPlacer::Instance().
      buildingLocationToTile(mLocation, mUnitType);
                else if(mType == ReservationType::LandingPosition)
                        locationPair = BuildingPlacer::Instance().
      getlandingLocation(mUnit);

                if(locationPair.first == BWAPI::TilePositions::None || 
      BuildingPlacer::Instance().isLocationBuildable(locationPair.first, mUnitType, 
      true))
                {
                        setTilePosition(locationPair.first);
                        mBase = locationPair.second;

                        if(mTilePosition == BWAPI::TilePositions::None)
                                mNextCalculationAttempt = BWAPI::Broodwar->
      getFrameCount() + 24;
                        else
                                BuildingPlacer::Instance().reserve(
      shared_from_this());
                }
        }

        return false;
}
\end{DoxyCode}


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




\subsection{\-Member \-Data \-Documentation}
\hypertarget{classReservedLocationClass_af978b0f2efd59aa5cbeb8012d65d850f}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Base@{m\-Base}}
\index{m\-Base@{m\-Base}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Base}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Base} {\bf \-Reserved\-Location\-Class\-::m\-Base}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_af978b0f2efd59aa5cbeb8012d65d850f}


\-Definition at line 70 of file \-Reserved\-Location.\-h.



\-Referenced by get\-Base(), should\-Free(), and update().

\hypertarget{classReservedLocationClass_afa0b624e4dd61cba2c7ceff449d4e93b}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Forced\-Completed@{m\-Forced\-Completed}}
\index{m\-Forced\-Completed@{m\-Forced\-Completed}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Forced\-Completed}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Reserved\-Location\-Class\-::m\-Forced\-Completed}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_afa0b624e4dd61cba2c7ceff449d4e93b}


\-Definition at line 82 of file \-Reserved\-Location.\-h.



\-Referenced by force\-Completed(), should\-Free(), and update().

\hypertarget{classReservedLocationClass_a8801736bddd2efe9e56259a5f55aee25}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Location@{m\-Location}}
\index{m\-Location@{m\-Location}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Location}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Building\-Location} {\bf \-Reserved\-Location\-Class\-::m\-Location}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a8801736bddd2efe9e56259a5f55aee25}


\-Definition at line 68 of file \-Reserved\-Location.\-h.



\-Referenced by get\-Build\-Location(), should\-Free(), and update().

\hypertarget{classReservedLocationClass_a1f775bf77ff86e7f651459922ca0b331}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Next\-Calculation\-Attempt@{m\-Next\-Calculation\-Attempt}}
\index{m\-Next\-Calculation\-Attempt@{m\-Next\-Calculation\-Attempt}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Next\-Calculation\-Attempt}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Reserved\-Location\-Class\-::m\-Next\-Calculation\-Attempt}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a1f775bf77ff86e7f651459922ca0b331}


\-Definition at line 76 of file \-Reserved\-Location.\-h.



\-Referenced by update().

\hypertarget{classReservedLocationClass_a7fc8ce070056327bc27515bdc8636939}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Position@{m\-Position}}
\index{m\-Position@{m\-Position}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Position}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Reserved\-Location\-Class\-::m\-Position}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a7fc8ce070056327bc27515bdc8636939}


\-Definition at line 72 of file \-Reserved\-Location.\-h.



\-Referenced by get\-Position(), and set\-Tile\-Position().

\hypertarget{classReservedLocationClass_aabd0fd6ca3ede80c93459d2722b9a834}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Start\-Time@{m\-Start\-Time}}
\index{m\-Start\-Time@{m\-Start\-Time}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Start\-Time}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Reserved\-Location\-Class\-::m\-Start\-Time}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_aabd0fd6ca3ede80c93459d2722b9a834}


\-Definition at line 78 of file \-Reserved\-Location.\-h.



\-Referenced by set\-Start\-Time(), and set\-Tile\-Position().

\hypertarget{classReservedLocationClass_a256bbfbdea2d15ac512ffd3a5798ecc0}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Tile\-Position@{m\-Tile\-Position}}
\index{m\-Tile\-Position@{m\-Tile\-Position}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Tile\-Position}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Tile\-Position} {\bf \-Reserved\-Location\-Class\-::m\-Tile\-Position}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a256bbfbdea2d15ac512ffd3a5798ecc0}


\-Definition at line 71 of file \-Reserved\-Location.\-h.



\-Referenced by get\-Tile\-Position(), is\-Calculated(), set\-Tile\-Position(), should\-Free(), and update().

\hypertarget{classReservedLocationClass_a92cc83ba2024f74a9fa7eef45b2c402d}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Type@{m\-Type}}
\index{m\-Type@{m\-Type}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Reservation\-Type} {\bf \-Reserved\-Location\-Class\-::m\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a92cc83ba2024f74a9fa7eef45b2c402d}


\-Definition at line 65 of file \-Reserved\-Location.\-h.



\-Referenced by update().

\hypertarget{classReservedLocationClass_a71c7e30ff748f70b486829079ae90b6f}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Unit@{m\-Unit}}
\index{m\-Unit@{m\-Unit}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit} {\bf \-Reserved\-Location\-Class\-::m\-Unit}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a71c7e30ff748f70b486829079ae90b6f}


\-Definition at line 74 of file \-Reserved\-Location.\-h.



\-Referenced by update().

\hypertarget{classReservedLocationClass_afb137aa362a1611048a9bdc097f3a954}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Unit\-Prediction@{m\-Unit\-Prediction}}
\index{m\-Unit\-Prediction@{m\-Unit\-Prediction}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Unit\-Prediction}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit} {\bf \-Reserved\-Location\-Class\-::m\-Unit\-Prediction}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_afb137aa362a1611048a9bdc097f3a954}


\-Definition at line 80 of file \-Reserved\-Location.\-h.



\-Referenced by get\-Unit\-Prediction(), set\-Start\-Time(), set\-Tile\-Position(), should\-Free(), and update().

\hypertarget{classReservedLocationClass_a06d5134f80d4ead479fed8c2f158e66f}{\index{\-Reserved\-Location\-Class@{\-Reserved\-Location\-Class}!m\-Unit\-Type@{m\-Unit\-Type}}
\index{m\-Unit\-Type@{m\-Unit\-Type}!ReservedLocationClass@{\-Reserved\-Location\-Class}}
\subsubsection[{m\-Unit\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type} {\bf \-Reserved\-Location\-Class\-::m\-Unit\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classReservedLocationClass_a06d5134f80d4ead479fed8c2f158e66f}


\-Definition at line 66 of file \-Reserved\-Location.\-h.



\-Referenced by get\-Unit\-Type(), set\-Tile\-Position(), should\-Free(), and update().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{ReservedLocation_8h}{\-Reserved\-Location.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{ReservedLocation_8cpp}{\-Reserved\-Location.\-cpp}\end{DoxyCompactItemize}
