20#include "vtkOptions.h"
23#define VTK_SIZEOF_CHAR KWIML_ABI_SIZEOF_CHAR
24#define VTK_SIZEOF_SHORT KWIML_ABI_SIZEOF_SHORT
25#define VTK_SIZEOF_INT KWIML_ABI_SIZEOF_INT
26#define VTK_SIZEOF_LONG KWIML_ABI_SIZEOF_LONG
27#define VTK_SIZEOF_LONG_LONG KWIML_ABI_SIZEOF_LONG_LONG
28#define VTK_SIZEOF_FLOAT KWIML_ABI_SIZEOF_FLOAT
29#define VTK_SIZEOF_DOUBLE KWIML_ABI_SIZEOF_DOUBLE
30#define VTK_SIZEOF_VOID_P KWIML_ABI_SIZEOF_DATA_PTR
33#if defined(KWIML_ABI_CHAR_IS_SIGNED)
34#define VTK_TYPE_CHAR_IS_SIGNED 1
36#define VTK_TYPE_CHAR_IS_SIGNED 0
46#define VTK_SIGNED_CHAR 15
47#define VTK_UNSIGNED_CHAR 3
49#define VTK_UNSIGNED_SHORT 5
51#define VTK_UNSIGNED_INT 7
53#define VTK_UNSIGNED_LONG 9
63#define VTK_LONG_LONG 16
64#define VTK_UNSIGNED_LONG_LONG 17
71#define VTK_UNICODE_STRING 22
77#define VTK_POLY_DATA 0
78#define VTK_STRUCTURED_POINTS 1
79#define VTK_STRUCTURED_GRID 2
80#define VTK_RECTILINEAR_GRID 3
81#define VTK_UNSTRUCTURED_GRID 4
82#define VTK_PIECEWISE_FUNCTION 5
83#define VTK_IMAGE_DATA 6
84#define VTK_DATA_OBJECT 7
86#define VTK_POINT_SET 9
87#define VTK_UNIFORM_GRID 10
88#define VTK_COMPOSITE_DATA_SET 11
89#define VTK_MULTIGROUP_DATA_SET 12
90#define VTK_MULTIBLOCK_DATA_SET 13
91#define VTK_HIERARCHICAL_DATA_SET 14
92#define VTK_HIERARCHICAL_BOX_DATA_SET 15
93#define VTK_GENERIC_DATA_SET 16
94#define VTK_HYPER_OCTREE 17
95#define VTK_TEMPORAL_DATA_SET 18
99#define VTK_SELECTION 22
100#define VTK_DIRECTED_GRAPH 23
101#define VTK_UNDIRECTED_GRAPH 24
102#define VTK_MULTIPIECE_DATA_SET 25
103#define VTK_DIRECTED_ACYCLIC_GRAPH 26
104#define VTK_ARRAY_DATA 27
105#define VTK_REEB_GRAPH 28
106#define VTK_UNIFORM_GRID_AMR 29
107#define VTK_NON_OVERLAPPING_AMR 30
108#define VTK_OVERLAPPING_AMR 31
109#define VTK_HYPER_TREE_GRID 32
110#define VTK_MOLECULE 33
111#define VTK_PISTON_DATA_OBJECT 34
113#define VTK_UNSTRUCTURED_GRID_BASE 36
114#define VTK_PARTITIONED_DATA_SET 37
115#define VTK_PARTITIONED_DATA_SET_COLLECTION 38
116#define VTK_UNIFORM_HYPER_TREE_GRID 39
117#define VTK_EXPLICIT_STRUCTURED_GRID 40
118#define VTK_DATA_OBJECT_TREE 41
119#define VTK_ABSTRACT_ELECTRONIC_DATA 42
120#define VTK_OPEN_QUBE_ELECTRONIC_DATA 43
121#define VTK_ANNOTATION 44
122#define VTK_ANNOTATION_LAYERS 45
123#define VTK_BSP_CUTS 46
124#define VTK_GEO_JSON_FEATURE 47
125#define VTK_IMAGE_STENCIL_DATA 48
129#if defined(__cplusplus)
130#define VTK_TYPE_CAST(T, V) static_cast<T>(V)
132#define VTK_TYPE_CAST(T, V) ((T)(V))
139#if VTK_TYPE_CHAR_IS_SIGNED
140#define VTK_CHAR_MIN VTK_TYPE_CAST(char, 0x80)
141#define VTK_CHAR_MAX VTK_TYPE_CAST(char, 0x7f)
143#define VTK_CHAR_MIN VTK_TYPE_CAST(char, 0u)
144#define VTK_CHAR_MAX VTK_TYPE_CAST(char, 0xffu)
146#define VTK_SIGNED_CHAR_MIN VTK_TYPE_CAST(signed char, 0x80)
147#define VTK_SIGNED_CHAR_MAX VTK_TYPE_CAST(signed char, 0x7f)
148#define VTK_UNSIGNED_CHAR_MIN VTK_TYPE_CAST(unsigned char, 0u)
149#define VTK_UNSIGNED_CHAR_MAX VTK_TYPE_CAST(unsigned char, 0xffu)
150#define VTK_SHORT_MIN VTK_TYPE_CAST(short, 0x8000)
151#define VTK_SHORT_MAX VTK_TYPE_CAST(short, 0x7fff)
152#define VTK_UNSIGNED_SHORT_MIN VTK_TYPE_CAST(unsigned short, 0u)
153#define VTK_UNSIGNED_SHORT_MAX VTK_TYPE_CAST(unsigned short, 0xffffu)
154#define VTK_INT_MIN VTK_TYPE_CAST(int, ~(~0u >> 1))
155#define VTK_INT_MAX VTK_TYPE_CAST(int, ~0u >> 1)
156#define VTK_UNSIGNED_INT_MIN VTK_TYPE_CAST(unsigned int, 0)
157#define VTK_UNSIGNED_INT_MAX VTK_TYPE_CAST(unsigned int, ~0u)
158#define VTK_LONG_MIN VTK_TYPE_CAST(long, ~(~0ul >> 1))
159#define VTK_LONG_MAX VTK_TYPE_CAST(long, ~0ul >> 1)
160#define VTK_UNSIGNED_LONG_MIN VTK_TYPE_CAST(unsigned long, 0ul)
161#define VTK_UNSIGNED_LONG_MAX VTK_TYPE_CAST(unsigned long, ~0ul)
162#define VTK_FLOAT_MIN VTK_TYPE_CAST(float, -1.0e+38f)
163#define VTK_FLOAT_MAX VTK_TYPE_CAST(float, 1.0e+38f)
164#define VTK_DOUBLE_MIN VTK_TYPE_CAST(double, -1.0e+299)
165#define VTK_DOUBLE_MAX VTK_TYPE_CAST(double, 1.0e+299)
166#define VTK_LONG_LONG_MIN VTK_TYPE_CAST(long long, ~(~0ull >> 1))
167#define VTK_LONG_LONG_MAX VTK_TYPE_CAST(long long, ~0ull >> 1)
168#define VTK_UNSIGNED_LONG_LONG_MIN VTK_TYPE_CAST(unsigned long long, 0ull)
169#define VTK_UNSIGNED_LONG_LONG_MAX VTK_TYPE_CAST(unsigned long long, ~0ull)
176#if VTK_SIZEOF_CHAR == 1
177typedef unsigned char vtkTypeUInt8;
178typedef signed char vtkTypeInt8;
179#define VTK_TYPE_UINT8 VTK_UNSIGNED_CHAR
180#define VTK_TYPE_UINT8_MIN VTK_UNSIGNED_CHAR_MIN
181#define VTK_TYPE_UINT8_MAX VTK_UNSIGNED_CHAR_MAX
182#define VTK_TYPE_INT8 VTK_SIGNED_CHAR
183#define VTK_TYPE_INT8_MIN VTK_SIGNED_CHAR_MIN
184#define VTK_TYPE_INT8_MAX VTK_SIGNED_CHAR_MAX
186#error "No native data type can represent an 8-bit integer."
190#if VTK_SIZEOF_SHORT == 2
191typedef unsigned short vtkTypeUInt16;
192typedef signed short vtkTypeInt16;
193#define VTK_TYPE_UINT16 VTK_UNSIGNED_SHORT
194#define VTK_TYPE_UINT16_MIN VTK_UNSIGNED_SHORT_MIN
195#define VTK_TYPE_UINT16_MAX VTK_UNSIGNED_SHORT_MAX
196#define VTK_TYPE_INT16 VTK_SHORT
197#define VTK_TYPE_INT16_MIN VTK_SHORT_MIN
198#define VTK_TYPE_INT16_MAX VTK_SHORT_MAX
199#elif VTK_SIZEOF_INT == 2
200typedef unsigned int vtkTypeUInt16;
201typedef signed int vtkTypeInt16;
202#define VTK_TYPE_UINT16 VTK_UNSIGNED_INT
203#define VTK_TYPE_UINT16_MIN VTK_UNSIGNED_INT_MIN
204#define VTK_TYPE_UINT16_MAX VTK_UNSIGNED_INT_MAX
205#define VTK_TYPE_INT16 VTK_INT
206#define VTK_TYPE_INT16_MIN VTK_INT_MIN
207#define VTK_TYPE_INT16_MAX VTK_INT_MAX
209#error "No native data type can represent a 16-bit integer."
213#if VTK_SIZEOF_INT == 4
214typedef unsigned int vtkTypeUInt32;
215typedef signed int vtkTypeInt32;
216#define VTK_TYPE_UINT32 VTK_UNSIGNED_INT
217#define VTK_TYPE_UINT32_MIN VTK_UNSIGNED_INT_MIN
218#define VTK_TYPE_UINT32_MAX VTK_UNSIGNED_INT_MAX
219#define VTK_TYPE_INT32 VTK_INT
220#define VTK_TYPE_INT32_MIN VTK_INT_MIN
221#define VTK_TYPE_INT32_MAX VTK_INT_MAX
222#elif VTK_SIZEOF_LONG == 4
223typedef unsigned long vtkTypeUInt32;
224typedef signed long vtkTypeInt32;
225#define VTK_TYPE_UINT32 VTK_UNSIGNED_LONG
226#define VTK_TYPE_UINT32_MIN VTK_UNSIGNED_LONG_MIN
227#define VTK_TYPE_UINT32_MAX VTK_UNSIGNED_LONG_MAX
228#define VTK_TYPE_INT32 VTK_LONG
229#define VTK_TYPE_INT32_MIN VTK_LONG_MIN
230#define VTK_TYPE_INT32_MAX VTK_LONG_MAX
232#error "No native data type can represent a 32-bit integer."
236#if VTK_SIZEOF_LONG_LONG == 8
237typedef unsigned long long vtkTypeUInt64;
238typedef signed long long vtkTypeInt64;
239#define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG_LONG
240#define VTK_TYPE_UINT64_MIN VTK_UNSIGNED_LONG_LONG_MIN
241#define VTK_TYPE_UINT64_MAX VTK_UNSIGNED_LONG_LONG_MAX
242#define VTK_TYPE_INT64 VTK_LONG_LONG
243#define VTK_TYPE_INT64_MIN VTK_LONG_LONG_MIN
244#define VTK_TYPE_INT64_MAX VTK_LONG_LONG_MAX
245#elif VTK_SIZEOF_LONG == 8
246typedef unsigned long vtkTypeUInt64;
247typedef signed long vtkTypeInt64;
248#define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG
249#define VTK_TYPE_UINT64_MIN VTK_UNSIGNED_LONG_MIN
250#define VTK_TYPE_UINT64_MAX VTK_UNSIGNED_LONG_MAX
251#define VTK_TYPE_INT64 VTK_LONG
252#define VTK_TYPE_INT64_MIN VTK_LONG_MIN
253#define VTK_TYPE_INT64_MAX VTK_LONG_MAX
255#error "No native data type can represent a 64-bit integer."
258#if !defined(VTK_LEGACY_REMOVE)
261#define VTK_HAS_MTIME_TYPE
268#if defined(VTK_USE_64BIT_TIMESTAMPS) || VTK_SIZEOF_VOID_P == 8
269#if VTK_SIZEOF_LONG == 8
271#define VTK_MTIME_TYPE_IMPL VTK_UNSIGNED_LONG
272#define VTK_MTIME_MIN VTK_UNSIGNED_LONG_MIN
273#define VTK_MTIME_MAX VTK_UNSIGNED_LONG_MAX
276#define VTK_MTIME_TYPE_IMPL VTK_TYPE_UINT64
277#define VTK_MTIME_MIN VTK_TYPE_UINT64_MIN
278#define VTK_MTIME_MAX VTK_TYPE_UINT64_MAX
281#if VTK_SIZEOF_LONG == 4
283#define VTK_MTIME_TYPE_IMPL VTK_UNSIGNED_LONG
284#define VTK_MTIME_MIN VTK_UNSIGNED_LONG_MIN
285#define VTK_MTIME_MAX VTK_UNSIGNED_LONG_MAX
288#define VTK_MTIME_TYPE_IMPL VTK_TYPE_UINT32
289#define VTK_MTIME_MIN VTK_TYPE_UINT32_MIN
290#define VTK_MTIME_MAX VTK_TYPE_UINT32_MAX
295#if VTK_SIZEOF_FLOAT == 4
296typedef float vtkTypeFloat32;
297#define VTK_TYPE_FLOAT32 VTK_FLOAT
299#error "No native data type can represent a 32-bit floating point value."
303#if VTK_SIZEOF_DOUBLE == 8
304typedef double vtkTypeFloat64;
305#define VTK_TYPE_FLOAT64 VTK_DOUBLE
307#error "No native data type can represent a 64-bit floating point value."
312#define VTK_HAS_ID_TYPE
313#ifdef VTK_USE_64BIT_IDS
314#if VTK_SIZEOF_LONG_LONG == 8
316#define VTK_ID_TYPE_IMPL VTK_LONG_LONG
317#define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG_LONG
318#define VTK_ID_MIN VTK_LONG_LONG_MIN
319#define VTK_ID_MAX VTK_LONG_LONG_MAX
320#define VTK_ID_TYPE_PRId "lld"
321#elif VTK_SIZEOF_LONG == 8
323#define VTK_ID_TYPE_IMPL VTK_LONG
324#define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG
325#define VTK_ID_MIN VTK_LONG_MIN
326#define VTK_ID_MAX VTK_LONG_MAX
327#define VTK_ID_TYPE_PRId "ld"
329#error "VTK_USE_64BIT_IDS is ON but no 64-bit integer type is available."
333#define VTK_ID_TYPE_IMPL VTK_INT
334#define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_INT
335#define VTK_ID_MIN VTK_INT_MIN
336#define VTK_ID_MAX VTK_INT_MAX
337#define VTK_ID_TYPE_PRId "d"
352#ifndef VTK_TYPE_BOOL_TYPEDEFED
353#define VTK_TYPE_BOOL_TYPEDEFED
363#if defined(__cplusplus)
369inline vtkTypeBool vtkDataTypesCompare(
int a,
int b)
378#define vtkInstantiateTemplateMacro(decl) \
383 decl<unsigned char>; \
385 decl<unsigned short>; \
387 decl<unsigned int>; \
389 decl<unsigned long>; \
391 decl<unsigned long long>
394#ifdef VTK_USE_EXTERN_TEMPLATE
395#define vtkExternTemplateMacro(decl) vtkInstantiateTemplateMacro(decl)
397#define vtkExternTemplateMacro(decl)
unsigned int vtkTypeUBool
vtkTypeUInt32 vtkMTimeType