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


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}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_a37f35aaa5935b91a180d92e5243fccb7}{Request\+Handler} ()
\item 
virtual \hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_a0d7c8fced3825d323b12b5dbd167bf83}{$\sim$\+Request\+Handler} ()
\item 
virtual bool \hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_adf4a5093c7b789352a0a44629490bc87}{can\+Handle\+Request} (const \hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request} $\ast$req, const \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 \hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response} $\ast$ \hyperlink{class_ogre_1_1_work_queue_1_1_request_handler_a1c412e904f71b9dec519c4aa1b5ceead}{handle\+Request} (const \hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request} $\ast$req, const \hyperlink{class_ogre_1_1_work_queue}{Work\+Queue} $\ast$srcQ) \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}


\subsection{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}


\subsection{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\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}!Request\+Handler@{Request\+Handler}}
\index{Request\+Handler@{Request\+Handler}!Ogre\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}}
\subsubsection{\texorpdfstring{Request\+Handler()}{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\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}!````~Request\+Handler@{$\sim$\+Request\+Handler}}
\index{````~Request\+Handler@{$\sim$\+Request\+Handler}!Ogre\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}}
\subsubsection{\texorpdfstring{$\sim$\+Request\+Handler()}{~RequestHandler()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Work\+Queue\+::\+Request\+Handler\+::$\sim$\+Request\+Handler (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\subsection{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\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}!can\+Handle\+Request@{can\+Handle\+Request}}
\index{can\+Handle\+Request@{can\+Handle\+Request}!Ogre\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}}
\subsubsection{\texorpdfstring{can\+Handle\+Request()}{canHandleRequest()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Work\+Queue\+::\+Request\+Handler\+::can\+Handle\+Request (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request} $\ast$}]{req,  }\item[{const \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 \hyperlink{class_ogre_1_1_terrain_a22196f59f8f761e7fc4bea11db488252}{Ogre\+::\+Terrain}, \hyperlink{class_ogre_1_1_terrain_group_a008f51c172bd858cca8763af865f3fa1}{Ogre\+::\+Terrain\+Group}, \hyperlink{class_ogre_1_1_resource_background_queue_adc005af8b5c25bcfd6e39d4d5255d754}{Ogre\+::\+Resource\+Background\+Queue}, \hyperlink{class_ogre_1_1_page_a858b194d988c22e52516f03fd50d0062}{Ogre\+::\+Page}, and \hyperlink{class_ogre_1_1_terrain_lod_manager_af274ee16de8e9ddf1f058a2eb0ea1b5e}{Ogre\+::\+Terrain\+Lod\+Manager}.



References Ogre\+::\+Work\+Queue\+::\+Request\+::get\+Aborted(), and O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD.



Referenced by Ogre\+::\+Default\+Work\+Queue\+Base\+::set\+Response\+Processing\+Time\+Limit().

\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\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}!handle\+Request@{handle\+Request}}
\index{handle\+Request@{handle\+Request}!Ogre\+::\+Work\+Queue\+::\+Request\+Handler@{Ogre\+::\+Work\+Queue\+::\+Request\+Handler}}
\subsubsection{\texorpdfstring{handle\+Request()}{handleRequest()}}
{\footnotesize\ttfamily virtual \hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}$\ast$ Ogre\+::\+Work\+Queue\+::\+Request\+Handler\+::handle\+Request (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request} $\ast$}]{req,  }\item[{const \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 \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 \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 \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 \hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response} object -\/ the caller is responsible for deleting the object. 
\end{DoxyReturn}


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



Referenced by Ogre\+::\+Default\+Work\+Queue\+Base\+::set\+Response\+Processing\+Time\+Limit().



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