FDR
4.2.7(6ecbe5a21b71ab020e8fcaeccfe5ebaad0599f4f)
|
Recieves status reports from FDR about ongoing tasks. More...
#include <progress_reporter.h>
Public Types | |
enum | { INVALID_TASK = 0 } |
Public Member Functions | |
virtual void | activate () |
Actives this progress reporter, subscribing it to any updates. More... | |
virtual void | deactivate () |
Deactivates this progress reporter, unsubscribing it from updates. More... | |
virtual void | task_finished (TaskId task_id) |
Called when a new task is finished. | |
virtual void | task_message_output (TaskId task_id, const std::string &message) |
Called when a task generates a relevant message. | |
virtual void | task_started (TaskId task_id, TaskId parent_task_id, const std::string &task_name) |
Called when a new task is started. More... | |
virtual void | task_status_updated (TaskId task_id, const std::string &new_status) |
Called when a task's status message has been updated. | |
Recieves status reports from FDR about ongoing tasks.
This class is intended to be subclassed and reports logged appropriately.
The methods on this class will be called from many different threads, and thus implementers need to take care of any ensuring thread safety.
|
virtual |
Actives this progress reporter, subscribing it to any updates.
This MUST be called from the main thread before ANY other call to libfdr, other than library_init(), and may only be called once. In other words, once a ProgressReporter is activated, there is no way to activate another ProgressReporter.
If this is overriden, the base class implementation MUST be called.
Reimplemented in FDR::StreamProgressReporter, and FDR::FileProgressReporter.
|
virtual |
Deactivates this progress reporter, unsubscribing it from updates.
This MUST only be called once, after activate().
If this is overriden, the base class implementation MUST be called.
Reimplemented in FDR::StreamProgressReporter, and FDR::FileProgressReporter.
|
virtual |
Called when a new task is started.
task_id | The new task. |
parent_task_id | The identifier of this task's parent (tasks are hierarchical). If there is no parent, this is INVALID_TASK. |
task_name | the name of the task. |
Reimplemented in FDR::StreamProgressReporter, and FDR::FileProgressReporter.