Artec 3D Scanning SDK  2.0
IProgress.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Interface for progress reporters and handlers
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _IPROGRESS_H_
12 #define _IPROGRESS_H_
13 
14 #include <artec/sdk/base/IRef.h>
15 #include <artec/sdk/base/RefBase.h>
16 
17 namespace artec { namespace sdk { namespace base
18 {
19 /** Interface for a progress listener.
20 * Use it to create progress bars or notifiers of any kind and pass them to any algorithm, etc.
21 */
22 class IProgress : public IRef
23 {
24 public:
25  /** Callback for progress reporting. Progress may vary within the range of [0...total].
26  *
27  * @param current progress value
28  * @param total maximum progress value
29  */
30  virtual void report(int current, int total) = 0;
31 
32  /** Report about activity with unknown current status
33  */
34  virtual void pulse() = 0;
35 };
36 
37 /**
38 * For inheritance, this class is preferred over IProgress.
39 * It implements reference counting in order to simplify creation of the actual IProgress implementation.
40 */
41 class ProgressBase : public RefBase<IProgress>
42 {
43 };
44 
45 } } } // namespace artec::sdk::base
46 
47 #endif // _IPROGRESS_H_
Interface for a progress listener.
Definition: IProgress.h:22
virtual void pulse()=0
Report about activity with unknown current status.
virtual void report(int current, int total)=0
Callback for progress reporting.
For inheritance, this class is preferred over IProgress.
Definition: IProgress.h:41
Interface that implements reference counting and life-time management.
Definition: IRef.h:22
Implementation of IRef interface. To create your own class, inherit it from RefBase.
Definition: RefBase.h:75