\hypertarget{class_ogre_1_1_manual_resource_loader}{}\doxysection{Ogre\+::Manual\+Resource\+Loader Class Reference}
\label{class_ogre_1_1_manual_resource_loader}\index{Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}}


Interface describing a manual resource loader.  




{\ttfamily \#include $<$Ogre\+Resource.\+h$>$}



Inheritance diagram for Ogre\+::Manual\+Resource\+Loader\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=240pt]{class_ogre_1_1_manual_resource_loader__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_manual_resource_loader_a52b91457400f54642fd3c9e0182905f5}{Manual\+Resource\+Loader}} ()
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_manual_resource_loader_a64c9f1f9f2817de97321412c59fabb5a}{$\sim$\+Manual\+Resource\+Loader}} ()
\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_manual_resource_loader_ae04795ab21e4a46709beb6d521a75c53}{load\+Resource}} (\mbox{\hyperlink{class_ogre_1_1_resource}{Resource}} $\ast$resource)=0
\begin{DoxyCompactList}\small\item\em Called when a resource wishes to load instead of Resource\+::load\+Impl. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_manual_resource_loader_a7b4afd007622d165efbcc362e5566922}{prepare\+Resource}} (\mbox{\hyperlink{class_ogre_1_1_resource}{Resource}} $\ast$resource)
\begin{DoxyCompactList}\small\item\em Called when a resource wishes to prepare instead of Resource\+::prepare\+Impl. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Interface describing a manual resource loader. 

Resources are usually loaded from files; however in some cases you want to be able to set the data up manually instead. This provides some problems, such as how to reload a \mbox{\hyperlink{class_ogre_1_1_resource}{Resource}} if it becomes unloaded for some reason, either because of memory constraints, or because a device fails and some or all of the data is lost.

This interface should be implemented by all classes which wish to provide manual data to a resource. They provide a pointer to themselves when defining the resource (via the appropriate \mbox{\hyperlink{class_ogre_1_1_resource_manager}{Resource\+Manager}}), and will be called when the \mbox{\hyperlink{class_ogre_1_1_resource}{Resource}} tries to load. They should implement the load\+Resource method such that the \mbox{\hyperlink{class_ogre_1_1_resource}{Resource}} is in the end set up exactly as if it had loaded from a file, although the implementations will likely differ between subclasses of \mbox{\hyperlink{class_ogre_1_1_resource}{Resource}}, which is why no generic algorithm can be stated here. \begin{DoxyNote}{Note}
The loader must remain valid for the entire life of the resource, so that if need be it can be called upon to re-\/load the resource at any time. 
\end{DoxyNote}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_manual_resource_loader_a52b91457400f54642fd3c9e0182905f5}\label{class_ogre_1_1_manual_resource_loader_a52b91457400f54642fd3c9e0182905f5}} 
\index{Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}!ManualResourceLoader@{ManualResourceLoader}}
\index{ManualResourceLoader@{ManualResourceLoader}!Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}}
\doxysubsubsection{\texorpdfstring{ManualResourceLoader()}{ManualResourceLoader()}}
{\footnotesize\ttfamily Ogre\+::\+Manual\+Resource\+Loader\+::\+Manual\+Resource\+Loader (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_manual_resource_loader_a64c9f1f9f2817de97321412c59fabb5a}\label{class_ogre_1_1_manual_resource_loader_a64c9f1f9f2817de97321412c59fabb5a}} 
\index{Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}!````~ManualResourceLoader@{$\sim$ManualResourceLoader}}
\index{````~ManualResourceLoader@{$\sim$ManualResourceLoader}!Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}}
\doxysubsubsection{\texorpdfstring{$\sim$ManualResourceLoader()}{~ManualResourceLoader()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Manual\+Resource\+Loader\+::$\sim$\+Manual\+Resource\+Loader (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_manual_resource_loader_a7b4afd007622d165efbcc362e5566922}\label{class_ogre_1_1_manual_resource_loader_a7b4afd007622d165efbcc362e5566922}} 
\index{Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}!prepareResource@{prepareResource}}
\index{prepareResource@{prepareResource}!Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}}
\doxysubsubsection{\texorpdfstring{prepareResource()}{prepareResource()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Manual\+Resource\+Loader\+::prepare\+Resource (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_resource}{Resource}} $\ast$}]{resource }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Called when a resource wishes to prepare instead of Resource\+::prepare\+Impl. 

\begin{DoxyNote}{Note}
this could get called in a background thread even in just a semithreaded ogre (O\+G\+R\+E\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+S\+U\+P\+P\+O\+RT==2). Thus, you must not access the \mbox{\hyperlink{class_ogre_1_1_render_system}{Render\+System}} from this callback. Do that stuff in \mbox{\hyperlink{class_ogre_1_1_manual_resource_loader_ae04795ab21e4a46709beb6d521a75c53}{load\+Resource}}. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em resource} & The resource which wishes to prepare \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_manual_resource_loader_ae04795ab21e4a46709beb6d521a75c53}\label{class_ogre_1_1_manual_resource_loader_ae04795ab21e4a46709beb6d521a75c53}} 
\index{Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}!loadResource@{loadResource}}
\index{loadResource@{loadResource}!Ogre::ManualResourceLoader@{Ogre::ManualResourceLoader}}
\doxysubsubsection{\texorpdfstring{loadResource()}{loadResource()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Manual\+Resource\+Loader\+::load\+Resource (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_resource}{Resource}} $\ast$}]{resource }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Called when a resource wishes to load instead of Resource\+::load\+Impl. 


\begin{DoxyParams}{Parameters}
{\em resource} & The resource which wishes to load \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_font_ad9fb35dcaf249ea1d86a3fe849422e2d}{Ogre\+::\+Font}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_resource_8h}{Ogre\+Resource.\+h}}\end{DoxyCompactItemize}
