|
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 adds it to the processor if no error occurs. | |
| double | getProgress () const |
| Returns the current progress of the tile request ([0..1] range). | |
| bool | hasFinished () |
| bool | hasError () const |
| Returns whether the request has an error and the data is thus unusable/invalid. | |
| MLErrorCode | getError () const |
| Returns the error that happened. It returns ML_RESULT_OK if everything is ok. | |
| void | setTileRequestFinishedCB (TileRequestFinishedCB *cb, void *data) |
| Sets the tile request finished callback that 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 () |
| virtual void | delegateProgressUpdate (double) |
| Emits the progress when it changes, to be reimplemented in derived classes. | |
| void | setProgressCB (MLRequestProgressCB *progressCallback, void *progressCallbackUserData) |
| Sets 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.
|
inlinevirtual |
Emits the progress when it changes, to be reimplemented in derived classes.
Reimplemented in ml::ProcessAllPagesJob.
Definition at line 65 of file mlGetTileJob.h.
|
inline |
Returns the error that happened. It returns ML_RESULT_OK if everything is ok.
Definition at line 52 of file mlGetTileJob.h.
References _request.
| double ml::GetTileJobBase::getProgress | ( | ) | const |
Returns the current progress of the tile request ([0..1] range).
|
inline |
Returns whether the request has an error and the data is thus unusable/invalid.
Definition at line 49 of file mlGetTileJob.h.
References _request.
|
inline |
Returns whether the request has finished. If an error happened, true will be returned as well.
Definition at line 46 of file mlGetTileJob.h.
References _request.
|
pure virtual |
Initializes the tile request and adds it to the processor if no error occurs.
Implemented in ml::GetTileJob, and ml::ProcessAllPagesJob.
| void ml::GetTileJobBase::setProgressCB | ( | MLRequestProgressCB * | progressCallback, |
| void * | progressCallbackUserData ) |
Sets the progress callback. It will be called when updateProgress() is called.
|
inline |
Sets the tile request finished callback that is called when the tile is ready.
Definition at line 55 of file mlGetTileJob.h.
References _request.
| 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 75 of file mlGetTileJob.h.
|
protected |
Definition at line 73 of file mlGetTileJob.h.
|
protected |
Definition at line 74 of file mlGetTileJob.h.
|
protected |
The root TileRequest that is used internally.
Definition at line 72 of file mlGetTileJob.h.
Referenced by getError(), ml::GetTileJob::getSubImage(), hasError(), hasFinished(), ml::GetTileJob::setAllocationPolicy(), ml::GetTileJob::setExternalDataBuffer(), ml::GetTileJob::setRequestAsReadOnlyPage(), and setTileRequestFinishedCB().