Main MRPT website
>
C++ reference for MRPT 1.5.7
xSens_MT4
xstypes
include
xsens
xstypesconfig.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| Mobile Robot Programming Toolkit (MRPT) |
3
| http://www.mrpt.org/ |
4
| |
5
| Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6
| See: http://www.mrpt.org/Authors - All rights reserved. |
7
| Released under BSD License. See details in http://www.mrpt.org/License |
8
+---------------------------------------------------------------------------+ */
9
#define XSTYPES_DLL_API
10
#define XSNOEXPORT
11
#define XSENS_NO_AUTOLIB
12
// include this file in Visual Studio using C/C++->Advanced->Force Includes (the /FI option)
13
#ifndef XSTYPES_CONFIG_H
14
#define XSTYPES_CONFIG_H
15
16
//////////////////////////////////////////////////
17
// generic preprocessor defines
18
19
//http://support.microsoft.com/kb/155196
20
#define __STR2__(x) #x
21
#define __STR1__(x) __STR2__(x)
22
#define __LOC__ __FILE__ "(" __STR1__(__LINE__) ") : WARNING: "
23
24
// make sure both _WIN32 and WIN32 are defined if either of them is.
25
#if defined(_WIN32) || defined(_M_IX86)
26
# ifndef WIN32
27
# define WIN32
28
# endif
29
# define XSENS_WINDOWS
30
#endif
31
32
#ifdef WIN32
33
# ifndef _WIN32
34
# define _WIN32
35
# define XSENS_WINDOWS
36
# endif
37
#endif
38
#if !defined(_WIN32) && defined(_MSC_VER) && !defined(_WIN64)
39
# define _WIN64
40
#endif
41
42
// make things as secure as possible without modifying the code...
43
#ifndef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
44
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
45
#endif
46
#ifndef _CRT_SECURE_NO_WARNINGS
47
#define _CRT_SECURE_NO_WARNINGS
48
#endif
49
50
#ifndef __cplusplus
51
// make sure that const-correctness is enforced
52
#ifdef _MSC_VER
53
#pragma warning(error : 4090)
54
#endif
55
#define XSCCONST const
56
#define XSCPPPROTECTED
57
#else
58
#define XSCCONST
59
#define XSCPPPROTECTED protected:
60
#endif
61
62
#ifdef __GNUC__
63
#include <limits.h>
64
#if __WORDSIZE == 64
65
# define XSENS_64BIT
66
#else
67
# define XSENS_32BIT
68
#endif
69
#endif
70
71
#if defined(_WIN64) || defined(_M_X64) || defined(_M_IA64)
72
# ifndef XSENS_64BIT
73
# define XSENS_64BIT
74
# endif
75
# ifndef XSENS_WINDOWS
76
# define XSENS_WINDOWS
77
# endif
78
# ifndef _WIN64
79
# define _WIN64
80
# endif
81
# ifndef WIN64
82
# define WIN64
83
# endif
84
#else
85
# ifndef XSENS_32BIT
86
# define XSENS_32BIT
87
# endif
88
#endif
89
90
// all xsens libraries should use unicode
91
#ifndef UNICODE
92
#define UNICODE
93
#endif
94
95
// use XSENS_32BIT and XSENS_64BIT to check for 32/64 bit builds in your application
96
// on non-windows systems these should be defined in this file
97
98
/*
99
Configuration | Runtime | DebInfo | Defines
100
--------------+---------------------------------------
101
Debug | MDd | Yes | XSENS_DEBUG;_DEBUG
102
RelWithDeb | MD | Yes | XSENS_DEBUG;XSENS_RELEASE;NDEBUG
103
Release | MD | No | XSENS_RELEASE;NDEBUG
104
105
The common way to setup configuration-dependent defines:
106
#if defined(XSENS_DEBUG)
107
//// Debug or RelWithDeb build
108
#if defined(XSENS_RELEASE)
109
//// RelWithDeb build
110
#else
111
//// Debug build
112
#endif
113
#else
114
//// Release build
115
#endif
116
*/
117
118
#if defined(XSENS_DEBUG)
119
//// Debug or RelWithDeb build
120
121
#if !defined(XSENS_RELEASE)
122
//// Debug build
123
#if !defined(QT_DEBUG) && !defined(QT_NO_DEBUG)
124
#define QT_DEBUG 1
125
#endif
126
#define XSENS_CONFIG 0
127
#else
128
//// RelWithDeb build
129
#if !defined(QT_DEBUG) && !defined(QT_NO_DEBUG)
130
#define QT_NO_DEBUG 1
131
#endif
132
#define XSENS_CONFIG 1
133
#endif
134
#else
135
//// Release build
136
#if !defined(QT_DEBUG) && !defined(QT_NO_DEBUG)
137
#define QT_NO_DEBUG 1
138
#endif
139
#define XSENS_CONFIG 3
140
#endif
141
142
//////////////////////////////////////////////////
143
// more generic preprocessor defines
144
// required for gnu c++ compiler versions due to difference in attribute declarations
145
#if defined(__AVR32__)
146
# define __cdecl
147
# define __stdcall
148
#elif defined(_ADI_COMPILER)
149
# define __cdecl
150
# define __stdcall
151
#elif defined(__GNUC__) && !defined(HAVE_CDECL)
152
# if !defined(__cdecl)
153
# if defined(__x86_64__)
154
# define __cdecl
155
# else
156
# define __cdecl __attribute__((cdecl))
157
# endif
158
# endif
159
# if !defined(__stdcall)
160
# if defined(__x86_64__)
161
# define __stdcall
162
# else
163
# define __stdcall __attribute__((stdcall))
164
#endif
165
# endif
166
#endif
167
168
169
//////////////////////////////////////////////////
170
// generic preprocessor defines
171
172
// use XSENS_32BIT and XSENS_64BIT to check for 32/64 bit builds in your application
173
// on non-windows systems these should be defined
174
175
#ifndef XSTYPES_DLL_API
176
# ifdef XSTYPES_DLL_EXPORT
177
# ifdef _WIN32
178
//# pragma message("XSTYPES_DLL_API export in xstypesconfig.h")
179
# define XSTYPES_DLL_API __declspec(dllexport)
180
# else
181
//# pragma message("XSTYPES_DLL_API linux export in xstypesconfig.h")
182
# define XSTYPES_DLL_API __attribute__((visibility("default")))
183
# endif
184
# else // ifdef XSTYPES_DLL_EXPORT
185
# ifdef XSTYPES_STATIC_LIB
186
//# pragma message("XSTYPES_DLL_API static in xstypesconfig.h")
187
# define XSTYPES_DLL_API
188
# else
189
# ifdef _WIN32
190
//# pragma message("XSTYPES_DLL_API import in xstypesconfig.h")
191
# define XSTYPES_DLL_API __declspec(dllimport)
192
# else
193
//# pragma message("XSTYPES_DLL_API import/static for linux in xstypesconfig.h")
194
# define XSTYPES_DLL_API
195
# endif
196
# endif
197
# endif // ifdef XSTYPES_DLL_EXPORT - else
198
#endif // ifndef XSTYPES_DLL_API
199
200
#if XSENS_CONFIG < 3 // anything except full release builds
201
//////////////////////////////////////////////////
202
// stuff for debugging
203
204
#else
205
// non-debug stuff
206
//
207
#endif
208
209
#include <assert.h>
210
211
// since this is (almost) always required and it does not conflict with pstdint, include the file here
212
#include "
xstypedefs.h
"
213
214
#ifndef XSNOCOMEXPORT
215
#define XSNOCOMEXPORT
216
#endif
217
218
#endif // file guard
xstypedefs.h
Page generated by
Doxygen 1.8.14
for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019