#include <ConsoleProgressViewer.h>
Public Member Functions | |
void | addTask (TaskProgress *t, int id) |
Insert a new task in the progress viewer. More... | |
void | cancelTask (int taskId) |
Cancel a task. More... | |
ConsoleProgressViewer () | |
Default constructor. More... | |
void | removeTask (int taskId) |
Removes a task from progress viewer container. More... | |
void | setTotalValues (int taskId) |
Set task total steps. More... | |
void | updateMessage (int taskId) |
Update the progress message. More... | |
void | updateValue (int taskId) |
Update the progress evaluation. More... | |
~ConsoleProgressViewer () | |
Virtual destructor. More... | |
Protected Attributes | |
int | m_currentStep |
Attribute used to define the current steps of all task. More... | |
std::string | m_message |
Attribute used to define the progress message. More... | |
int | m_propStep |
Attribute used to define the proportional step (0-100). More... | |
std::map< int, TaskProgress * > | m_tasks |
Task container. More... | |
int | m_totalSteps |
Attribute used to define the total steps of all tasks. More... | |
progress viewer implementation for the console.
This viewer is based on iostream. All the feedback will be generated over a console window. Multiples tasks will be displayed using a single report.
The proportional value is calculated using TOTAL_STEPS / CURRENT_STEPS. Where:
The progress message is defined by the task message, if it has more than one task the message will be set to: "MULTI TASKS".
Definition at line 64 of file ConsoleProgressViewer.h.
te::common::ConsoleProgressViewer::ConsoleProgressViewer | ( | ) |
Default constructor.
te::common::ConsoleProgressViewer::~ConsoleProgressViewer | ( | ) |
Virtual destructor.
|
virtual |
Insert a new task in the progress viewer.
t | Task pointer. |
id | Task identifier. |
Implements te::common::AbstractProgressViewer.
|
virtual |
|
virtual |
Removes a task from progress viewer container.
taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
|
virtual |
Set task total steps.
taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
|
virtual |
Update the progress message.
taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
|
virtual |
Update the progress evaluation.
taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
|
protected |
Attribute used to define the current steps of all task.
Definition at line 89 of file ConsoleProgressViewer.h.
|
protected |
Attribute used to define the progress message.
Definition at line 91 of file ConsoleProgressViewer.h.
|
protected |
Attribute used to define the proportional step (0-100).
Definition at line 90 of file ConsoleProgressViewer.h.
|
protected |
Task container.
Definition at line 92 of file ConsoleProgressViewer.h.
|
protected |
Attribute used to define the total steps of all tasks.
Definition at line 88 of file ConsoleProgressViewer.h.