#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.
Definition at line 34 of file ConsoleProgressViewer.cpp.
| te::common::ConsoleProgressViewer::~ConsoleProgressViewer | ( | ) | 
Virtual destructor.
Definition at line 42 of file ConsoleProgressViewer.cpp.
      
  | 
  virtual | 
Insert a new task in the progress viewer.
| t | Task pointer. | 
| id | Task identifier. | 
Implements te::common::AbstractProgressViewer.
Definition at line 46 of file ConsoleProgressViewer.cpp.
      
  | 
  virtual | 
Cancel a task.
| taskId | Task identifier. | 
Implements te::common::AbstractProgressViewer.
Definition at line 71 of file ConsoleProgressViewer.cpp.
      
  | 
  virtual | 
Removes a task from progress viewer container.
| taskId | Task identifier. | 
Implements te::common::AbstractProgressViewer.
Definition at line 53 of file ConsoleProgressViewer.cpp.
      
  | 
  virtual | 
Set task total steps.
| taskId | Task identifier. | 
Implements te::common::AbstractProgressViewer.
Definition at line 87 of file ConsoleProgressViewer.cpp.
      
  | 
  virtual | 
Update the progress message.
| taskId | Task identifier. | 
Implements te::common::AbstractProgressViewer.
Definition at line 108 of file ConsoleProgressViewer.cpp.
References TR_COMMON.
      
  | 
  virtual | 
Update the progress evaluation.
| taskId | Task identifier. | 
Implements te::common::AbstractProgressViewer.
Definition at line 92 of file ConsoleProgressViewer.cpp.
References TR_COMMON.
      
  | 
  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.