\hypertarget{classResourceManager}{}\doxysection{Resource\+Manager Class Reference}
\label{classResourceManager}\index{ResourceManager@{ResourceManager}}


{\ttfamily \#include $<$Resource\+Manager.\+hpp$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
SDL\+\_\+\+Surface $\ast$ \mbox{\hyperlink{classResourceManager_a5b5534fbba6f619d50c8b4896ec7c768}{Load\+Resource}} (std\+::string image\+\_\+filename)
\item 
SDL\+\_\+\+Surface $\ast$ \mbox{\hyperlink{classResourceManager_a71c603bdc173cfe704788a0fbfe2ac7e}{Get\+Resource}} (std\+::string key)
\item 
int \mbox{\hyperlink{classResourceManager_a19f196ba87bf74201b9e3f496edc78cd}{Start\+Up}} ()
\item 
int \mbox{\hyperlink{classResourceManager_ae5ed3ee26a3de63a04d4bb6542d5bbb0}{Shut\+Down}} ()
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{classResourceManager}{Resource\+Manager}} \& \mbox{\hyperlink{classResourceManager_a98b11a6302bf0db4ffc81eea70512ee2}{Get\+Instance}} ()
\end{DoxyCompactItemize}
\doxysubsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classResourceManager_a3b32babd2e81909bbd90d7f2d566fadb}{Resource\+Manager}} ()
\item 
\Hypertarget{classResourceManager_af7a286275ba537839da512d9d000af01}\label{classResourceManager_af7a286275ba537839da512d9d000af01} 
{\bfseries Resource\+Manager} (\mbox{\hyperlink{classResourceManager}{Resource\+Manager}} const \&)
\item 
\Hypertarget{classResourceManager_a529d0597fb7c1ea38f9ed5e150a73068}\label{classResourceManager_a529d0597fb7c1ea38f9ed5e150a73068} 
void {\bfseries operator=} (\mbox{\hyperlink{classResourceManager}{Resource\+Manager}} const \&)
\end{DoxyCompactItemize}
\doxysubsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classResourceManager_a13ecc712ce6a74430fb5ce309bae1c5e}\label{classResourceManager_a13ecc712ce6a74430fb5ce309bae1c5e} 
std\+::unordered\+\_\+map$<$ std\+::string, SDL\+\_\+\+Surface $\ast$ $>$ {\bfseries surfaces}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A Singleton class to hold all loaded files in the game. The purpose of the \doxylink{classResourceManager}{Resource\+Manager} is to avoid wasting memory on duplicate textures, audio files, and any other things that need to be loaded. 

\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classResourceManager_a3b32babd2e81909bbd90d7f2d566fadb}\label{classResourceManager_a3b32babd2e81909bbd90d7f2d566fadb} 
\index{ResourceManager@{ResourceManager}!ResourceManager@{ResourceManager}}
\index{ResourceManager@{ResourceManager}!ResourceManager@{ResourceManager}}
\doxysubsubsection{\texorpdfstring{ResourceManager()}{ResourceManager()}}
{\footnotesize\ttfamily Resource\+Manager\+::\+Resource\+Manager (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}

Construct a new Resource Manager object. Not used, according to the Singleton Pattern. Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d6b/classResourceManager_a3b32babd2e81909bbd90d7f2d566fadb_icgraph}
\end{center}
\end{figure}


