FDR  4.2.7(6ecbe5a21b71ab020e8fcaeccfe5ebaad0599f4f)
Public Member Functions | List of all members
FDR::FileProgressReporter Class Reference

A simple progress reporter that logs all progress reports to a file. More...

#include <progress_reporter.h>

Inheritance diagram for FDR::FileProgressReporter:
Inheritance graph
[legend]
Collaboration diagram for FDR::FileProgressReporter:
Collaboration graph
[legend]

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

- Public Types inherited from FDR::ProgressReporter
enum  { INVALID_TASK = 0 }
 

Detailed Description

A simple progress reporter that logs all progress reports to a file.

Constructor & Destructor Documentation

◆ FileProgressReporter()

FDR::FileProgressReporter::FileProgressReporter ( const std::string &  file_name)

Creates a new progress reporter.

Parameters
file_nameThe file to write progress reports to.

Member Function Documentation

◆ activate()

void FDR::FileProgressReporter::activate ( )
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.

◆ deactivate()

void FDR::FileProgressReporter::deactivate ( )
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.

◆ task_started()

void FDR::FileProgressReporter::task_started ( TaskId  task_id,
TaskId  parent_task_id,
const std::string &  task_name 
)
overridevirtual

Called when a new task is started.

Parameters
task_idThe new task.
parent_task_idThe identifier of this task's parent (tasks are hierarchical). If there is no parent, this is INVALID_TASK.
task_namethe name of the task.

Reimplemented from FDR::ProgressReporter.


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