A singleton class used to manage tasks progresses and their viewers.
More...
#include <ProgressManager.h>
|
typedef ObjectLevelLockingPolicy< ::boost::lock_guard< ::boost::recursive_mutex > > | LockRead |
|
typedef ObjectLevelLockingPolicy< ::boost::lock_guard< ::boost::recursive_mutex > > | LockWrite |
|
typedef volatile ProgressManager | VolatileType |
|
A singleton class used to manage tasks progresses and their viewers.
This singleton is used to store all tasks created and their progress viewers. If one or more viewers is attached, all instances will be used to display the tasks progresses.
- See also
- AbstractProgressViewer, TaskProgress
Definition at line 59 of file ProgressManager.h.
typedef ObjectLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ObjectLevelLockable< ProgressManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::LockRead |
|
inherited |
te::common::ProgressManager::ProgressManager |
( |
| ) |
|
|
protected |
te::common::ProgressManager::~ProgressManager |
( |
| ) |
|
|
protected |
int te::common::ProgressManager::addTask |
( |
TaskProgress * |
tp | ) |
|
Used in TaskProgress constructor, register this task generating a task id.
- Parameters
-
- Returns
- Task identifier
- Note
- Thread-safe!
Attach a progress viewer.
- Parameters
-
apv | Progress viewer instance |
- Returns
- Progress viewer identifier
- Note
void te::common::ProgressManager::cancelTask |
( |
int |
taskId | ) |
|
Inform all viewers that a task was canceled.
- Parameters
-
void te::common::ProgressManager::cancelTasks |
( |
unsigned int |
type | ) |
|
Cancels the task with the given task type and inform all viewers that a task was canceled.
- Parameters
-
void te::common::ProgressManager::clearAll |
( |
| ) |
|
Removes references for Viewers and tasks.
int te::common::ProgressManager::generateTaskId |
( |
| ) |
|
|
protected |
Used to generate a new task id (use internal counter).
- Returns
- Task identification as integer value.
int te::common::ProgressManager::generateViewerId |
( |
| ) |
|
|
protected |
Used to generate a new viewer id (use internal counter).
- Returns
- Viewer identification as integer value.
It returns a reference to the singleton instance.
- Returns
- A reference to the singleton instance.
void te::common::ProgressManager::removeTask |
( |
int |
taskId | ) |
|
Used in TaskProgress destructor, remove task from singleton.
- Parameters
-
- Note
- Thread-safe!
void te::common::ProgressManager::removeViewer |
( |
int |
viewerId | ) |
|
Dettach a progress viewer.
- Parameters
-
viewerId | Progress viewer identifier |
void te::common::ProgressManager::setSuspendViewers |
( |
bool |
flag | ) |
|
|
inline |
void te::common::ProgressManager::setTotalValues |
( |
int |
taskId | ) |
|
Inform all viewers that a task set the total values.
- Parameters
-
void te::common::ProgressManager::updateMessage |
( |
int |
taskId | ) |
|
Inform all viewers that a task set the message.
- Parameters
-
void te::common::ProgressManager::updateValue |
( |
int |
taskId | ) |
|
Inform all viewers that a task set the current step.
- Parameters
-
bool te::common::ProgressManager::m_suspendViewers |
|
protected |
int te::common::ProgressManager::m_taskCounter |
|
protected |
std::map<int, TaskProgress*> te::common::ProgressManager::m_tasks |
|
protected |
int te::common::ProgressManager::m_viewerCounter |
|
protected |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/common/progress/ProgressManager.h