Public Member Functions | List of all members
Ogre::WorkQueue::ResponseHandler Class Referenceabstract

Interface definition for a handler of responses. More...

#include <OgreWorkQueue.h>

Inheritance diagram for Ogre::WorkQueue::ResponseHandler:
Inheritance graph
[legend]

Public Member Functions

 ResponseHandler ()
 
virtual ~ResponseHandler ()
 
virtual bool canHandleResponse (const Response *res, const WorkQueue *srcQ)
 Return whether this handler can process a given response. More...
 
virtual void handleResponse (const Response *res, const WorkQueue *srcQ)=0
 The handler method every subclass must implement. More...
 

Detailed Description

Interface definition for a handler of responses.

Remarks
User classes are expected to implement this interface in order to process responses from the queue. All calls to this class will be in the main render thread and thus all GPU resources will be available.

Definition at line 196 of file OgreWorkQueue.h.

Constructor & Destructor Documentation

§ ResponseHandler()

Ogre::WorkQueue::ResponseHandler::ResponseHandler ( )

Definition at line 199 of file OgreWorkQueue.h.

§ ~ResponseHandler()

virtual Ogre::WorkQueue::ResponseHandler::~ResponseHandler ( )
virtual

Definition at line 200 of file OgreWorkQueue.h.

Member Function Documentation

§ canHandleResponse()

virtual bool Ogre::WorkQueue::ResponseHandler::canHandleResponse ( const Response res,
const WorkQueue srcQ 
)
virtual

Return whether this handler can process a given response.

Remarks
Defaults to true, but if you wish to add several handlers each of which deal with different types of response, you can override this method.

Reimplemented in Ogre::Terrain, Ogre::TerrainGroup, Ogre::ResourceBackgroundQueue, Ogre::Page, and Ogre::TerrainLodManager.

Definition at line 208 of file OgreWorkQueue.h.

References Ogre::WorkQueue::Request::getAborted(), and Ogre::WorkQueue::Response::getRequest().

§ handleResponse()

virtual void Ogre::WorkQueue::ResponseHandler::handleResponse ( const Response res,
const WorkQueue srcQ 
)
pure virtual

The handler method every subclass must implement.

Parameters
resThe Response structure. The caller is responsible for deleting this after the call is made, none of the data contained (except pointers to structures in user Any data) will persist after this call is returned.
srcQThe work queue that this request originated from

Implemented in Ogre::Terrain, Ogre::TerrainGroup, Ogre::ResourceBackgroundQueue, Ogre::PMInjector, Ogre::Page, Ogre::TerrainPagedWorldSection, Ogre::Volume::ChunkHandler, and Ogre::TerrainLodManager.


The documentation for this class was generated from the following file:

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Mon Jan 2 2017 11:59:40