MeVisLab Toolbox Reference
ml::BackgroundTaskManager::Observer Class Referenceabstract

abstract interface to observe the BackgroundTaskManager More...

#include <mlBackgroundTaskManager.h>

Public Member Functions

virtual ~Observer ()
 virtual destructor
 
virtual void taskAdded (BackgroundTask *task)=0
 called when a task was added (but is not yet started)
 
virtual void taskRemoved (BackgroundTask *task)=0
 called when a task was removed (either finished or canceled or not even started)
 
virtual void taskStatusUpdated ()=0
 called in regular intervals if there are running tasks and if the tasks change status
 

Detailed Description

abstract interface to observe the BackgroundTaskManager

The BackgroundTaskManager guarantees that the Observer is only called from within the GUI thread and that the given task is not changed while taskAdded/taskRemoved is called.

Definition at line 106 of file mlBackgroundTaskManager.h.

Constructor & Destructor Documentation

◆ ~Observer()

virtual ml::BackgroundTaskManager::Observer::~Observer ( )
inlinevirtual

virtual destructor

Definition at line 110 of file mlBackgroundTaskManager.h.

Member Function Documentation

◆ taskAdded()

virtual void ml::BackgroundTaskManager::Observer::taskAdded ( BackgroundTask * task)
pure virtual

called when a task was added (but is not yet started)

◆ taskRemoved()

virtual void ml::BackgroundTaskManager::Observer::taskRemoved ( BackgroundTask * task)
pure virtual

called when a task was removed (either finished or canceled or not even started)

◆ taskStatusUpdated()

virtual void ml::BackgroundTaskManager::Observer::taskStatusUpdated ( )
pure virtual

called in regular intervals if there are running tasks and if the tasks change status

You should use this as an indication to schedule an update to the user interface if you want to show the tasklist progress. Do NOT do expensive operation in taskStatusUpdated(), since it is called for each message a task sends to the GUI.


The documentation for this class was generated from the following file: