18 #include "vtkConfigure.h"
19 #include "vtk_kwiml.h"
21 #define VTK_SIZEOF_CHAR KWIML_ABI_SIZEOF_CHAR
22 #define VTK_SIZEOF_SHORT KWIML_ABI_SIZEOF_SHORT
23 #define VTK_SIZEOF_INT KWIML_ABI_SIZEOF_INT
24 #define VTK_SIZEOF_LONG KWIML_ABI_SIZEOF_LONG
25 #define VTK_SIZEOF_LONG_LONG KWIML_ABI_SIZEOF_LONG_LONG
26 #define VTK_SIZEOF_FLOAT KWIML_ABI_SIZEOF_FLOAT
27 #define VTK_SIZEOF_DOUBLE KWIML_ABI_SIZEOF_DOUBLE
28 #define VTK_SIZEOF_VOID_P KWIML_ABI_SIZEOF_DATA_PTR
31 #define VTK_TYPE_USE_LONG_LONG
32 #if VTK_SIZEOF_LONG_LONG == 0
33 # error "No 'long long' type available."
37 #if defined(KWIML_ABI_CHAR_IS_SIGNED)
38 # define VTK_TYPE_CHAR_IS_SIGNED 1
40 # define VTK_TYPE_CHAR_IS_SIGNED 0
50 #define VTK_SIGNED_CHAR 15
51 #define VTK_UNSIGNED_CHAR 3
53 #define VTK_UNSIGNED_SHORT 5
55 #define VTK_UNSIGNED_INT 7
57 #define VTK_UNSIGNED_LONG 9
60 #define VTK_ID_TYPE 12
67 #define VTK_LONG_LONG 16
68 #define VTK_UNSIGNED_LONG_LONG 17
71 #define VTK___INT64 18
74 #define VTK_UNSIGNED___INT64 19
77 #define VTK_VARIANT 20
81 #define VTK_UNICODE_STRING 22
87 #define VTK_POLY_DATA 0
88 #define VTK_STRUCTURED_POINTS 1
89 #define VTK_STRUCTURED_GRID 2
90 #define VTK_RECTILINEAR_GRID 3
91 #define VTK_UNSTRUCTURED_GRID 4
92 #define VTK_PIECEWISE_FUNCTION 5
93 #define VTK_IMAGE_DATA 6
94 #define VTK_DATA_OBJECT 7
95 #define VTK_DATA_SET 8
96 #define VTK_POINT_SET 9
97 #define VTK_UNIFORM_GRID 10
98 #define VTK_COMPOSITE_DATA_SET 11
99 #define VTK_MULTIGROUP_DATA_SET 12
100 #define VTK_MULTIBLOCK_DATA_SET 13
101 #define VTK_HIERARCHICAL_DATA_SET 14
102 #define VTK_HIERARCHICAL_BOX_DATA_SET 15
103 #define VTK_GENERIC_DATA_SET 16
104 #define VTK_HYPER_OCTREE 17
105 #define VTK_TEMPORAL_DATA_SET 18
109 #define VTK_SELECTION 22
110 #define VTK_DIRECTED_GRAPH 23
111 #define VTK_UNDIRECTED_GRAPH 24
112 #define VTK_MULTIPIECE_DATA_SET 25
113 #define VTK_DIRECTED_ACYCLIC_GRAPH 26
114 #define VTK_ARRAY_DATA 27
115 #define VTK_REEB_GRAPH 28
116 #define VTK_UNIFORM_GRID_AMR 29
117 #define VTK_NON_OVERLAPPING_AMR 30
118 #define VTK_OVERLAPPING_AMR 31
119 #define VTK_HYPER_TREE_GRID 32
120 #define VTK_MOLECULE 33
121 #define VTK_PISTON_DATA_OBJECT 34
123 #define VTK_UNSTRUCTURED_GRID_BASE 36
127 #if defined(__cplusplus)
128 # define VTK_TYPE_CAST(T, V) static_cast< T >(V)
130 # define VTK_TYPE_CAST(T, V) ((T)(V))
135 #define VTK_BIT_MIN 0
136 #define VTK_BIT_MAX 1
137 #if VTK_TYPE_CHAR_IS_SIGNED
138 # define VTK_CHAR_MIN VTK_TYPE_CAST(char, 0x80)
139 # define VTK_CHAR_MAX VTK_TYPE_CAST(char, 0x7f)
141 # define VTK_CHAR_MIN VTK_TYPE_CAST(char, 0u)
142 # define VTK_CHAR_MAX VTK_TYPE_CAST(char, 0xffu)
144 #define VTK_SIGNED_CHAR_MIN VTK_TYPE_CAST(signed char, 0x80)
145 #define VTK_SIGNED_CHAR_MAX VTK_TYPE_CAST(signed char, 0x7f)
146 #define VTK_UNSIGNED_CHAR_MIN VTK_TYPE_CAST(unsigned char, 0u)
147 #define VTK_UNSIGNED_CHAR_MAX VTK_TYPE_CAST(unsigned char, 0xffu)
148 #define VTK_SHORT_MIN VTK_TYPE_CAST(short, 0x8000)
149 #define VTK_SHORT_MAX VTK_TYPE_CAST(short, 0x7fff)
150 #define VTK_UNSIGNED_SHORT_MIN VTK_TYPE_CAST(unsigned short, 0u)
151 #define VTK_UNSIGNED_SHORT_MAX VTK_TYPE_CAST(unsigned short, 0xffffu)
152 #define VTK_INT_MIN VTK_TYPE_CAST(int, ~(~0u >> 1))
153 #define VTK_INT_MAX VTK_TYPE_CAST(int, ~0u >> 1)
154 #define VTK_UNSIGNED_INT_MIN VTK_TYPE_CAST(unsigned int, 0)
155 #define VTK_UNSIGNED_INT_MAX VTK_TYPE_CAST(unsigned int, ~0u)
156 #define VTK_LONG_MIN VTK_TYPE_CAST(long, ~(~0ul >> 1))
157 #define VTK_LONG_MAX VTK_TYPE_CAST(long, ~0ul >> 1)
158 #define VTK_UNSIGNED_LONG_MIN VTK_TYPE_CAST(unsigned long, 0ul)
159 #define VTK_UNSIGNED_LONG_MAX VTK_TYPE_CAST(unsigned long, ~0ul)
160 #define VTK_FLOAT_MIN VTK_TYPE_CAST(float, -1.0e+38f)
161 #define VTK_FLOAT_MAX VTK_TYPE_CAST(float, 1.0e+38f)
162 #define VTK_DOUBLE_MIN VTK_TYPE_CAST(double, -1.0e+299)
163 #define VTK_DOUBLE_MAX VTK_TYPE_CAST(double, 1.0e+299)
164 #define VTK_LONG_LONG_MIN VTK_TYPE_CAST(long long, ~(~0ull >> 1))
165 #define VTK_LONG_LONG_MAX VTK_TYPE_CAST(long long, ~0ull >> 1)
166 #define VTK_UNSIGNED_LONG_LONG_MIN VTK_TYPE_CAST(unsigned long long, 0ull)
167 #define VTK_UNSIGNED_LONG_LONG_MAX VTK_TYPE_CAST(unsigned long long, ~0ull)
174 #if VTK_SIZEOF_CHAR == 1
175 typedef unsigned char vtkTypeUInt8;
176 typedef signed char vtkTypeInt8;
177 # define VTK_TYPE_UINT8 VTK_UNSIGNED_CHAR
178 # if VTK_TYPE_CHAR_IS_SIGNED
179 # define VTK_TYPE_INT8 VTK_CHAR
181 # define VTK_TYPE_INT8 VTK_SIGNED_CHAR
184 # error "No native data type can represent an 8-bit integer."
188 #if VTK_SIZEOF_SHORT == 2
189 typedef unsigned short vtkTypeUInt16;
190 typedef signed short vtkTypeInt16;
191 # define VTK_TYPE_UINT16 VTK_UNSIGNED_SHORT
192 # define VTK_TYPE_INT16 VTK_SHORT
193 #elif VTK_SIZEOF_INT == 2
194 typedef unsigned int vtkTypeUInt16;
195 typedef signed int vtkTypeInt16;
196 # define VTK_TYPE_UINT16 VTK_UNSIGNED_INT
197 # define VTK_TYPE_INT16 VTK_INT
199 # error "No native data type can represent a 16-bit integer."
203 #if VTK_SIZEOF_INT == 4
204 typedef unsigned int vtkTypeUInt32;
205 typedef signed int vtkTypeInt32;
206 # define VTK_TYPE_UINT32 VTK_UNSIGNED_INT
207 # define VTK_TYPE_INT32 VTK_INT
208 #elif VTK_SIZEOF_LONG == 4
209 typedef unsigned long vtkTypeUInt32;
210 typedef signed long vtkTypeInt32;
211 # define VTK_TYPE_UINT32 VTK_UNSIGNED_LONG
212 # define VTK_TYPE_INT32 VTK_LONG
214 # error "No native data type can represent a 32-bit integer."
218 #if VTK_SIZEOF_LONG_LONG == 8
219 typedef unsigned long long vtkTypeUInt64;
220 typedef signed long long vtkTypeInt64;
221 # define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG_LONG
222 # define VTK_TYPE_INT64 VTK_LONG_LONG
223 #elif VTK_SIZEOF_LONG == 8
224 typedef unsigned long vtkTypeUInt64;
225 typedef signed long vtkTypeInt64;
226 # define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG
227 # define VTK_TYPE_INT64 VTK_LONG
229 # error "No native data type can represent a 64-bit integer."
241 #define VTK_HAS_MTIME_TYPE
245 #if VTK_SIZEOF_LONG == 8
252 #if VTK_SIZEOF_FLOAT == 4
253 typedef float vtkTypeFloat32;
254 # define VTK_TYPE_FLOAT32 VTK_FLOAT
256 # error "No native data type can represent a 32-bit floating point value."
260 #if VTK_SIZEOF_DOUBLE == 8
261 typedef double vtkTypeFloat64;
262 # define VTK_TYPE_FLOAT64 VTK_DOUBLE
264 # error "No native data type can represent a 64-bit floating point value."
269 #define VTK_HAS_ID_TYPE
270 #ifdef VTK_USE_64BIT_IDS
271 # if VTK_SIZEOF_LONG_LONG == 8
273 # define VTK_ID_TYPE_IMPL VTK_LONG_LONG
274 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG_LONG
275 # define VTK_ID_MIN VTK_LONG_LONG_MIN
276 # define VTK_ID_MAX VTK_LONG_LONG_MAX
277 # elif VTK_SIZEOF_LONG == 8
279 # define VTK_ID_TYPE_IMPL VTK_LONG
280 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG
281 # define VTK_ID_MIN VTK_LONG_MIN
282 # define VTK_ID_MAX VTK_LONG_MAX
284 # error "VTK_USE_64BIT_IDS is ON but no 64-bit integer type is available."
288 # define VTK_ID_TYPE_IMPL VTK_INT
289 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_INT
290 # define VTK_ID_MIN VTK_INT_MIN
291 # define VTK_ID_MAX VTK_INT_MAX
299 #ifndef VTK_TYPE_BOOL_TYPEDEFED
300 # define VTK_TYPE_BOOL_TYPEDEFED
309 #if defined(__cplusplus)
315 inline vtkTypeBool vtkDataTypesCompare(
int a,
int b)
325 #define vtkInstantiateTemplateMacro(decl) \
330 decl<unsigned char>; \
332 decl<unsigned short>; \
334 decl<unsigned int>; \
336 decl<unsigned long>; \
338 decl<unsigned long long>;
341 #ifdef VTK_USE_EXTERN_TEMPLATE
342 #define vtkExternTemplateMacro(decl) \
343 vtkInstantiateTemplateMacro(decl)
345 #define vtkExternTemplateMacro(decl)
vtkTypeUInt64 vtkMTimeType