ML Reference
|
Public interface for requesting a tile from a an ML PagedImage using the PageRequestProcessor. More...
#include <mlGetTileJob.h>
Public Member Functions | |
GetTileJob (PagedImage &image, const SubImageBox &box, MLDataType datatype, const ScaleShiftData &scaleShiftData=ScaleShiftData()) | |
Creates a GetTileJob for the given PagedImage image with the requested box , datatype and optional shifting/scaling. | |
~GetTileJob () | |
Destructor. | |
virtual MLErrorCode | init (PageRequestProcessor &processor) |
Initializes the tile request and add it to the processor if no error occurs. | |
void | setAllocationPolicy (TileRequest::AllocationPolicy policy) |
Sets which allocation policy should be used. | |
void | setRequestAsReadOnlyPage () |
Sets that the tile is used read-only (so that a ML page can be passed directly as tile data) This will only work under special conditions: The tile's box/datatype/shiftScale needs to exactly match the input page. | |
void | setExternalDataBuffer (void *data) |
This allows to set the data buffer from an external buffer. | |
const SubImage & | getSubImage () |
Returns access to the stored subimage (including the data, which is allocated using the AllocationPolicy). |
Public interface for requesting a tile from a an ML PagedImage using the PageRequestProcessor.
Definition at line 69 of file mlGetTileJob.h.
ml::GetTileJob::GetTileJob | ( | PagedImage & | image, |
const SubImageBox & | box, | ||
MLDataType | datatype, | ||
const ScaleShiftData & | scaleShiftData = ScaleShiftData() |
||
) | [inline] |
Creates a GetTileJob for the given PagedImage image
with the requested box
, datatype
and optional shifting/scaling.
After creation, the job needs to be initialized using init(), see below.
Definition at line 75 of file mlGetTileJob.h.
ml::GetTileJob::~GetTileJob | ( | ) |
Destructor.
const SubImage& ml::GetTileJob::getSubImage | ( | ) | [inline] |
Returns access to the stored subimage (including the data, which is allocated using the AllocationPolicy).
Definition at line 108 of file mlGetTileJob.h.
virtual MLErrorCode ml::GetTileJob::init | ( | PageRequestProcessor & | processor | ) | [virtual] |
Initializes the tile request and add it to the processor if no error occurs.
Implements ml::GetTileJobBase.
void ml::GetTileJob::setAllocationPolicy | ( | TileRequest::AllocationPolicy | policy | ) | [inline] |
Sets which allocation policy should be used.
NOTE: This can only be changed directly after the constructor of the class, it has no affect when the data is already allocated. The default policy is to use the MLMemoryManager.
Definition at line 91 of file mlGetTileJob.h.
void ml::GetTileJob::setExternalDataBuffer | ( | void * | data | ) | [inline] |
This allows to set the data buffer from an external buffer.
The buffer will not be managed by the GetTileJob, the ownership stays with the user.
Definition at line 102 of file mlGetTileJob.h.
void ml::GetTileJob::setRequestAsReadOnlyPage | ( | ) | [inline] |
Sets that the tile is used read-only (so that a ML page can be passed directly as tile data) This will only work under special conditions: The tile's box/datatype/shiftScale needs to exactly match the input page.
This sets the allocation policy to NoAllocation, since the data should be taken from the existing page. If it fails to get the data read-only, no data will be received.
Definition at line 98 of file mlGetTileJob.h.