2
3
4
5
6
7
8
9
10
11
12
13
14
15
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
39# define IDL_BEGIN extern "C" {
47
48
49
50
51
52
53
54
55
58# if defined(_MSC_VER) && !defined(IDL_STATIC_BUILD)
59# define idl_api __declspec(dllimport)
65#if defined(_WIN32) && !defined(IDL_PLATFORM_WINDOWS)
66# define IDL_PLATFORM_WINDOWS
67#elif defined(__APPLE__)
68# include <TargetConditionals.h>
70# if TARGET_OS_IPHONE && !defined(IDL_PLATFORM_IOS)
71# define IDL_PLATFORM_IOS
72# elif TARGET_IPHONE_SIMULATOR && !defined(IDL_PLATFORM_IOS)
73# define IDL_PLATFORM_IOS
74# elif TARGET_OS_MAC && !defined(IDL_PLATFORM_MAC_OS)
75# define IDL_PLATFORM_MAC_OS
77# error unsupported Apple platform
79#elif defined(__ANDROID__) && !defined(IDL_PLATFORM_ANDROID)
80# define IDL_PLATFORM_ANDROID
81#elif defined(__linux__
) && !defined(IDL_PLATFORM_LINUX)
82# define IDL_PLATFORM_LINUX
83#elif defined(__EMSCRIPTEN__) && !defined(IDL_PLATFORM_WEB)
84# define IDL_PLATFORM_WEB
86# error unsupported platform
90# define IDL_CONSTEXPR constexpr
91# if __cpp_constexpr
>= 201304L
92# define IDL_CONSTEXPR_14 constexpr
94# define IDL_CONSTEXPR_14
98# define IDL_CONSTEXPR_14
102
103
104
107
108
109
110
132
133
134
135
136
137
138
139
140
141
142
143
146# define IDL_FLAGS(idl_enum_t) extern
148 IDL_CONSTEXPR idl_enum_t operator
~(idl_enum_t lhr) noexcept {
149 return static_cast<idl_enum_t>(~static_cast<idl_sint32_t>(lhr)); \
150}inline
151 IDL_CONSTEXPR idl_enum_t operator
|(idl_enum_t lhr, idl_enum_t rhs) noexcept {
152 return static_cast<idl_enum_t>(static_cast<idl_sint32_t>(lhr) | static_cast<idl_sint32_t>(rhs)); \
153}inline
154 IDL_CONSTEXPR idl_enum_t operator
&(idl_enum_t lhr, idl_enum_t rhs) noexcept {
155 return static_cast<idl_enum_t>(static_cast<idl_sint32_t>(lhr) & static_cast<idl_sint32_t>(rhs)); \
156}inline
157 IDL_CONSTEXPR idl_enum_t operator
^(idl_enum_t lhr, idl_enum_t rhs) noexcept {
158 return static_cast<idl_enum_t>(static_cast<idl_sint32_t>(lhr) ^ static_cast<idl_sint32_t>(rhs)); \
159}inline
160 IDL_CONSTEXPR_14 idl_enum_t& operator
|=(idl_enum_t& lhr, idl_enum_t rhs) noexcept {
161 return lhr = lhr | rhs; \
162}inline
163 IDL_CONSTEXPR_14 idl_enum_t& operator
&=(idl_enum_t& lhr, idl_enum_t rhs) noexcept {
164 return lhr = lhr & rhs; \
165}inline
166 IDL_CONSTEXPR_14 idl_enum_t& operator
^=(idl_enum_t& lhr, idl_enum_t rhs) noexcept {
167 return lhr = lhr ^ rhs; \
168}\
169}
171# define IDL_FLAGS(idl_enum_t)
175
176
177
178
179
180
181
182#define IDL_TYPE(idl_name) typedef
183 struct _##idl_name* idl_name##_t;
const void * idl_cdata_t
pointer to immutable data.
Definition idl-platform.h:126
float idl_float32_t
32 bit float point.
Definition idl-platform.h:122
void * idl_data_t
pointer to data.
Definition idl-platform.h:125
int32_t idl_sint32_t
32 bit signed integer.
Definition idl-platform.h:118
int8_t idl_sint8_t
8 bit signed integer.
Definition idl-platform.h:114
int32_t idl_bool_t
boolean type.
Definition idl-platform.h:113
const char * idl_utf8_t
utf8 string.
Definition idl-platform.h:124
double idl_float64_t
64 bit float point.
Definition idl-platform.h:123
int16_t idl_sint16_t
16 bit signed integer.
Definition idl-platform.h:116
int64_t idl_sint64_t
64 bit signed integer.
Definition idl-platform.h:120
uint64_t idl_uint64_t
64 bit unsigned integer.
Definition idl-platform.h:121
uint16_t idl_uint16_t
16 bit unsigned integer.
Definition idl-platform.h:117
char idl_char_t
symbol type.
Definition idl-platform.h:112
uint32_t idl_uint32_t
32 bit unsigned integer.
Definition idl-platform.h:119
uint8_t idl_uint8_t
8 bit unsigned integer.
Definition idl-platform.h:115