MeVisLabToolboxReference
ml::PageRequestCursor Class Reference

A cursor to create page and tile requests in an iterative manner, to allow breaking/resuming at any time and to avoid a recursive tree traversal which can not be easily resumed. More...

#include <mlPageRequestCursor.h>

List of all members.

Public Types

enum  CursorState { HasMoreWork, HasFinished, IsBlocked }
 Defines the current state of the cursor. More...

Public Member Functions

 PageRequestCursor (PageRequest *request)
 Creates cursor from a root PageRequest.
 PageRequestCursor (TileRequest *request)
 Creates cursor from a root TileRequest.
 PageRequestCursor ()
 Creates empty cursor.
void init (TileRequest *request)
 Initializes from a TileRequest.
CursorState nextStep (PageRequestQueueInterface &queue)
 Implements an iterative tree traversal with automatic expanding of the tile and page requests.
bool propagateCancellationDownIfRequestNotNeededAnymore ()
 See Page/TileRequest.
void collectPageRequestsWithErrors (std::set< PageRequest * > &result)
 See Page/TileRequest.
bool isNeeded ()
 Returns if the cursor is still needed (which is the case when it points to either a PageRequest or TileRequest).
void clear ()
 Clears the cursor, so that it points to no requests anymore.

Detailed Description

A cursor to create page and tile requests in an iterative manner, to allow breaking/resuming at any time and to avoid a recursive tree traversal which can not be easily resumed.

Definition at line 34 of file mlPageRequestCursor.h.


Member Enumeration Documentation

Defines the current state of the cursor.

Enumerator:
HasMoreWork 

Further work is available, re-call nextStep().

HasFinished 

The cursor has no more work to-do 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 48 of file mlPageRequestCursor.h.


Constructor & Destructor Documentation

ml::PageRequestCursor::PageRequestCursor ( PageRequest request)

Creates cursor from a root PageRequest.

ml::PageRequestCursor::PageRequestCursor ( TileRequest request)

Creates cursor from a root TileRequest.

ml::PageRequestCursor::PageRequestCursor ( )

Creates empty cursor.


Member Function Documentation

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.

void ml::PageRequestCursor::init ( TileRequest request)

Initializes from a TileRequest.

bool ml::PageRequestCursor::isNeeded ( )

Returns if the cursor is still needed (which is the case when it points to either a PageRequest or TileRequest).

CursorState ml::PageRequestCursor::nextStep ( PageRequestQueueInterface queue)

Implements an iterative tree traversal with automatic expanding of the tile and page requests.

Page requests which are ready for processing are added to the queue. The return value signals if there is more work available from this cursor, if it has finished or if it is blocked (which can happen on MemoryImage calculations).

bool ml::PageRequestCursor::propagateCancellationDownIfRequestNotNeededAnymore ( )

See Page/TileRequest.


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