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. More...
 
virtual void taskAdded (BackgroundTask *task)=0
 Called when a task was added (but is not yet started). More...
 
virtual void taskRemoved (BackgroundTask *task)=0
 Called when a task was removed (either finished or canceled or not even started). More...
 
virtual void taskStatusUpdated ()=0
 Called in regular intervals if there are running tasks and if the tasks change status. More...
 

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 or taskRemoved is called.

Definition at line 111 of file mlBackgroundTaskManager.h.

Constructor & Destructor Documentation

◆ ~Observer()

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

Virtual destructor.

Definition at line 115 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: