Go to the documentation of this file.
12 #ifndef _LIBQI_QI_API_HPP_
13 #define _LIBQI_QI_API_HPP_
16 #if defined(__GNUC__) && defined(WITH_DEPRECATED) && !defined(QI_NO_API_DEPRECATED)
17 # define QI_API_DEPRECATED __attribute__((deprecated))
18 #elif defined(_MSC_VER) && defined(WITH_DEPRECATED) && !defined(QI_NO_API_DEPRECATED)
19 # define QI_API_DEPRECATED __declspec(deprecated)
21 # define QI_API_DEPRECATED
25 #if defined _WIN32 || defined __CYGWIN__
26 # define QI_EXPORT_API __declspec(dllexport)
28 # define QI_IMPORT_API __declspec(dllimport)
30 # define QI_IMPORT_API
33 # define QI_EXPORT_API __attribute__ ((visibility("default")))
34 # define QI_IMPORT_API __attribute__ ((visibility("default")))
36 # define QI_EXPORT_API
37 # define QI_IMPORT_API
44 #define QI_DO_PRAGMA(x) __pragma(x)
45 #define __ALSTR2__(x) #x
46 #define __ALSTR1__(x) __ALSTR2__(x)
47 #define _ALMSVCLOC_ __FILE__ "("__ALSTR1__(__LINE__)") : "
48 #define QI_MSG_PRAGMA(_msg) QI_DO_PRAGMA(message (_ALMSVCLOC_ _msg))
49 #elif defined(__GNUC__)
50 #define QI_DO_PRAGMA(x) _Pragma (#x)
51 #define QI_MSG_PRAGMA(_msg) QI_DO_PRAGMA(message (_msg))
53 #define QI_DO_PRAGMA(x)
54 #define QI_MSG_PRAGMA(_msg)
60 #if !defined(WITH_DEPRECATED) || defined(QI_NO_COMPILER_WARNING)
61 # define QI_COMPILER_WARNING(x)
63 # define QI_COMPILER_WARNING(x) QI_MSG_PRAGMA("Warning: " #x)
67 #if !defined(WITH_DEPRECATED) || defined(QI_NO_DEPRECATED_HEADER)
68 # define QI_DEPRECATED_HEADER(x)
70 # define QI_DEPRECATED_HEADER(x) QI_MSG_PRAGMA("\
71 This file includes at least one deprecated or antiquated ALDEBARAN header \
72 which may be removed without further notice in the next version. \
73 Please consult the changelog for details. " #x)
78 #define QI_DISALLOW_COPY_AND_ASSIGN(type) \
80 void operator=(type const &)
83 # define QI_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
85 # define QI_WARN_UNUSED_RESULT
90 #endif // _LIBQI_QI_API_HPP_