13#ifndef ML_BACKGROUND_TASK_MESSAGES_H
14#define ML_BACKGROUND_TASK_MESSAGES_H
25class ProcessAllPagesHandler;
#define MLBACKGROUNDTASKS_EXPORT
Project global and OS specific declarations.
void execute() override
execute message when it is delivered (reimplement in subclasses)
BackgroundTaskFinishedMessage(BackgroundTask *task)
BackgroundTaskMLGetTileBaseMessage(BackgroundRequestId tileId, Module *module)
bool finishedProcessing() override
tells if the message needs further processing or if it may be deleted if true is returned,...
BackgroundRequestId _tileId
GetTileJobBase * _request
virtual void sendFinishedRequest()=0
virtual void sendProgress()=0
void taskWillBeDestroyed() override
this needs to be implemented if the message uses finishedProcessing() and the task is finished while ...
void executeSynchronous() override
execute message when it is delivered and the task runs synchronous, the default implementation just c...
static void tileRequestFinishedCB(void *data, TileRequest *request)
~BackgroundTaskMLGetTileBaseMessage() override
virtual void sendFailedRequest()=0
void sendFailedRequest() override
BackgroundTaskMLGetTileMessage(BackgroundRequestId tileId, Module *module, int inputImageIndex, MLDataType type, const SubImageBox &box, const ScaleShiftData &shift=ScaleShiftData(), int getTileFlags=0, ManagedSubImage *externalBuffer=nullptr)
void sendProgress() override
~BackgroundTaskMLGetTileMessage() override
void sendFinishedRequest() override
void execute() override
execute message when it is delivered (reimplement in subclasses)
void execute() override
execute message when it is delivered (reimplement in subclasses)
BackgroundTaskMLGetTileResultMessage(ImagingBackgroundTask *task, BackgroundRequestId tileId, ManagedSubImage *img)
~BackgroundTaskMLGetTileResultMessage() override
void sendFinishedRequest() override
void sendProgress() override
void execute() override
execute message when it is delivered (reimplement in subclasses)
~BackgroundTaskMLProcessAllPagesMessage() override
BackgroundTaskMLProcessAllPagesMessage(BackgroundRequestId tileId, Module *module, ProcessAllPagesHandler *handler, const SubImageBox &box)
void sendFailedRequest() override
BackgroundTaskMLProcessAllPagesResultMessage(ImagingBackgroundTask *task, BackgroundRequestId requestId, ProcessAllPagesHandler *handler)
~BackgroundTaskMLProcessAllPagesResultMessage() override
void execute() override
execute message when it is delivered (reimplement in subclasses)
The base class of all background messages.
void setSender(BackgroundTask *task)
set who sends the message (default is NULL and means that the message's sender is not a BackgroundTas...
Base class for a task that is started in an extra thread.
Base class for TileRequest based jobs.
ManagedSubImage is derived from SubImage and frees its allocated memory automatically when it is dest...
Base class for an image processing module of the ML.
Base class for handlers that are used for the Module::processAllPages facility.
A TileRequest either represents the input sub image that is needed by a PageRequest or if it is a roo...
MLint32 MLDataType
MLDataType.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
TScaleShiftData< MLdouble > ScaleShiftData
Double version of TScaleShiftData for maximum reasonable precision.
MLuint32 BackgroundRequestId
the id of a tile request