#include <ConsoleProgressViewer.h>
Public Member Functions | |
| void | addTask (TaskProgress *t, int id) |
| Insert a new task in the progress viewer. | |
| void | cancelTask (int taskId) |
| Cancel a task. | |
| ConsoleProgressViewer () | |
| Default constructor. | |
| void | removeTask (int taskId) |
| Removes a task from progress viewer container. | |
| void | setTotalValues (int taskId) |
| Set task total steps. | |
| void | updateMessage (int taskId) |
| Update the progress message. | |
| void | updateValue (int taskId) |
| Update the progress evaluation. | |
| ~ConsoleProgressViewer () | |
| Virtual destructor. | |
Protected Attributes | |
| int | m_currentStep |
| Attribute used to define the current steps of all task. | |
| std::string | m_message |
| Attribute used to define the progress message. | |
| int | m_propStep |
| Attribute used to define the proportional step (0-100). | |
| std::map< int, TaskProgress * > | m_tasks |
| Task container. | |
| int | m_totalSteps |
| Attribute used to define the total steps of all tasks. | |
| int | m_viewerId |
\briefA 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.
|
protectedinherited |
Definition at line 105 of file AbstractProgressViewer.h.