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

Recieves status reports from FDR about ongoing tasks. More...

#include <progress_reporter.h>

Inheritance diagram for FDR::ProgressReporter:
Inheritance graph
[legend]

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.
 

Detailed Description

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.

Member Function Documentation

◆ activate()

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

◆ deactivate()

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

◆ task_started()

virtual void FDR::ProgressReporter::task_started ( TaskId  task_id,
TaskId  parent_task_id,
const std::string &  task_name 
)
virtual

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 in FDR::StreamProgressReporter, and FDR::FileProgressReporter.


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