Artec 3D Scanning SDK  2.0
ICancellationToken.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Interface for long-time processes
6 * that allow them to check cancellation condition
7 *
8 * Copyright: Artec Group
9 *
10 ********************************************************************/
11 
12 #ifndef _ICANCELLATIONTOKEN_H_
13 #define _ICANCELLATIONTOKEN_H_
14 
15 #include <artec/sdk/base/IRef.h>
16 
17 namespace artec { namespace sdk { namespace base
18 {
19 
20 /**
21 * Callback interface to notify process about cancellation
22 */
23 class ICancellationToken : public IRef
24 {
25 public:
26 
27  /** Callback to ask if the process is canceled and should stop as soon as possible
28  *
29  * @return
30  * true if cancellation is requested and false otherwise
31  */
32  virtual bool isCancellationRequested() = 0;
33 };
34 
35 } } } // namespace artec::sdk::base
36 
37 #endif // _ICANCELLATIONTOKEN_H_
Callback interface to notify process about cancellation.
virtual bool isCancellationRequested()=0
Callback to ask if the process is canceled and should stop as soon as possible.
Interface that implements reference counting and life-time management.
Definition: IRef.h:22