MeVisLab Toolbox Reference
|
A cursor to create page and tile requests iteratively, allowing breaks and resumption at any time, and avoiding a recursive tree traversal that is difficult to resume. More...
#include <mlPageRequestCursor.h>
Public Types | |
enum | CursorState { HasMoreWork , HasFinished , IsBlocked } |
Defines the current state of the cursor. More... | |
Public Member Functions | |
PageRequestCursor (PageRequest *request) | |
Creates a cursor from a root PageRequest. More... | |
PageRequestCursor (TileRequest *request) | |
Creates a cursor from a root TileRequest. More... | |
PageRequestCursor () | |
Creates an empty cursor. More... | |
void | init (TileRequest *request) |
Initializes from a TileRequest. More... | |
void | setProcessingScope (int scope) |
Sets the processing scope. More... | |
int | getProcessingScope () const |
Returns the processing scope. More... | |
CursorState | nextStep (PageRequestQueueInterface &queue, bool &hasCreatedWork) |
Implements an iterative tree traversal with automatic expanding of the tile and page requests. More... | |
bool | propagateCancellationDownIfRequestNotNeededAnymore () |
See Page/TileRequest. More... | |
void | propagateErrorUpwards (MLErrorCode error) |
See Page/TileRequest. More... | |
void | collectPageRequestsWithErrors (std::set< PageRequest * > &result) |
See Page/TileRequest. More... | |
bool | isNeeded () |
Returns whether the cursor is still needed (which is the case when it points to either a PageRequest or TileRequest). More... | |
void | clear () |
Clears the cursor so that it points to no requests anymore. More... | |
TileRequest * | currentTileRequest () |
Returns the current tile request. More... | |
void | append (PageRequest *request) override |
Appends PageRequest request that is ready for processing to the work queue. More... | |
MLint | getNumCreatedPageRequests () const |
Returns number of created page requests (inner requests, not the requests that are in the queue). More... | |
![]() | |
virtual | ~PageRequestQueueInterface () |
Virtual destructor to get rid of warning. More... | |
A cursor to create page and tile requests iteratively, allowing breaks and resumption at any time, and avoiding a recursive tree traversal that is difficult to resume.
Definition at line 37 of file mlPageRequestCursor.h.
Defines the current state of the cursor.
Enumerator | |
---|---|
HasMoreWork | Further work is available, re-call nextStep(). |
HasFinished | The cursor has no more work and may be removed. |
IsBlocked | The cursor has more work but is blocked by a pending request (e.g., a pending memory image). |
Definition at line 57 of file mlPageRequestCursor.h.
ml::PageRequestCursor::PageRequestCursor | ( | PageRequest * | request | ) |
Creates a cursor from a root PageRequest.
ml::PageRequestCursor::PageRequestCursor | ( | TileRequest * | request | ) |
Creates a cursor from a root TileRequest.
ml::PageRequestCursor::PageRequestCursor | ( | ) |
Creates an empty cursor.
|
overridevirtual |
Appends PageRequest request
that is ready for processing to the work queue.
Implements ml::PageRequestQueueInterface.
void ml::PageRequestCursor::clear | ( | ) |
Clears the cursor so that it points to no requests anymore.
void ml::PageRequestCursor::collectPageRequestsWithErrors | ( | std::set< PageRequest * > & | result | ) |
See Page/TileRequest.
|
inline |
Returns the current tile request.
Definition at line 85 of file mlPageRequestCursor.h.
|
inline |
Returns number of created page requests (inner requests, not the requests that are in the queue).
Definition at line 91 of file mlPageRequestCursor.h.
|
inline |
Returns the processing scope.
Definition at line 54 of file mlPageRequestCursor.h.
void ml::PageRequestCursor::init | ( | TileRequest * | request | ) |
Initializes from a TileRequest.
bool ml::PageRequestCursor::isNeeded | ( | ) |
Returns whether the cursor is still needed (which is the case when it points to either a PageRequest or TileRequest).
CursorState ml::PageRequestCursor::nextStep | ( | PageRequestQueueInterface & | queue, |
bool & | hasCreatedWork | ||
) |
Implements an iterative tree traversal with automatic expanding of the tile and page requests.
Page requests that are ready for processing are added to the queue
. The return value indicates whether there is more work available from this cursor, whether it has finished, or whether it is blocked (which can happen on MemoryImage calculations).
bool ml::PageRequestCursor::propagateCancellationDownIfRequestNotNeededAnymore | ( | ) |
See Page/TileRequest.
void ml::PageRequestCursor::propagateErrorUpwards | ( | MLErrorCode | error | ) |
See Page/TileRequest.
|
inline |
Sets the processing scope.
Definition at line 51 of file mlPageRequestCursor.h.