\hypertarget{classPylonPowerTrackerClass}{\section{\-Pylon\-Power\-Tracker\-Class \-Class \-Reference}
\label{classPylonPowerTrackerClass}\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}}
}


{\ttfamily \#include $<$\-Pylon\-Power\-Tracker.\-h$>$}



\-Collaboration diagram for \-Pylon\-Power\-Tracker\-Class\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{classPylonPowerTrackerClass__coll__graph}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classPylonPowerTrackerClass_ab7568111edc9996fc6da1d176fce3df5}{\-Pylon\-Power\-Tracker\-Class} ()
\item 
void \hyperlink{classPylonPowerTrackerClass_ae5d7632e019559e0505cd830802f4a32}{update} ()
\item 
void \hyperlink{classPylonPowerTrackerClass_a1b220fe5cc32d4e920fbeefc60fb84f4}{on\-Discover} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
void \hyperlink{classPylonPowerTrackerClass_a10bbfabc32507e78706b463954c23746}{on\-Morph\-Renegade} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit, \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} previous\-Player, \hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} previous\-Type)
\item 
void \hyperlink{classPylonPowerTrackerClass_a810fc1ed61ac3e7ba9c92de99ede0ed5}{on\-Destroy} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
bool \hyperlink{classPylonPowerTrackerClass_a57345ef6eede8e5400077cd6b735af5c}{has\-Power} (\hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} tile, \hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} unit)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classPylonPowerTrackerClass_aeec310366853740e563872ecc39b449b}{on\-Add\-Pylon} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
void \hyperlink{classPylonPowerTrackerClass_a8e3dd3104845e8cd952b7d7b8ec6de71}{on\-Remove\-Pylon} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
void \hyperlink{classPylonPowerTrackerClass_a71b238de1071fb21785000d747e06218}{add\-To\-Power\-Field} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
void \hyperlink{classPylonPowerTrackerClass_aecb4b8a27419aa0ca62894cfd6697dec}{remove\-From\-Power\-Field} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classPylonPowerTrackerClass_a5a53bb1e88c0ff263aa93e2ca3aa7d82}{m\-Pylons}
\item 
\hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classPylonPowerTrackerClass_a2bcd66b6c2e6eb3d001a47adb7dfbb58}{m\-Lifted\-Buildings}
\item 
std\-::map$<$ \hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit}, std\-::set\*
$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} $>$ $>$ \hyperlink{classPylonPowerTrackerClass_ac0feae92a3f28d67b5d1fd1e68fd0218}{m\-Pylon\-Small\-Power\-Sites}
\item 
std\-::map$<$ \hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit}, std\-::set\*
$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} $>$ $>$ \hyperlink{classPylonPowerTrackerClass_a127b2032ca92db8351dbca757b0e278c}{m\-Pylon\-Medium\-Power\-Sites}
\item 
std\-::map$<$ \hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit}, std\-::set\*
$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} $>$ $>$ \hyperlink{classPylonPowerTrackerClass_a33e52f190c42b8752d50bfc4cf98c625}{m\-Pylon\-Large\-Power\-Sites}
\item 
std\-::map$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position}, int $>$ \hyperlink{classPylonPowerTrackerClass_ac7bfcedad8a03f3af1881f530e4601fc}{m\-Small\-Power\-Sites}
\item 
std\-::map$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position}, int $>$ \hyperlink{classPylonPowerTrackerClass_afb13a4e8bafd0d20cbfc7a4a9bc8af53}{m\-Medium\-Power\-Sites}
\item 
std\-::map$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position}, int $>$ \hyperlink{classPylonPowerTrackerClass_adf56f198724cc9cbe81b927f6d2365ce}{m\-Large\-Power\-Sites}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 8 of file \-Pylon\-Power\-Tracker.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classPylonPowerTrackerClass_ab7568111edc9996fc6da1d176fce3df5}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}}
\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{\-Pylon\-Power\-Tracker\-Class}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Pylon\-Power\-Tracker\-Class\-::\-Pylon\-Power\-Tracker\-Class} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classPylonPowerTrackerClass_ab7568111edc9996fc6da1d176fce3df5}


