3DiVi Face SDK  3.20.0
 Указатель Классы Пространства имен Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Свойства Группы
ComplexObject.h
1 #ifndef __PBIO_API__PBIO__COMPLEX_OBJECT_H_
2 #define __PBIO_API__PBIO__COMPLEX_OBJECT_H_
3 
5 
6 #include "DllHandle.h"
7 #include "SmartPtr.h"
8 
9 namespace pbio
10 {
11 
12 // this class is NOT virtual
13 class ComplexObject
14 {
15 protected:
16 
17  typedef LightSmartPtr<import::DllHandle>::tPtr DHPtr;
18 
19  ComplexObject(
20  const DHPtr &dll_handle,
21  void* const impl
22  ):
23  _dll_handle(dll_handle),
24  _impl(impl)
25  {
26  // nothing else
27  }
28 
29  ~ComplexObject()
30  {
31  if(_impl)
32  _dll_handle->apiObject_destructor(_impl);
33  }
34 
35  const DHPtr _dll_handle;
36  void* const _impl;
37  int32_t refcounter4light_shared_ptr;
38 
39 //private:
40 // ComplexObject(const ComplexObject&); // deleted
41 // ComplexObject& operator=(const ComplexObject&); // deleted
42 };
43 
44 
45 } // pbio namespace
46 
48 
49 #endif // __PBIO_API__PBIO__COMPLEX_OBJECT_H_
SmartPtr.