OpenNI 1.5.4
XnPlatform.h
Go to the documentation of this file.
1
/****************************************************************************
2
* *
3
* OpenNI 1.x Alpha *
4
* Copyright (C) 2011 PrimeSense Ltd. *
5
* *
6
* This file is part of OpenNI. *
7
* *
8
* OpenNI is free software: you can redistribute it and/or modify *
9
* it under the terms of the GNU Lesser General Public License as published *
10
* by the Free Software Foundation, either version 3 of the License, or *
11
* (at your option) any later version. *
12
* *
13
* OpenNI is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU Lesser General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU Lesser General Public License *
19
* along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
20
* *
21
****************************************************************************/
22
#ifndef __XN_PLATFORM_H__
23
#define __XN_PLATFORM_H__
24
25
//---------------------------------------------------------------------------
26
// Platform Defines
27
//---------------------------------------------------------------------------
28
#define XN_PLATFORM_WIN32 1
29
#define XN_PLATFORM_XBOX360 2
30
#define XN_PLATFORM_PS3 3
31
#define XN_PLATFORM_WII 4
32
#define XN_PLATFORM_LINUX_X86 5
33
#define XN_PLATFORM_FILES_ONLY 6
34
#define XN_PLATFORM_ARC 6
35
#define XN_PLATFORM_LINUX_ARM 7
36
#define XN_PLATFORM_MACOSX 8
37
#define XN_PLATFORM_ANDROID_ARM 9
38
#define XN_PLATFORM_LINUX_POWERPC 10
39
#define XN_PLATFORM_LINUX_AARCH64 11
40
#define XN_PLATFORM_LINUX_MIPS 12
41
42
#define XN_PLATFORM_IS_LITTLE_ENDIAN 1
43
#define XN_PLATFORM_IS_BIG_ENDIAN 2
44
45
#define XN_PLATFORM_USE_NO_VAARGS 1
46
#define XN_PLATFORM_USE_WIN32_VAARGS_STYLE 2
47
#define XN_PLATFORM_USE_GCC_VAARGS_STYLE 3
48
#define XN_PLATFORM_USE_ARC_VAARGS_STYLE 4
49
50
//---------------------------------------------------------------------------
51
// Platform Identifier
52
//---------------------------------------------------------------------------
53
54
#if defined(_WIN32) // Microsoft Visual Studio
55
#ifndef RC_INVOKED
56
#if _MSC_VER < 1300 // Before MSVC7 (2003)
57
#error Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions below 2003 (7.0) are not supported!
58
#endif
59
60
#if _MSC_VER > 1600 // After MSVC8 (2010)
61
#error Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported!
62
#endif
63
#endif
64
65
#include "Win32/XnPlatformWin32.h"
66
#elif defined(ANDROID) && defined(__arm__)
67
#include "Android-Arm/XnPlatformAndroid-Arm.h"
68
#elif (__linux__ && (__i386__ || __x86_64__))
69
#include "Linux-x86/XnPlatformLinux-x86.h"
70
#elif (__linux__ && __arm__)
71
#include "Linux-Arm/XnPlatformLinux-Arm.h"
72
#elif (__linux__ && __aarch64__)
73
#include "Linux-AArch64/XnPlatformLinux-AArch64.h"
74
#elif (__linux__ && __powerpc__)
75
#include "Linux-Powerpc/XnPlatformLinux-Powerpc.h"
76
#elif (__linux__ && __mips__)
77
#include "Linux-Mips/XnPlatformLinux-Mips.h"
78
#elif _ARC
79
#include "ARC/XnPlatformARC.h"
80
#elif (__APPLE__)
81
#include "MacOSX/XnPlatformMacOSX.h"
82
#else
83
#error OpenNI Platform Abstraction Layer - Unsupported Platform!
84
#endif
85
86
//---------------------------------------------------------------------------
87
// Basic Common Macros
88
//---------------------------------------------------------------------------
89
#ifndef TRUE
90
#define TRUE 1
91
#endif
92
93
#ifndef FALSE
94
#define FALSE 0
95
#endif
96
97
#define XN_MIN(a,b) (((a) < (b)) ? (a) : (b))
98
99
#define XN_MAX(a,b) (((a) > (b)) ? (a) : (b))
100
101
typedef
void (*
XnFuncPtr
)();
102
103
#define XN_COMPILER_ASSERT(x) typedef int compileAssert[x ? 1 : -1]
104
105
struct
XnRegistrationHandleImpl;
106
typedef
struct
XnRegistrationHandleImpl*
XnRegistrationHandle
;
107
108
//---------------------------------------------------------------------------
109
// API Export/Import Macros
110
//---------------------------------------------------------------------------
111
112
#ifdef __cplusplus
113
#define XN_C_API_EXPORT extern "C" XN_API_EXPORT
114
#define XN_C_API_IMPORT extern "C" XN_API_IMPORT
115
#define XN_CPP_API_EXPORT XN_API_EXPORT
116
#define XN_CPP_API_IMPORT XN_API_IMPORT
117
#else
118
#define XN_C_API_EXPORT XN_API_EXPORT
119
#define XN_C_API_IMPORT XN_API_IMPORT
120
#endif
121
122
#ifdef XN_EXPORTS
123
#define XN_C_API XN_C_API_EXPORT
124
#define XN_CPP_API XN_CPP_API_EXPORT
125
#else
126
#define XN_C_API XN_C_API_IMPORT
127
#define XN_CPP_API XN_CPP_API_IMPORT
128
#endif
129
130
#endif //__XN_PLATFORM_H__
131
XnRegistrationHandle
struct XnRegistrationHandleImpl * XnRegistrationHandle
Definition:
XnPlatform.h:106
XnFuncPtr
void(* XnFuncPtr)()
Definition:
XnPlatform.h:101
Include
XnPlatform.h
Generated on Mon Apr 25 2022 14:03:04 for OpenNI 1.5.4 by
1.8.17