DAVID4 SDK  1.8.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ClientD4Lib.h
1 //=============================================================================
2 // See License in Related Pages
3 //=============================================================================
4 
5 #pragma once
6 
7 #ifndef DAVID_SDK_CLIENT_D4LIB_H
8 #define DAVID_SDK_CLIENT_D4LIB_H
9 
10 #include "davidSDK/IModules.h"
11 
12 namespace david {
13 
14 //*****************************************************************************
15 /// @addtogroup ManagerGroup
16 /// @{
17 /// @defgroup ClientD4LibGroup Client for DAVID Low Level Library
18 /// IModules implementation for binding of DAVID Low Level Library (d4lib).
19 /// @{
20 //*****************************************************************************
21 
22 //=============================================================================
23 // LibraryInfo
24 //=============================================================================
25 
26 /// Informat about the library.
28 {
29  bool licenseOk; ///< Is license ok?
30  std::string libraryVersion; ///< Describes the version of the library.
31 
32  /// Constructor.
33  LibraryInfo() : licenseOk(false) {}
34 };
35 
36 
37 //=============================================================================
38 // ClientD4Lib
39 //=============================================================================
40 
41 /// Implementation of IModules and client using DAVID Low Level Library (d4lib).
42 class ClientD4Lib : public IModules
43 {
44 public:
45  /// Constructor.
46  ClientD4Lib();
47 
48  /// Destructor.
49  virtual ~ClientD4Lib();
50 
51  /// Init 'DAVID Low Level Library' (d4lib).
52  /// @warning You need a valid shared library file ('d4lib.dll' on Windows) with a valid license file (usually distributed on USB key)
53  /// @param[in] licenseKey License key string. Only required for special/future versions - normally please leave empty
54  /// @return Information about the library, see david::LibraryInfo.
55  virtual LibraryInfo InitLibrary(const std::string& licenseKey);
56 
57  /// Release library.
58  virtual void ReleaseLibrary();
59 
60  // See IModules
61  virtual IStructuredLightScanner& sls();
62 
63  // See IModules
64  virtual IShapeFusion& fusion();
65 
66  // See IModules
67  virtual ITurntable& turntable();
68 
69  // See IModules
70  virtual IMeasure& measure();
71 
72  // See IModules
73  virtual IMainWindow& mainWindow();
74 
75 protected:
76  /// Create module instances.
77  virtual void CreateModules();
78 
79  /// Create IStructuredLightScanner module.
80  /// @param[in,out] fusion Valid pointer to IShapeFusion implementation.
81  /// @return Pointer to IStructuredLightScanner implementation.
83 
84  /// Create IShapeFusion module.
85  /// @return Pointer to IShapeFusion implementation.
86  virtual IShapeFusion* Create_fusion();
87 
88 protected:
89  IStructuredLightScanner* m_sls; ///< IStructuredLightScanner implementation.
90  IShapeFusion* m_fusion; ///< IShapeFusion implementation.
91  IMeasure* m_measure; ///< IMeasure implementation.
92  ITurntable* m_turntable; ///< ITurntable implementation.
93  IMainWindow* m_mainWindow; ///< IMainWindow implementation.
94 };
95 
96 /// @} ClientD4LibGroup
97 /// @} ManagerGroup
98 
99 } // namespace
100 
101 #endif // DAVID_SDK_CLIENT_D4LIB_H