Main MRPT website > C++ reference for MRPT 1.5.7
xstypedefs.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 #ifndef XSTYPEDEFS_H
10 #define XSTYPEDEFS_H
11 
12 #include "xstypesconfig.h"
13 
14 #ifndef XSENS_SINGLE_PRECISION
15 #include <stddef.h>
16 typedef double XsReal; //!< Defines the floating point type used by the Xsens libraries
17 typedef size_t XsSize; //!< XsSize must be unsigned number!
18 # ifndef PRINTF_SIZET_MODIFIER
19 # if defined(XSENS_64BIT)
20 # define PRINTF_SIZET_MODIFIER "l"
21 # else
22 # define PRINTF_SIZET_MODIFIER ""
23 # endif
24 # endif // PRINTF_SIZET_MODIFIER
25 #else
26 typedef float XsReal; //!< Defines the floating point type used by the Xsens libraries
27 typedef unsigned int XsSize; //!< XsSize must be unsigned number!
28 #endif // XSENS_SINGLE_PRECISION
29 
30 
31 /*! \addtogroup enums Global enumerations
32  @{
33 */
34 /*! \brief These flags define the behaviour of data contained by Xsens data structures
35  \details Normally, the user should never need to use these directly.
36 */
38  XSDF_None = 0 //!< No flag set
39  ,XSDF_Managed = 1 //!< The contained data should be managed (freed) by the object, when false, the object assumes the memory is freed by some other process after its destruction
40  ,XSDF_FixedSize = 2 //!< The contained data points to a fixed-size buffer, this allows creation of dynamic objects on the stack without malloc/free overhead.
41  ,XSDF_Empty = 4 //!< The object contains undefined data / should be considered empty. Usually only relevant when XSDF_FixedSize is also set, as otherwise the data pointer will be NULL and empty-ness is implicit.
42 };
43 /*! @} */
44 typedef enum XsDataFlags XsDataFlags;
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
51 
52 #ifdef __cplusplus
53 } // extern "C"
54 /*! \brief \copybrief XsDataFlags_toString \sa XsDataFlags_toString */
55 inline const char *toString(XsDataFlags s)
56 {
57  return XsDataFlags_toString(s);
58 }
59 #else
60 // define BOOL, TRUE and FALSE
61 #ifndef BOOL
62 typedef int BOOL;
63 #endif
64 
65 #ifndef TRUE
66 #define TRUE (1)
67 #endif
68 
69 #ifndef FALSE
70 #define FALSE (0)
71 #endif
72 #endif // __cplusplus
73 
74 #define XS_ENUM_TO_STR_CASE(value) case value: return #value;
75 
76 #endif // file guard
The contained data should be managed (freed) by the object, when false, the object assumes the memory...
Definition: xstypedefs.h:39
The object contains undefined data / should be considered empty. Usually only relevant when XSDF_Fixe...
Definition: xstypedefs.h:41
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:17
int BOOL
Definition: xstypedefs.h:62
GLdouble s
Definition: glext.h:3602
No flag set.
Definition: xstypedefs.h:38
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
double XsReal
Defines the floating point type used by the Xsens libraries.
Definition: xstypedefs.h:16
The contained data points to a fixed-size buffer, this allows creation of dynamic objects on the stac...
Definition: xstypedefs.h:40
XsDataFlags
These flags define the behaviour of data contained by Xsens data structures.
Definition: xstypedefs.h:37
XSTYPES_DLL_API const char * XsDataFlags_toString(XsDataFlags f)



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