26 #ifndef __TERRALIB_COMMON_PROGRESS_INTERNAL_PROGRESSMANAGER_H 
   27 #define __TERRALIB_COMMON_PROGRESS_INTERNAL_PROGRESSMANAGER_H 
   30 #include "../Config.h" 
   31 #include "../Singleton.h" 
   32 #include "../ThreadingPolicies.h" 
   60                                                                                   ::boost::recursive_mutex,
 
   61                                                                                   ::boost::lock_guard< ::boost::recursive_mutex>,
 
   62                                                                                   ::boost::lock_guard< ::boost::recursive_mutex> >,
 
A class that defines the interface of an abstract progress viewer.
 
This policy assures an object-level locking scheme for a derived class.
 
A singleton class used to manage tasks progresses and their viewers.
 
void cancelTask(int taskId)
Inform all viewers that a task was canceled.
 
int m_taskCounter
Counter used to generate a task id.
 
int generateViewerId()
Used to generate a new viewer id (use internal counter).
 
void setTotalValues(int taskId)
Inform all viewers that a task set the total values.
 
void removeTask(int taskId)
Used in TaskProgress destructor, remove task from singleton.
 
void removeViewer(int viewerId)
Dettach a progress viewer (AbstractProgressViewer destructor calls this method).
 
void clearAll()
Removes references for Viewers and tasks.
 
~ProgressManager()
Destructor.
 
int generateTaskId()
Used to generate a new task id (use internal counter).
 
std::map< int, TaskProgress * > m_tasks
Container with tasks.
 
std::map< int, AbstractProgressViewer * > m_viewers
Container with viewers.
 
void cancelTasks(unsigned int type)
Cancels the task with the given task type and inform all viewers that a task was canceled.
 
int addTask(TaskProgress *tp)
Used in TaskProgress constructor, register this task generating a task id.
 
void updateMessage(int taskId)
Inform all viewers that a task set the message.
 
int addViewer(AbstractProgressViewer *apv)
Attach a progress viewer.
 
int m_viewerCounter
Counter used to generate a viewer id.
 
void updateValue(int taskId)
Inform all viewers that a task set the current step.
 
void setSuspendViewers(bool flag)
 
ProgressManager()
Default constructor.
 
Template support for singleton pattern.
 
This class can be used to inform the progress of a task.
 
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.