MeVisLab Toolbox Reference
ml::PageRequestProcessor Class Referenceabstract

Abstract base class for page request processors. More...

#include <mlPageRequestProcessor.h>

Inheritance diagram for ml::PageRequestProcessor:
ml::PageRequestQueueInterface ml::PageRequestProcessorBase ml::MultiThreadedPageRequestProcessor ml::SingleThreadedPageRequestProcessor

Public Member Functions

 ~PageRequestProcessor () override
 Virtual destructor. More...
 
virtual void addRootTileRequest (TileRequest *tileRequest)=0
 Adds the root tileRequest that should be processed (the ownership stays with the caller). More...
 
virtual void processAll ()=0
 Processes all requests until the cursors have traversed the whole tree and the queue is empty. More...
 
virtual void process (double timeBudget)=0
 Process the requests for the given timeBudget given in seconds. More...
 
virtual bool needsProcessing ()=0
 Returns if the tile request needs some more processing. More...
 
virtual void removeCancelledRequests ()=0
 Removes all requests that are canceled and no longer needed. More...
 
virtual void enterProcessingScope ()=0
 Enters a recursive processing scope (always called from main thread!) Default scope is 0 (which is used for requests from the background tasks) Host::getTile requests will have a scope of 1 (or more if called recursively) Needs to be called before addRootTileRequest(), if the request should be inside of a scope. More...
 
virtual void leaveProcessingScope ()=0
 Leaves a recursive processing scope (always called from main thread!) More...
 
virtual void setNumWorkerThreads (std::size_t)=0
 Set number of worker threads (available here even if subclasses may not support it) More...
 
virtual bool processingWasSingleThreaded () const =0
 Returns if the last request was processed single or multi-threaded. More...
 
- Public Member Functions inherited from ml::PageRequestQueueInterface
virtual ~PageRequestQueueInterface ()
 Virtual destructor to get rid of warning. More...
 
virtual void append (PageRequest *request)=0
 Append PageRequest request which is ready for processing to the work queue. More...
 

Static Public Member Functions

static void enableTileRequestAllocationFailure (int count=1)
 Enables failing on every count allocation. More...
 
static void disableTileRequestAllocationFailure ()
 Disables allocation failure (default!) More...
 

Detailed Description

Abstract base class for page request processors.

Definition at line 46 of file mlPageRequestProcessor.h.

Constructor & Destructor Documentation

◆ ~PageRequestProcessor()

ml::PageRequestProcessor::~PageRequestProcessor ( )
inlineoverride

Virtual destructor.

Definition at line 50 of file mlPageRequestProcessor.h.

Member Function Documentation

◆ addRootTileRequest()

virtual void ml::PageRequestProcessor::addRootTileRequest ( TileRequest tileRequest)
pure virtual

Adds the root tileRequest that should be processed (the ownership stays with the caller).

Implemented in ml::SingleThreadedPageRequestProcessor, and ml::MultiThreadedPageRequestProcessor.

◆ disableTileRequestAllocationFailure()

static void ml::PageRequestProcessor::disableTileRequestAllocationFailure ( )
static

Disables allocation failure (default!)

◆ enableTileRequestAllocationFailure()

static void ml::PageRequestProcessor::enableTileRequestAllocationFailure ( int  count = 1)
static

Enables failing on every count allocation.

◆ enterProcessingScope()

virtual void ml::PageRequestProcessor::enterProcessingScope ( )
pure virtual

Enters a recursive processing scope (always called from main thread!) Default scope is 0 (which is used for requests from the background tasks) Host::getTile requests will have a scope of 1 (or more if called recursively) Needs to be called before addRootTileRequest(), if the request should be inside of a scope.

Implemented in ml::PageRequestProcessorBase, and ml::MultiThreadedPageRequestProcessor.

◆ leaveProcessingScope()

virtual void ml::PageRequestProcessor::leaveProcessingScope ( )
pure virtual

Leaves a recursive processing scope (always called from main thread!)

Implemented in ml::PageRequestProcessorBase, and ml::MultiThreadedPageRequestProcessor.

◆ needsProcessing()

virtual bool ml::PageRequestProcessor::needsProcessing ( )
pure virtual

Returns if the tile request needs some more processing.

Implemented in ml::SingleThreadedPageRequestProcessor, and ml::MultiThreadedPageRequestProcessor.

◆ process()

virtual void ml::PageRequestProcessor::process ( double  timeBudget)
pure virtual

Process the requests for the given timeBudget given in seconds.

Implemented in ml::SingleThreadedPageRequestProcessor, and ml::MultiThreadedPageRequestProcessor.

◆ processAll()

virtual void ml::PageRequestProcessor::processAll ( )
pure virtual

Processes all requests until the cursors have traversed the whole tree and the queue is empty.

Implemented in ml::SingleThreadedPageRequestProcessor, and ml::MultiThreadedPageRequestProcessor.

◆ processingWasSingleThreaded()

virtual bool ml::PageRequestProcessor::processingWasSingleThreaded ( ) const
pure virtual

Returns if the last request was processed single or multi-threaded.

Implemented in ml::SingleThreadedPageRequestProcessor, and ml::MultiThreadedPageRequestProcessor.

◆ removeCancelledRequests()

virtual void ml::PageRequestProcessor::removeCancelledRequests ( )
pure virtual

Removes all requests that are canceled and no longer needed.

Implemented in ml::PageRequestProcessorBase.

◆ setNumWorkerThreads()

virtual void ml::PageRequestProcessor::setNumWorkerThreads ( std::size_t  )
pure virtual

Set number of worker threads (available here even if subclasses may not support it)

Implemented in ml::SingleThreadedPageRequestProcessor, and ml::MultiThreadedPageRequestProcessor.


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