Loading...
Searching...
No Matches
AbstractProgressViewer.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file terralib/common/progress/AbstractProgressViewer.h
22
23 \brief A class that defines the interface of an abstract progress viewer.
24*/
25
26#ifndef __TERRALIB_COMMON_PROGRESS_INTERNAL_ABSTRACTPROGRESSVIEWER_H
27#define __TERRALIB_COMMON_PROGRESS_INTERNAL_ABSTRACTPROGRESSVIEWER_H
28
29// TerraLib
30#include "../Config.h"
31
32namespace te
33{
34 namespace common
35 {
36// Forward declarations
37 class TaskProgress;
38
39 /*!
40 \class AbstractProgressViewer
41
42 \brief A class that defines the interface of an abstract progress viewer.
43
44 \ingroup common
45
46 \sa TaskProgress, ProgressManager
47 */
49 {
50 public:
51
52 /*! \brief Default constructor. */
54
55 /*! \brief Virtual destructor. */
57
58 /*!
59 \brief Insert a new task in the progress viewer.
60
61 \param t Task pointer.
62 \param id Task identifier.
63
64 \note The Progress Viewer will NOT take the ownership of TaskProgress (t).
65 */
66 virtual void addTask(TaskProgress* t, int id) = 0;
67
68 /*!
69 \brief Removes a task from progress viewer container.
70
71 \param taskId Task identifier.
72 */
73 virtual void removeTask(int taskId) = 0;
74
75 /*!
76 \brief Cancel a task.
77
78 \param taskId Task identifier.
79 */
80 virtual void cancelTask(int taskId) = 0;
81
82 /*!
83 \brief Set task total steps.
84
85 \param taskId Task identifier.
86 */
87 virtual void setTotalValues(int taskId) = 0;
88
89 /*!
90 \brief Update the progress evaluation.
91
92 \param taskId Task identifier.
93 */
94 virtual void updateValue(int taskId) = 0;
95
96 /*!
97 \brief Update the progress message.
98
99 \param taskId Task identifier.
100 */
101 virtual void updateMessage(int taskId) = 0;
102
103 protected:
104
106 };
107
108 } // end namespace common
109} // end namespace te
110
111#endif //__TERRALIB_COMMON_PROGRESS_INTERNAL_ABSTRACTPROGRESSVIEWER_H
A class that defines the interface of an abstract progress viewer.
virtual void cancelTask(int taskId)=0
Cancel a task.
virtual void updateMessage(int taskId)=0
Update the progress message.
virtual void setTotalValues(int taskId)=0
Set task total steps.
AbstractProgressViewer()
Default constructor.
virtual void addTask(TaskProgress *t, int id)=0
Insert a new task in the progress viewer.
virtual ~AbstractProgressViewer()
Virtual destructor.
virtual void updateValue(int taskId)=0
Update the progress evaluation.
virtual void removeTask(int taskId)=0
Removes a task from progress viewer container.
This class can be used to inform the progress of a task.
Definition: TaskProgress.h:54
TerraLib.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66