MeVisLab Toolbox Reference
|
Base class for TileRequest based jobs. More...
#include <mlGetTileJob.h>
Public Member Functions | |
GetTileJobBase () | |
virtual | ~GetTileJobBase () |
virtual MLErrorCode | init (PageRequestProcessor &processor)=0 |
Initializes the tile request and add it to the processor if no error occurs. | |
double | getProgress () const |
Returns the current progress of the tile request ([0..1] range). | |
bool | hasFinished () |
Returns if the request has finished (If an error happened, true will be returned as well). | |
bool | hasError () const |
Returns if the request has an error (and the data is thus unusable/invalid). | |
MLErrorCode | getError () const |
Returns the error that happened (return ML_RESULT_OK if everything is ok). | |
void | setTileRequestFinishedCB (TileRequestFinishedCB *cb, void *data) |
Sets the tile request finished cb, which is called when the tile is ready. | |
void | cancel () |
Cancels the GetTileJob, this only sets the flag, the real cancellation needs to be done on the PageRequestProcessor. | |
void | updateProgress () |
Called by host to allow custom progress updates. | |
virtual void | delegateProgressUpdate (double) |
Emits the progress when it changes, to be reimplemented in derived classes. | |
void | setProgressCB (MLRequestProgressCB *progressCallback, void *progressCallbackUserData) |
Set the progress callback. It will be called when updateProgress() is called. | |
Protected Attributes | |
TileRequest * | _request |
The root TileRequest that is used internally. | |
MLRequestProgressCB * | _progressCB |
void * | _progressCBUserData |
double | _lastProgress |
Base class for TileRequest based jobs.
Definition at line 31 of file mlGetTileJob.h.
ml::GetTileJobBase::GetTileJobBase | ( | ) |
|
virtual |
void ml::GetTileJobBase::cancel | ( | ) |
Cancels the GetTileJob, this only sets the flag, the real cancellation needs to be done on the PageRequestProcessor.
Emits the progress when it changes, to be reimplemented in derived classes.
Reimplemented in ml::ProcessAllPagesJob.
Definition at line 64 of file mlGetTileJob.h.
|
inline |
Returns the error that happened (return ML_RESULT_OK if everything is ok).
Definition at line 51 of file mlGetTileJob.h.
double ml::GetTileJobBase::getProgress | ( | ) | const |
Returns the current progress of the tile request ([0..1] range).
|
inline |
Returns if the request has an error (and the data is thus unusable/invalid).
Definition at line 48 of file mlGetTileJob.h.
|
inline |
Returns if the request has finished (If an error happened, true
will be returned as well).
Definition at line 45 of file mlGetTileJob.h.
|
pure virtual |
Initializes the tile request and add it to the processor if no error occurs.
Implemented in ml::GetTileJob, and ml::ProcessAllPagesJob.
void ml::GetTileJobBase::setProgressCB | ( | MLRequestProgressCB * | progressCallback, |
void * | progressCallbackUserData ) |
Set the progress callback. It will be called when updateProgress() is called.
|
inline |
Sets the tile request finished cb, which is called when the tile is ready.
Definition at line 54 of file mlGetTileJob.h.
void ml::GetTileJobBase::updateProgress | ( | ) |
Called by host to allow custom progress updates.
By default it calls the progress callback if set. It also calls the virtual delegateProgressUpdate().
|
protected |
Definition at line 74 of file mlGetTileJob.h.
|
protected |
Definition at line 72 of file mlGetTileJob.h.
|
protected |
Definition at line 73 of file mlGetTileJob.h.
|
protected |
The root TileRequest that is used internally.
Definition at line 71 of file mlGetTileJob.h.