27 #include "../Translator.h" 
   48   m_tasks.insert(std::map<int, TaskProgress*>::value_type(
id, t));
 
   55   std::map<int, TaskProgress*>::iterator it = m_tasks.find(taskId);
 
   57   if(it != m_tasks.end())
 
   73   std::map<int, TaskProgress*>::iterator it = m_tasks.find(taskId);
 
   75   if(it != m_tasks.end())
 
   78     m_totalSteps -= it->second->getTotalSteps();
 
   79     m_currentStep -= it->second->getCurrentStep();
 
   81     double aux = 
static_cast<double>(m_currentStep) / static_cast<double>(m_totalSteps);
 
   83     m_propStep = 
static_cast<int>(100.0 * aux);
 
   89   m_totalSteps += m_tasks[taskId]->getTotalSteps();
 
   96   double aux = 
static_cast<double>(m_currentStep) / static_cast<double>(m_totalSteps);
 
   98   int val = 
static_cast<int>(100.0 * aux);
 
  100   if((val != m_propStep) && (val >= 0))
 
  104     std::cout << m_message << 
TR_COMMON(
" - Percent: ") << m_propStep << 
"%" <<std::endl;
 
  110   if(m_tasks.size() == 1)
 
  112     m_message = m_tasks.begin()->second->getMessage();
 
A class that defines the interface of an abstract progress viewer. 
 
This class can be used to inform the progress of a task. 
 
A progress viewer implementation for the console. 
 
~ConsoleProgressViewer()
Virtual destructor. 
 
void updateMessage(int taskId)
Update the progress message. 
 
ConsoleProgressViewer()
Default constructor. 
 
void updateValue(int taskId)
Update the progress evaluation. 
 
#define TR_COMMON(message)
It marks a string in order to get translated. This is the mark used in the Common module of TerraLib...
 
void addTask(TaskProgress *t, int id)
Insert a new task in the progress viewer. 
 
This class can be used to inform the progress of a task. 
 
void setTotalValues(int taskId)
Set task total steps. 
 
void removeTask(int taskId)
Removes a task from progress viewer container. 
 
void cancelTask(int taskId)
Cancel a task.