\hypertarget{class_ogre_1_1_work_queue_1_1_request_handler}{}\doxysection{Ogre\+::Work\+Queue\+::Request\+Handler Class Reference}
\label{class_ogre_1_1_work_queue_1_1_request_handler}\index{Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}}


Interface definition for a handler of requests.  




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



Inheritance diagram for Ogre\+::Work\+Queue\+::Request\+Handler\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_work_queue_1_1_request_handler__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_a37f35aaa5935b91a180d92e5243fccb7}{Request\+Handler}} ()
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_a0d7c8fced3825d323b12b5dbd167bf83}{$\sim$\+Request\+Handler}} ()
\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_adf4a5093c7b789352a0a44629490bc87}{can\+Handle\+Request}} (const \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request}} $\ast$req, const \mbox{\hyperlink{class_ogre_1_1_work_queue}{Work\+Queue}} $\ast$srcQ)
\begin{DoxyCompactList}\small\item\em Return whether this handler can process a given request. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}} $\ast$ \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_a1c412e904f71b9dec519c4aa1b5ceead}{handle\+Request}} (const \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request}} $\ast$req, const \mbox{\hyperlink{class_ogre_1_1_work_queue}{Work\+Queue}} $\ast$srcQ) \mbox{\hyperlink{_ogre_platform_8h_a11162eebee0099930c48076229cc6f04}{O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD}}=0
\begin{DoxyCompactList}\small\item\em The handler method every subclass must implement. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Interface definition for a handler of requests. 

