|
| ImagingBackgroundTask (void *owner) |
|
| ~ImagingBackgroundTask () override |
|
| MessagingBackgroundTask (void *ownerArg) |
|
template<typename Object , typename Method > |
void | callMethodOnGUI (const DistantObject< Object > &target, Method method) |
|
template<typename Object , typename Method , typename Arg1 > |
void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1) |
|
template<typename Object , typename Method , typename Arg1 , typename Arg2 > |
void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2) |
|
template<typename Object , typename Method , typename Arg1 , typename Arg2 , typename Arg3 > |
void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) |
|
template<typename Object , typename Method , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 > |
void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) |
|
template<typename Object , typename Method , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 > |
void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) |
|
| BackgroundTask (void *owner) |
| Create a new task with given owner (the owner can be used to associate the task with a given class instance, e.g. More...
|
|
virtual | ~BackgroundTask () |
|
virtual void | run ()=0 |
| run method that needs to be reimplemented (called from worker thread) More...
|
|
bool | isSynchronous () const |
| check if task is synchronous (which means it is NOT run in an extra thread) More...
|
|
void | setSynchronous (bool flag) |
| set if task is handled synchronous (call this ONLY on setup of the task, not while it is already running) More...
|
|
void | setSynchronousCancelField (NotifyField *field) |
| set a cancel field that is used in synchronous mode to check if cancel was pressed More...
|
|
Status | status () const |
| returns the status of the task (threadsafe) More...
|
|
void | cancel () |
| cancel the task (sets status to canceled) (threadsafe, typically called from GUI) More...
|
|
bool | isCanceled () const |
| check if the task was canceled (threadsafe, typically called from GUI) More...
|
|
bool | shouldStop () |
| returns if the task should stop its work because it has been canceled. More...
|
|
void | resume () |
| resume task after it was suspended (will only do something if current status() is Suspended) (threadsafe) More...
|
|
void | suspend () |
| suspend task, so that it will wait until resume() is called (threadsafe). More...
|
|
std::string | statusString () const |
| get current status string (threadsafe) More...
|
|
virtual void | setStatusString (const std::string &status) |
| update the status string while processing (from run() method only) More...
|
|
float | progress () const |
| get current progress (threadsafe) More...
|
|
virtual void | setProgress (float progress) |
| update the progress while processing (from run() method only) More...
|
|
void | setOwnerWasDeleted () |
| tell the task that it's owner was deleted (only call from GUI thread!), this also cancels the task More...
|
|
bool | hasOwner () const |
| check if owner was deleted (only call from GUI thread!) More...
|
|
void * | owner () const |
| get the owner of the task (only call from GUI thread!) More...
|
|
void | waitAndExecuteNextMessage () |
| execute the next message (waits if no messages are available and processes the first message that is received) NOTE: only call from within run() More...
|
|
bool | executeNextMessage () |
| execute the next message (does not block if no message is available) It returns true if there was a message to process. More...
|
|
void | sendMessageToGUI (BackgroundTaskMessage *message) |
| send the message to the GUI (ownership of message is passed to the method) and it sets the sender of the message to this BackgroundTask. More...
|
|
void | logMessage (const std::string &message) |
| log a message (only logged if verbose logging is turned on) (threadsafe) More...
|
|
bool | isVerbose () const |
| check if task uses verbose logging More...
|
|
void | setVerbose (bool flag) |
| set if task uses verbose logging (call this ONLY on setup of the task, not while it is already running) More...
|
|
double | runningTime () const |
| returns the running time (in seconds) of the task (after it has finished or canceled, only call from GUI thread) More...
|
|
double | idleTime () const |
| returns the idle time (in seconds) of the task (which it e.g. waited for getTile to complete), (after it has finished or canceled, only call from GUI thread) More...
|
|
void | getStatusInformation (BackgroundTaskStatusInformation &info) |
| get the complete status information (threadsafe) More...
|
|
MLuint32 | taskId () const |
| get the unique id of this task, the id of a task never changes More...
|
|
void | setTaskFinishedCB (BackgroundTaskFinishedCB *callback, void *userdata) |
| set this directly after initialization of the task (from the GUI thread) this callback will be called whenever a task is either finished or canceled More...
|
|
void | addObserver (Observer *observer) |
| add the given observer (threadsafe) (ownership stays with caller) More...
|
|
void | removeObserver (Observer *observer) |
| remove the given observer (threadsafe) (ownership stays with caller) More...
|
|