Artec 3D Scanning SDK  2.0
IJobObserver.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Get events from IJob interface.
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _IJOBOBSERVER_H_
12 #define _IJOBOBSERVER_H_
13 
14 #include <artec/sdk/base/Errors.h>
15 #include <artec/sdk/base/RefBase.h>
16 
17 namespace artec { namespace sdk { namespace base
18 {
19 
20 /**
21 * Callback interface to observe job completion.
22 * Inherit it to make an observer and pass it to launchJob().
23 * See launchJob() for details.
24 */
25 class IJobObserver : public IRef
26 {
27 public:
28  /** Job completion callback. Implement it in your class
29  * @param result Accepts the returned ErrorCode of the job.
30  */
31  virtual void completed(ErrorCode result) = 0;
32 };
33 
34 /**
35 * For inheritance, this class is preferred over IJobObsever.
36 * This class implements reference counting in order to simplify actual Job Observer creation.
37 */
38 class JobObserverBase : public RefBase<IJobObserver>
39 {
40 };
41 
42 /**
43 * Backward-compability support for clients designed to work with previous versions of the SDK.
44 */
45 
46 #ifdef __has_cpp_attribute
47 #if __has_cpp_attribute(deprecated)
48 [[deprecated]] typedef IJobObserver IJobObsever;
49 #endif
50 #else
52 #endif
53 
54 } } } // namespace artec::sdk::base
55 
56 #endif // _IJOBOBSERVER_H_
Callback interface to observe job completion.
Definition: IJobObserver.h:25
IJobObserver IJobObsever
Backward-compability support for clients designed to work with previous versions of the SDK...
Definition: IJobObserver.h:51
For inheritance, this class is preferred over IJobObsever.
Definition: IJobObserver.h:38
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
virtual void completed(ErrorCode result)=0
Job completion callback.