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