\-Definition at line 11 of file \-Pylon\-Power\-Tracker.\-h.


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


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classPylonPowerTrackerClass_a71b238de1071fb21785000d747e06218}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!add\-To\-Power\-Field@{add\-To\-Power\-Field}}
\index{add\-To\-Power\-Field@{add\-To\-Power\-Field}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{add\-To\-Power\-Field}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::add\-To\-Power\-Field} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_a71b238de1071fb21785000d747e06218}


\-Definition at line 54 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References m\-Large\-Power\-Sites, m\-Medium\-Power\-Sites, m\-Pylon\-Large\-Power\-Sites, m\-Pylon\-Medium\-Power\-Sites, m\-Pylon\-Small\-Power\-Sites, m\-Small\-Power\-Sites, \-B\-W\-A\-P\-I\-::\-Tile\-Position\-::x(), and \-B\-W\-A\-P\-I\-::\-Tile\-Position\-::y().



\-Referenced by on\-Add\-Pylon(), and update().


\begin{DoxyCode}
{
        const TilePosition &pylonTile = unit->getTilePosition();
        for(int x = 0; x <= 15; ++x)
        {
                for(int y = 0; y <= 9; ++y)
                {
                        bool inRangeSmall = false;
                        bool inRangeMedium = false;
                        bool inRangeLarge = false;

                        switch(y)
                        {
                        case 0:
                                if(x >= 4 && x <= 9)
                                        inRangeLarge = true;
                                break;
                        case 1:
                        case 8:
                                if(x >= 2 && x <= 13)
                                {
                                        inRangeSmall = true;
                                        inRangeMedium = true;
                                }
                                if(x >= 1 && x <= 12)
                                        inRangeLarge = true;
                                break;
                        case 2:
                        case 7:
                                if(x >= 1 && x <= 14)
                                {
                                        inRangeSmall = true;
                                        inRangeMedium = true;
                                }
                                if(x <= 13)
                                        inRangeLarge = true;
                                break;
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                                if(x >= 1)
                                        inRangeSmall = true;
                                inRangeMedium = true;
                                if(x <= 14)
                                        inRangeLarge = true;
                                break;
                        case 9:
                                if(x >= 5 && x <= 10) 
                                {
                                        inRangeSmall = true;
                                        inRangeMedium = true;
                                }
                                if(x >= 4 && x <= 9)
                                        inRangeLarge = true;
                                break;
                        }

                        const TilePosition tile(pylonTile.x() + x - 8, 
      pylonTile.y() + y - 5);

                        if(inRangeSmall)
                        {
                                mSmallPowerSites[tile]++;
                                mPylonSmallPowerSites[unit].insert(tile);
                        }

                        if(inRangeMedium)
                        {
                                mMediumPowerSites[tile]++;
                                mPylonMediumPowerSites[unit].insert(tile);
                        }

                        if(inRangeLarge)
                        {
                                mLargePowerSites[tile]++;
                                mPylonLargePowerSites[unit].insert(tile);
                        }
                }
        }
}
\end{DoxyCode}


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




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


\hypertarget{classPylonPowerTrackerClass_a57345ef6eede8e5400077cd6b735af5c}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!has\-Power@{has\-Power}}
\index{has\-Power@{has\-Power}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{has\-Power}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Pylon\-Power\-Tracker\-Class\-::has\-Power} (
\begin{DoxyParamCaption}
\item[{{\bf \-Tile\-Position}}]{tile, }
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{unit}
\end{DoxyParamCaption}
)}}\label{classPylonPowerTrackerClass_a57345ef6eede8e5400077cd6b735af5c}


\-Definition at line 168 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References m\-Large\-Power\-Sites, m\-Medium\-Power\-Sites, m\-Small\-Power\-Sites, \-B\-W\-A\-P\-I\-::\-Unit\-Type\-::tile\-Height(), and \-B\-W\-A\-P\-I\-::\-Unit\-Type\-::tile\-Width().


\begin{DoxyCode}
{
        if(unit.tileHeight() == 2 && unit.tileWidth() == 2)
                return mSmallPowerSites.count(tile) != 0;
        else if(unit.tileHeight() == 2 && unit.tileWidth() == 3)
                return mMediumPowerSites.count(tile) != 0;
        else if(unit.tileHeight() == 3 && unit.tileWidth() == 4)
                return mLargePowerSites.count(tile) != 0;

        return false;
}\end{DoxyCode}


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


\hypertarget{classPylonPowerTrackerClass_aeec310366853740e563872ecc39b449b}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!on\-Add\-Pylon@{on\-Add\-Pylon}}
\index{on\-Add\-Pylon@{on\-Add\-Pylon}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{on\-Add\-Pylon}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::on\-Add\-Pylon} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_aeec310366853740e563872ecc39b449b}


\-Definition at line 33 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References add\-To\-Power\-Field(), \-Unit\-Group\-::count(), \-Unit\-Group\-::insert(), and m\-Pylons.



\-Referenced by on\-Discover().


\begin{DoxyCode}
{
        if(mPylons.count(unit) != 0)
                return;

        mPylons.insert(unit);

        if(unit->isCompleted())
                addToPowerField(unit);
}
\end{DoxyCode}


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




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


\hypertarget{classPylonPowerTrackerClass_a810fc1ed61ac3e7ba9c92de99ede0ed5}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!on\-Destroy@{on\-Destroy}}
\index{on\-Destroy@{on\-Destroy}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{on\-Destroy}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::on\-Destroy} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)}}\label{classPylonPowerTrackerClass_a810fc1ed61ac3e7ba9c92de99ede0ed5}


\-Definition at line 28 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References on\-Remove\-Pylon().


\begin{DoxyCode}
{
        onRemovePylon(unit);
}
\end{DoxyCode}


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


\hypertarget{classPylonPowerTrackerClass_a1b220fe5cc32d4e920fbeefc60fb84f4}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!on\-Discover@{on\-Discover}}
\index{on\-Discover@{on\-Discover}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{on\-Discover}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::on\-Discover} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)}}\label{classPylonPowerTrackerClass_a1b220fe5cc32d4e920fbeefc60fb84f4}


\-Definition at line 17 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Player\-::get\-Type(), on\-Add\-Pylon(), \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Protoss\-\_\-\-Pylon, and \-B\-W\-A\-P\-I\-::\-Game\-::self().


\begin{DoxyCode}
{
        if(unit->getPlayer() == BWAPI::Broodwar->self() && unit->getType() == 
      BWAPI::UnitTypes::Protoss_Pylon)
                onAddPylon(unit);
}
\end{DoxyCode}


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


\hypertarget{classPylonPowerTrackerClass_a10bbfabc32507e78706b463954c23746}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!on\-Morph\-Renegade@{on\-Morph\-Renegade}}
\index{on\-Morph\-Renegade@{on\-Morph\-Renegade}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{on\-Morph\-Renegade}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::on\-Morph\-Renegade} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit, }
\item[{{\bf \-Player}}]{previous\-Player, }
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{previous\-Type}
\end{DoxyParamCaption}
)}}\label{classPylonPowerTrackerClass_a10bbfabc32507e78706b463954c23746}


\-Definition at line 23 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References on\-Remove\-Pylon().


\begin{DoxyCode}
{
        onRemovePylon(unit);
}
\end{DoxyCode}


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


\hypertarget{classPylonPowerTrackerClass_a8e3dd3104845e8cd952b7d7b8ec6de71}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!on\-Remove\-Pylon@{on\-Remove\-Pylon}}
\index{on\-Remove\-Pylon@{on\-Remove\-Pylon}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{on\-Remove\-Pylon}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::on\-Remove\-Pylon} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_a8e3dd3104845e8cd952b7d7b8ec6de71}


\-Definition at line 44 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References \-Unit\-Group\-::count(), \-Unit\-Group\-::erase(), m\-Pylons, and remove\-From\-Power\-Field().



\-Referenced by on\-Destroy(), and on\-Morph\-Renegade().


\begin{DoxyCode}
{
        if(mPylons.count(unit) == 0)
                return;

        mPylons.erase(unit);

        removeFromPowerField(unit);
}
\end{DoxyCode}


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




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


\hypertarget{classPylonPowerTrackerClass_aecb4b8a27419aa0ca62894cfd6697dec}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!remove\-From\-Power\-Field@{remove\-From\-Power\-Field}}
\index{remove\-From\-Power\-Field@{remove\-From\-Power\-Field}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{remove\-From\-Power\-Field}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::remove\-From\-Power\-Field} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_aecb4b8a27419aa0ca62894cfd6697dec}


