A base class which callers can inherit from to be able to receive progress updates and error messages. More...
#include <aoflagger.h>
Public Member Functions | |
virtual | ~StatusListener () |
Virtual destructor. | |
virtual void | OnEndTask () |
Called when at the end of the current task. More... | |
virtual void | OnException (std::exception &thrownException)=0 |
Called when an exception occurs during execution of the strategy. More... | |
virtual void | OnProgress (size_t progress, size_t maxProgress) |
Called while the current task is progressing. More... | |
virtual void | OnStartTask (size_t taskNo, size_t taskCount, const std::string &description) |
This virtual method is called when a new task is started. More... | |
A base class which callers can inherit from to be able to receive progress updates and error messages.
A status listener should be thread safe when the Run() method is called in parallel.
|
inlinevirtual |
Called when at the end of the current task.
After OnEndTask() is called, the handler does not need to expect any OnProgress() calls until a new task has been started and OnStartTask() was called.
|
pure virtual |
Called when an exception occurs during execution of the strategy.
This can occur when for example the strategy is malformed.
thrownException | The exception that was thrown. |
|
inlinevirtual |
Called while the current task is progressing.
This can be used to display a progress bar if the strategy would take a lot of time.
progress | Current progress |
maxProgress | Progress that is required to finish the current task. |
|
inlinevirtual |
This virtual method is called when a new task is started.
Typically, a client could display a message saying that the given task 'description' is started. This method can be called recursively to signify the start of a subtask.
taskNo | (Sub) task number |
taskCount | Total number of (sub) tasks. |
description | Description of the task, e.g. "SumThreshold". |