\doxysubsection{Member Function Documentation}
\Hypertarget{classResourceManager_a98b11a6302bf0db4ffc81eea70512ee2}\label{classResourceManager_a98b11a6302bf0db4ffc81eea70512ee2} 
\index{ResourceManager@{ResourceManager}!GetInstance@{GetInstance}}
\index{GetInstance@{GetInstance}!ResourceManager@{ResourceManager}}
\doxysubsubsection{\texorpdfstring{GetInstance()}{GetInstance()}}
{\footnotesize\ttfamily \mbox{\hyperlink{classResourceManager}{Resource\+Manager}} \& Resource\+Manager\+::\+Get\+Instance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Get the Singleton instance of the \doxylink{classResourceManager}{Resource\+Manager}.

\begin{DoxyReturn}{Returns}
the only \doxylink{classResourceManager}{Resource\+Manager} instance 
\end{DoxyReturn}
Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d6b/classResourceManager_a98b11a6302bf0db4ffc81eea70512ee2_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d6b/classResourceManager_a98b11a6302bf0db4ffc81eea70512ee2_icgraph}
\end{center}
\end{figure}
\Hypertarget{classResourceManager_a71c603bdc173cfe704788a0fbfe2ac7e}\label{classResourceManager_a71c603bdc173cfe704788a0fbfe2ac7e} 
\index{ResourceManager@{ResourceManager}!GetResource@{GetResource}}
\index{GetResource@{GetResource}!ResourceManager@{ResourceManager}}
\doxysubsubsection{\texorpdfstring{GetResource()}{GetResource()}}
{\footnotesize\ttfamily SDL\+\_\+\+Surface $\ast$ Resource\+Manager\+::\+Get\+Resource (\begin{DoxyParamCaption}\item[{std\+::string}]{key }\end{DoxyParamCaption})}

Get a resource from the \doxylink{classResourceManager}{Resource\+Manager}. If the resource is not already loaded, calls \doxylink{classResourceManager_a5b5534fbba6f619d50c8b4896ec7c768}{Load\+Resource()}


\begin{DoxyParams}{Parameters}
{\em key} & the filename to be loaded \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the SDL\+\_\+\+Surface created by loading the file 
\end{DoxyReturn}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d6b/classResourceManager_a71c603bdc173cfe704788a0fbfe2ac7e_icgraph}
\end{center}
\end{figure}
\Hypertarget{classResourceManager_a5b5534fbba6f619d50c8b4896ec7c768}\label{classResourceManager_a5b5534fbba6f619d50c8b4896ec7c768} 
\index{ResourceManager@{ResourceManager}!LoadResource@{LoadResource}}
\index{LoadResource@{LoadResource}!ResourceManager@{ResourceManager}}
\doxysubsubsection{\texorpdfstring{LoadResource()}{LoadResource()}}
{\footnotesize\ttfamily SDL\+\_\+\+Surface $\ast$ Resource\+Manager\+::\+Load\+Resource (\begin{DoxyParamCaption}\item[{std\+::string}]{image\+\_\+filename }\end{DoxyParamCaption})}

Load a file into memory.


\begin{DoxyParams}{Parameters}
{\em image\+\_\+filename} & the name of the file to be loaded \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the SDL\+\_\+\+Surface created by loading the file 
\end{DoxyReturn}
Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d6b/classResourceManager_a5b5534fbba6f619d50c8b4896ec7c768_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d6b/classResourceManager_a5b5534fbba6f619d50c8b4896ec7c768_icgraph}
\end{center}
\end{figure}
\Hypertarget{classResourceManager_ae5ed3ee26a3de63a04d4bb6542d5bbb0}\label{classResourceManager_ae5ed3ee26a3de63a04d4bb6542d5bbb0} 
\index{ResourceManager@{ResourceManager}!ShutDown@{ShutDown}}
\index{ShutDown@{ShutDown}!ResourceManager@{ResourceManager}}
\doxysubsubsection{\texorpdfstring{ShutDown()}{ShutDown()}}
{\footnotesize\ttfamily int Resource\+Manager\+::\+Shut\+Down (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Destroy the Singleton \Hypertarget{classResourceManager_a19f196ba87bf74201b9e3f496edc78cd}\label{classResourceManager_a19f196ba87bf74201b9e3f496edc78cd} 
\index{ResourceManager@{ResourceManager}!StartUp@{StartUp}}
\index{StartUp@{StartUp}!ResourceManager@{ResourceManager}}
\doxysubsubsection{\texorpdfstring{StartUp()}{StartUp()}}
{\footnotesize\ttfamily int Resource\+Manager\+::\+Start\+Up (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Initialize the Singleton. 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
include/Resource\+Manager.\+hpp\item 
src/Resource\+Manager.\+cpp\end{DoxyCompactItemize}
