IRef.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Reference counting. Base class for all interfaces.
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _IREF_H_
12 #define _IREF_H_
13 
14 namespace artec { namespace sdk { namespace base
15 {
16 
17 class IRef
18 {
19 public:
20  /// Increase object reference counter.
21  ///
22  /// @return
23  /// Counter value
24  virtual int addRef() const = 0;
25 
26  /// Decrease object reference counter.
27  ///
28  /// @detailed
29  /// Destroy object and free allocated memory when counter = 0.
30  ///
31  /// @return
32  /// Counter value
33  virtual int release() const = 0;
34 };
35 
36 } } } // namespace artec::sdk::base
37 
38 #endif // _IREF_H_
virtual int addRef() const =0
virtual int release() const =0