Artec 3D Scanning SDK  2.0
BaseSdkDefines.h
Go to the documentation of this file.
1 #ifndef BaseSdkDefines_h__
2 #define BaseSdkDefines_h__
3 
4 ////////////////////////
5 // ABASESDK_LINK_SPEC
6 //
7 #if defined(_WIN32) && defined(BUILD_ABASESDK_SHARED_LIB)
8  #define ABASESDK_LINK_SPEC __declspec (dllexport)
9 #else
10  #define ABASESDK_LINK_SPEC
11 #endif // _WIN32 DLL
12 
13 ////////////////////////
14 // ASDK_DEPRECATED
15 //
16 #ifdef __has_cpp_attribute
17 # if __has_cpp_attribute(deprecated)
18 # define HAS_STD_DEPRECATION
19 # endif
20 #endif // __has_cpp_attribute
21 
22 #ifdef HAS_STD_DEPRECATION
23 # define ASDK_DEPRECATED(func)[[deprecated]] func
24 # undef HAS_STD_DEPRECATION
25 #else // HAS_STD_DEPRECATION
26 # if defined(_MSC_VER)
27 # define ASDK_DEPRECATED(func) __declspec(deprecated) func
28 # elif defined(__GNUC__) || defined(__clang__)
29 # define ASDK_DEPRECATED(func) func __attribute__((deprecated))
30 # define ASDK_DEPRECATED(func) func __attribute__((deprecated))
31 # else
32 # pragma message("WARNING: ASDK_DEPRECATED macro is not implemented for this compiler")
33 # define ASDK_DEPRECATED(func) func
34 # endif
35 #endif // HAS_STD_DEPRECATION
36 
37 ////////////////////////
38 // ASDK_UNUSED
39 //
40 #define ASDK_UNUSED(x) x
41 
42 #endif // BaseSdkDefines_h__