\begin{DoxyRemark}{Remarks}
User classes are expected to implement this interface in order to process requests on the queue. It\textquotesingle{}s important to realise that the calls to this class may be in a separate thread to the main render context, and as such it may not be possible to make rendersystem or other G\+P\+U-\/dependent calls in this handler. You can only do so if the queue was created with \textquotesingle{}workers\+Can\+Access\+Render\+System\textquotesingle{} set to true, and O\+G\+R\+E\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+S\+U\+P\+P\+O\+RT=1, but this puts extra strain on the thread safety of the render system and is not recommended. It is best to perform C\+P\+U-\/side work in these handlers and let the response handler transfer results to the G\+PU in the main render thread. 
\end{DoxyRemark}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_work_queue_1_1_request_handler_a37f35aaa5935b91a180d92e5243fccb7}\label{class_ogre_1_1_work_queue_1_1_request_handler_a37f35aaa5935b91a180d92e5243fccb7}} 
\index{Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}!RequestHandler@{RequestHandler}}
\index{RequestHandler@{RequestHandler}!Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}}
\doxysubsubsection{\texorpdfstring{RequestHandler()}{RequestHandler()}}
{\footnotesize\ttfamily Ogre\+::\+Work\+Queue\+::\+Request\+Handler\+::\+Request\+Handler (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_work_queue_1_1_request_handler_a0d7c8fced3825d323b12b5dbd167bf83}\label{class_ogre_1_1_work_queue_1_1_request_handler_a0d7c8fced3825d323b12b5dbd167bf83}} 
\index{Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}!````~RequestHandler@{$\sim$RequestHandler}}
\index{````~RequestHandler@{$\sim$RequestHandler}!Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}}
\doxysubsubsection{\texorpdfstring{$\sim$RequestHandler()}{~RequestHandler()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Work\+Queue\+::\+Request\+Handler\+::$\sim$\+Request\+Handler (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_work_queue_1_1_request_handler_adf4a5093c7b789352a0a44629490bc87}\label{class_ogre_1_1_work_queue_1_1_request_handler_adf4a5093c7b789352a0a44629490bc87}} 
\index{Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}!canHandleRequest@{canHandleRequest}}
\index{canHandleRequest@{canHandleRequest}!Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}}
\doxysubsubsection{\texorpdfstring{canHandleRequest()}{canHandleRequest()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Work\+Queue\+::\+Request\+Handler\+::can\+Handle\+Request (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request}} $\ast$}]{req,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_work_queue}{Work\+Queue}} $\ast$}]{srcQ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Return whether this handler can process a given request. 

\begin{DoxyRemark}{Remarks}
Defaults to true, but if you wish to add several handlers each of which deal with different types of request, you can override this method. 
\end{DoxyRemark}


Reimplemented in \mbox{\hyperlink{class_ogre_1_1_terrain_a22196f59f8f761e7fc4bea11db488252}{Ogre\+::\+Terrain}}, \mbox{\hyperlink{class_ogre_1_1_terrain_group_a008f51c172bd858cca8763af865f3fa1}{Ogre\+::\+Terrain\+Group}}, \mbox{\hyperlink{class_ogre_1_1_resource_background_queue_adc005af8b5c25bcfd6e39d4d5255d754}{Ogre\+::\+Resource\+Background\+Queue}}, \mbox{\hyperlink{class_ogre_1_1_page_a858b194d988c22e52516f03fd50d0062}{Ogre\+::\+Page}}, and \mbox{\hyperlink{class_ogre_1_1_terrain_lod_manager_af274ee16de8e9ddf1f058a2eb0ea1b5e}{Ogre\+::\+Terrain\+Lod\+Manager}}.



References Ogre\+::\+Work\+Queue\+::\+Request\+::get\+Aborted().

\mbox{\Hypertarget{class_ogre_1_1_work_queue_1_1_request_handler_a1c412e904f71b9dec519c4aa1b5ceead}\label{class_ogre_1_1_work_queue_1_1_request_handler_a1c412e904f71b9dec519c4aa1b5ceead}} 
\index{Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}!handleRequest@{handleRequest}}
\index{handleRequest@{handleRequest}!Ogre::WorkQueue::RequestHandler@{Ogre::WorkQueue::RequestHandler}}
\doxysubsubsection{\texorpdfstring{handleRequest()}{handleRequest()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}}$\ast$ Ogre\+::\+Work\+Queue\+::\+Request\+Handler\+::handle\+Request (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request}} $\ast$}]{req,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_work_queue}{Work\+Queue}} $\ast$}]{srcQ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



The handler method every subclass must implement. 

If a failure is encountered, return a \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}} with a failure result rather than raise an exception. 
\begin{DoxyParams}{Parameters}
{\em req} & The \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request}} structure, which is effectively owned by the handler during this call. It must be attached to the returned \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}} regardless of success or failure. \\
\hline
{\em srcQ} & The work queue that this request originated from \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to a \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}} object -\/ the caller is responsible for deleting the object. 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{class_ogre_1_1_terrain_a00a3600acc9fb758f8890f2c0877f62e}{Ogre\+::\+Terrain}}, \mbox{\hyperlink{class_ogre_1_1_terrain_group_a28e769b1bb49906de087be411ae97001}{Ogre\+::\+Terrain\+Group}}, \mbox{\hyperlink{class_ogre_1_1_resource_background_queue_ab62b4ac5538f5f96123ba2491c3af284}{Ogre\+::\+Resource\+Background\+Queue}}, \mbox{\hyperlink{class_ogre_1_1_page_a80e1feed0673e75e4c56660f4be9fd00}{Ogre\+::\+Page}}, \mbox{\hyperlink{class_ogre_1_1_terrain_paged_world_section_a83de21ef93c77b4897c119ada18c172a}{Ogre\+::\+Terrain\+Paged\+World\+Section}}, \mbox{\hyperlink{class_ogre_1_1_volume_1_1_chunk_handler_ab88ea294714037c5eeca4f0a6d7127b3}{Ogre\+::\+Volume\+::\+Chunk\+Handler}}, and \mbox{\hyperlink{class_ogre_1_1_terrain_lod_manager_a0b1f5f6747bb9f94550ff9f9634f07d6}{Ogre\+::\+Terrain\+Lod\+Manager}}.



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