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]

List of all members.

Public Types

enum  { INVALID_TASK = 0 }

Public Member Functions

virtual void activate ()
 Actives this progress reporter, subscribing it to any updates.
virtual void deactivate ()
 Deactivates this progress reporter, unsubscribing it from updates.
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.
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

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

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

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


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

Generated on 27 Oct 2017 for FDR by  doxygen 1.6.1