Artec 3D Scanning SDK  2.0
IScannerObserver.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Interface for receiving events from the scanner
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 #ifndef _ISCANNEREVENT_H_
11 #define _ISCANNEREVENT_H_
12 
13 #include <artec/sdk/base/IRef.h>
15 #include <artec/sdk/base/RefBase.h>
16 
17 namespace artec { namespace sdk { namespace capturing
18 {
19 
20 /**
21 * Interface to receive notifications about scanner's life events (e.g., buttons pressed).
22 * \note Avoid displaying messages or performing any long-term operations in these callbacks.
23 * Use flags and output messages to the main thread.
24 */
26 {
27 public:
28  /**
29  * This method is called back when any button is pressed. Note that not all buttons
30  * are supported for all scanners.
31  * @param button - button pressed.
32  */
33  virtual void buttonPressed(ScannerButton button) = 0;
34 
35  /**
36  * This method is called back when the scanner is overheated.
37  */
38  virtual void deviceOverheated() = 0;
39 
40  /**
41  * This method is called back when the scanner temperature is down to the normal value.
42  */
43  virtual void deviceTemperatureBackToNormal() = 0;
44 
45  /**
46  * This method is called back when the scanner is disconnected.
47  * \warning Ensure that the scanner object is not deleted here as it may cause memory leak and
48  * corruption. Delete or release scanner object
49  * in the same thread where it was created.
50  */
51  virtual void deviceDisconnected() = 0;
52 };
53 
54 /**
55 * The preferred way to use IScannerObserver is through using this class as a base.
56 * It already supports reference counting.
57 */
58 class ScannerObserverBase : public artec::sdk::base::RefBase<IScannerObserver>
59 {
60 };
61 
62 } } } // namespace artec::sdk::capturing
63 
64 #endif // _ISCANNEREVENT_H_
virtual void deviceOverheated()=0
This method is called back when the scanner is overheated.
virtual void deviceTemperatureBackToNormal()=0
This method is called back when the scanner temperature is down to the normal value.
The preferred way to use IScannerObserver is through using this class as a base.
virtual void buttonPressed(ScannerButton button)=0
This method is called back when any button is pressed.
virtual void deviceDisconnected()=0
This method is called back when the scanner is disconnected.
Interface to receive notifications about scanner's life events (e.g., buttons pressed).
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