FDR
4.2.7(6ecbe5a21b71ab020e8fcaeccfe5ebaad0599f4f)
|
A simple progress reporter that logs all progress reports to a file. More...
#include <progress_reporter.h>
Public Member Functions | |
FileProgressReporter (const std::string &file_name) | |
Creates a new progress reporter. More... | |
void | activate () override |
Actives this progress reporter, subscribing it to any updates. More... | |
void | deactivate () override |
Deactivates this progress reporter, unsubscribing it from updates. More... | |
void | task_finished (TaskId task_id) override |
Called when a new task is finished. | |
void | task_message_output (TaskId task_id, const std::string &message) override |
Called when a task generates a relevant message. | |
void | task_started (TaskId task_id, TaskId parent_task_id, const std::string &task_name) override |
Called when a new task is started. More... | |
void | task_status_updated (TaskId task_id, const std::string &new_status) override |
Called when a task's status message has been updated. | |
Additional Inherited Members | |
![]() | |
enum | { INVALID_TASK = 0 } |
A simple progress reporter that logs all progress reports to a file.
FDR::FileProgressReporter::FileProgressReporter | ( | const std::string & | file_name | ) |
Creates a new progress reporter.
file_name | The file to write progress reports to. |
|
overridevirtual |
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 from FDR::ProgressReporter.
|
overridevirtual |
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 from FDR::ProgressReporter.
|
overridevirtual |
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 from FDR::ProgressReporter.