ICancellationTokenSource.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Create cancellation token
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _ICANCELLATIONTOKENSOURCE_H_
12 #define _ICANCELLATIONTOKENSOURCE_H_
13 
15 #include <artec/sdk/base/Errors.h>
16 #include <artec/sdk/base/IRef.h>
18 
19 namespace artec { namespace sdk { namespace base
20 {
21 
22 class ICancellationTokenSource;
23 
24 extern "C"
25 {
26 
28  createCancellationTokenSource(ICancellationTokenSource** pCancellationTokenSource);
29 
30 }
31 
33 {
34 public:
35 
36  /** Set cancellation signal. isCancellationRequested() will return true.
37  */
38  virtual void cancel() = 0;
39 
40  /** Return ICancellationToken interface
41  */
42  virtual ICancellationToken* getToken() = 0;
43 };
44 
45 
46 } } } // namespace artec::sdk::base
47 
48 #endif // _ICANCELLATIONTOKENSOURCE_H_
virtual ICancellationToken * getToken()=0
ErrorCode ABASESDK_LINK_SPEC createCancellationTokenSource(ICancellationTokenSource **pCancellationTokenSource)
#define ABASESDK_LINK_SPEC
Definition: BaseSdkDefines.h:7