\-Definition at line 135 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References m\-Large\-Power\-Sites, m\-Medium\-Power\-Sites, m\-Pylon\-Large\-Power\-Sites, m\-Pylon\-Medium\-Power\-Sites, m\-Pylon\-Small\-Power\-Sites, and m\-Small\-Power\-Sites.



\-Referenced by on\-Remove\-Pylon().


\begin{DoxyCode}
{
        for each(TilePosition tile in mPylonSmallPowerSites[unit])
        {
                std::map<TilePosition, int>::iterator it = mSmallPowerSites.
      find(tile);
                --it->second;

                if(it->second == 0)
                        mSmallPowerSites.erase(it);
        }
        mPylonSmallPowerSites.erase(unit);

        for each(TilePosition tile in mPylonMediumPowerSites[unit])
        {
                std::map<TilePosition, int>::iterator it = mMediumPowerSites.
      find(tile);
                --it->second;

                if(it->second == 0)
                        mMediumPowerSites.erase(it);
        }
        mPylonMediumPowerSites.erase(unit);

        for each(TilePosition tile in mPylonLargePowerSites[unit])
        {
                std::map<TilePosition, int>::iterator it = mLargePowerSites.
      find(tile);
                --it->second;

                if(it->second == 0)
                        mLargePowerSites.erase(it);
        }
        mPylonLargePowerSites.erase(unit);
}
\end{DoxyCode}


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


\hypertarget{classPylonPowerTrackerClass_ae5d7632e019559e0505cd830802f4a32}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!update@{update}}
\index{update@{update}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Pylon\-Power\-Tracker\-Class\-::update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classPylonPowerTrackerClass_ae5d7632e019559e0505cd830802f4a32}


\-Definition at line 5 of file \-Pylon\-Power\-Tracker.\-cpp.



\-References add\-To\-Power\-Field(), \-Unit\-Group\-::empty(), m\-Pylons, and m\-Pylon\-Small\-Power\-Sites.


\begin{DoxyCode}
{
        if(mPylons.empty())
                return;

        for each(Unit pylon in mPylons)
        {
                if(pylon->isCompleted() && mPylonSmallPowerSites.count(pylon) =
      = 0)
                        addToPowerField(pylon);
        }
}
\end{DoxyCode}


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




\subsection{\-Member \-Data \-Documentation}
\hypertarget{classPylonPowerTrackerClass_adf56f198724cc9cbe81b927f6d2365ce}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Large\-Power\-Sites@{m\-Large\-Power\-Sites}}
\index{m\-Large\-Power\-Sites@{m\-Large\-Power\-Sites}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Large\-Power\-Sites}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Tile\-Position}, int$>$ {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Large\-Power\-Sites}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_adf56f198724cc9cbe81b927f6d2365ce}


\-Definition at line 32 of file \-Pylon\-Power\-Tracker.\-h.



\-Referenced by add\-To\-Power\-Field(), has\-Power(), and remove\-From\-Power\-Field().

\hypertarget{classPylonPowerTrackerClass_a2bcd66b6c2e6eb3d001a47adb7dfbb58}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Lifted\-Buildings@{m\-Lifted\-Buildings}}
\index{m\-Lifted\-Buildings@{m\-Lifted\-Buildings}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Lifted\-Buildings}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Lifted\-Buildings}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_a2bcd66b6c2e6eb3d001a47adb7dfbb58}


\-Definition at line 24 of file \-Pylon\-Power\-Tracker.\-h.

\hypertarget{classPylonPowerTrackerClass_afb13a4e8bafd0d20cbfc7a4a9bc8af53}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Medium\-Power\-Sites@{m\-Medium\-Power\-Sites}}
\index{m\-Medium\-Power\-Sites@{m\-Medium\-Power\-Sites}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Medium\-Power\-Sites}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Tile\-Position}, int$>$ {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Medium\-Power\-Sites}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_afb13a4e8bafd0d20cbfc7a4a9bc8af53}


\-Definition at line 31 of file \-Pylon\-Power\-Tracker.\-h.



\-Referenced by add\-To\-Power\-Field(), has\-Power(), and remove\-From\-Power\-Field().

\hypertarget{classPylonPowerTrackerClass_a33e52f190c42b8752d50bfc4cf98c625}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Pylon\-Large\-Power\-Sites@{m\-Pylon\-Large\-Power\-Sites}}
\index{m\-Pylon\-Large\-Power\-Sites@{m\-Pylon\-Large\-Power\-Sites}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Pylon\-Large\-Power\-Sites}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Unit}, std\-::set$<${\bf \-Tile\-Position}$>$ $>$ {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Pylon\-Large\-Power\-Sites}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_a33e52f190c42b8752d50bfc4cf98c625}


\-Definition at line 28 of file \-Pylon\-Power\-Tracker.\-h.



\-Referenced by add\-To\-Power\-Field(), and remove\-From\-Power\-Field().

\hypertarget{classPylonPowerTrackerClass_a127b2032ca92db8351dbca757b0e278c}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Pylon\-Medium\-Power\-Sites@{m\-Pylon\-Medium\-Power\-Sites}}
\index{m\-Pylon\-Medium\-Power\-Sites@{m\-Pylon\-Medium\-Power\-Sites}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Pylon\-Medium\-Power\-Sites}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Unit}, std\-::set$<${\bf \-Tile\-Position}$>$ $>$ {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Pylon\-Medium\-Power\-Sites}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_a127b2032ca92db8351dbca757b0e278c}


\-Definition at line 27 of file \-Pylon\-Power\-Tracker.\-h.



\-Referenced by add\-To\-Power\-Field(), and remove\-From\-Power\-Field().

\hypertarget{classPylonPowerTrackerClass_a5a53bb1e88c0ff263aa93e2ca3aa7d82}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Pylons@{m\-Pylons}}
\index{m\-Pylons@{m\-Pylons}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Pylons}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Pylons}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_a5a53bb1e88c0ff263aa93e2ca3aa7d82}


\-Definition at line 22 of file \-Pylon\-Power\-Tracker.\-h.



\-Referenced by on\-Add\-Pylon(), on\-Remove\-Pylon(), and update().

\hypertarget{classPylonPowerTrackerClass_ac0feae92a3f28d67b5d1fd1e68fd0218}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Pylon\-Small\-Power\-Sites@{m\-Pylon\-Small\-Power\-Sites}}
\index{m\-Pylon\-Small\-Power\-Sites@{m\-Pylon\-Small\-Power\-Sites}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Pylon\-Small\-Power\-Sites}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Unit}, std\-::set$<${\bf \-Tile\-Position}$>$ $>$ {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Pylon\-Small\-Power\-Sites}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_ac0feae92a3f28d67b5d1fd1e68fd0218}


\-Definition at line 26 of file \-Pylon\-Power\-Tracker.\-h.



\-Referenced by add\-To\-Power\-Field(), remove\-From\-Power\-Field(), and update().

\hypertarget{classPylonPowerTrackerClass_ac7bfcedad8a03f3af1881f530e4601fc}{\index{\-Pylon\-Power\-Tracker\-Class@{\-Pylon\-Power\-Tracker\-Class}!m\-Small\-Power\-Sites@{m\-Small\-Power\-Sites}}
\index{m\-Small\-Power\-Sites@{m\-Small\-Power\-Sites}!PylonPowerTrackerClass@{\-Pylon\-Power\-Tracker\-Class}}
\subsubsection[{m\-Small\-Power\-Sites}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Tile\-Position}, int$>$ {\bf \-Pylon\-Power\-Tracker\-Class\-::m\-Small\-Power\-Sites}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPylonPowerTrackerClass_ac7bfcedad8a03f3af1881f530e4601fc}


\-Definition at line 30 of file \-Pylon\-Power\-Tracker.\-h.



\-Referenced by add\-To\-Power\-Field(), has\-Power(), and remove\-From\-Power\-Field().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{PylonPowerTracker_8h}{\-Pylon\-Power\-Tracker.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{PylonPowerTracker_8cpp}{\-Pylon\-Power\-Tracker.\-cpp}\end{DoxyCompactItemize}
