00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 #ifndef __vtkType_h
00016 #define __vtkType_h
00017 
00018 #include "vtkConfigure.h"
00019 
00020 
00021 
00022 
00023 
00024 #define VTK_VOID            0
00025 #define VTK_BIT             1
00026 #define VTK_CHAR            2
00027 #define VTK_SIGNED_CHAR    15
00028 #define VTK_UNSIGNED_CHAR   3
00029 #define VTK_SHORT           4
00030 #define VTK_UNSIGNED_SHORT  5
00031 #define VTK_INT             6
00032 #define VTK_UNSIGNED_INT    7
00033 #define VTK_LONG            8
00034 #define VTK_UNSIGNED_LONG   9
00035 #define VTK_FLOAT          10
00036 #define VTK_DOUBLE         11
00037 #define VTK_ID_TYPE        12
00038 
00039 
00040 
00041 #define VTK_STRING         13
00042 #define VTK_OPAQUE         14
00043 
00044 
00045 #define VTK_LONG_LONG          16
00046 #define VTK_UNSIGNED_LONG_LONG 17
00047 
00048 
00049 #define VTK___INT64            18
00050 
00051 
00052 
00053 #define VTK_UNSIGNED___INT64   19
00054 
00055 
00056 
00057 #define VTK_POLY_DATA                       0
00058 #define VTK_STRUCTURED_POINTS               1
00059 #define VTK_STRUCTURED_GRID                 2
00060 #define VTK_RECTILINEAR_GRID                3
00061 #define VTK_UNSTRUCTURED_GRID               4
00062 #define VTK_PIECEWISE_FUNCTION              5
00063 #define VTK_IMAGE_DATA                      6
00064 #define VTK_DATA_OBJECT                     7
00065 #define VTK_DATA_SET                        8
00066 #define VTK_POINT_SET                       9
00067 #define VTK_UNIFORM_GRID                   10
00068 #define VTK_COMPOSITE_DATA_SET             11
00069 #define VTK_HIERARCHICAL_DATA_SET          12
00070 #define VTK_HIERARCHICAL_BOX_DATA_SET      13
00071 #define VTK_GENERIC_DATA_SET               14
00072 
00073 
00074 
00075 #if defined(__cplusplus)
00076 # define VTK_TYPE_CAST(T, V) static_cast< T >(V)
00077 #else
00078 # define VTK_TYPE_CAST(T, V) ((T)(V))
00079 #endif
00080 
00081 
00082 
00083 #define VTK_BIT_MIN                 0
00084 #define VTK_BIT_MAX                 1
00085 #if VTK_TYPE_CHAR_IS_SIGNED
00086 # define VTK_CHAR_MIN               VTK_TYPE_CAST(char, 0x80)
00087 # define VTK_CHAR_MAX               VTK_TYPE_CAST(char, 0x7f)
00088 #else
00089 # define VTK_CHAR_MIN               VTK_TYPE_CAST(char, 0u)
00090 # define VTK_CHAR_MAX               VTK_TYPE_CAST(char, 0xffu)
00091 #endif
00092 #define VTK_SIGNED_CHAR_MIN         VTK_TYPE_CAST(signed char, 0x80)
00093 #define VTK_SIGNED_CHAR_MAX         VTK_TYPE_CAST(signed char, 0x7f)
00094 #define VTK_UNSIGNED_CHAR_MIN       VTK_TYPE_CAST(unsigned char, 0u)
00095 #define VTK_UNSIGNED_CHAR_MAX       VTK_TYPE_CAST(unsigned char, 0xffu)
00096 #define VTK_SHORT_MIN               VTK_TYPE_CAST(short, 0x8000)
00097 #define VTK_SHORT_MAX               VTK_TYPE_CAST(short, 0x7fff)
00098 #define VTK_UNSIGNED_SHORT_MIN      VTK_TYPE_CAST(unsigned short, 0u)
00099 #define VTK_UNSIGNED_SHORT_MAX      VTK_TYPE_CAST(unsigned short, 0xffffu)
00100 #define VTK_INT_MIN                 VTK_TYPE_CAST(int, ~(~0u >> 1))
00101 #define VTK_INT_MAX                 VTK_TYPE_CAST(int, ~0u >> 1)
00102 #define VTK_UNSIGNED_INT_MIN        VTK_TYPE_CAST(unsigned int, 0)
00103 #define VTK_UNSIGNED_INT_MAX        VTK_TYPE_CAST(unsigned int, ~0u)
00104 #define VTK_LONG_MIN                VTK_TYPE_CAST(long, ~(~0ul >> 1))
00105 #define VTK_LONG_MAX                VTK_TYPE_CAST(long, ~0ul >> 1)
00106 #define VTK_UNSIGNED_LONG_MIN       VTK_TYPE_CAST(unsigned long, 0ul)
00107 #define VTK_UNSIGNED_LONG_MAX       VTK_TYPE_CAST(unsigned long, ~0ul)
00108 #define VTK_FLOAT_MIN               VTK_TYPE_CAST(float, -1.0e+38f)
00109 #define VTK_FLOAT_MAX               VTK_TYPE_CAST(float,  1.0e+38f)
00110 #define VTK_DOUBLE_MIN              VTK_TYPE_CAST(double, -1.0e+299)
00111 #define VTK_DOUBLE_MAX              VTK_TYPE_CAST(double,  1.0e+299)
00112 #if defined(VTK_SIZEOF_LONG_LONG)
00113 # define VTK_LONG_LONG_MIN          VTK_TYPE_CAST(long long, ~(~0ull >> 1))
00114 # define VTK_LONG_LONG_MAX          VTK_TYPE_CAST(long long, ~0ull >> 1)
00115 # define VTK_UNSIGNED_LONG_LONG_MIN VTK_TYPE_CAST(unsigned long long, 0ull)
00116 # define VTK_UNSIGNED_LONG_LONG_MAX VTK_TYPE_CAST(unsigned long long, ~0ull)
00117 #endif
00118 #if defined(VTK_SIZEOF___INT64)
00119 # define VTK___INT64_MIN            VTK_TYPE_CAST(__int64, ~(~0ui64 >> 1))
00120 # define VTK___INT64_MAX            VTK_TYPE_CAST(__int64, ~0ui64 >> 1)
00121 # define VTK_UNSIGNED___INT64_MIN   VTK_TYPE_CAST(unsigned __int64, 0ui64)
00122 # define VTK_UNSIGNED___INT64_MAX   VTK_TYPE_CAST(unsigned __int64, ~0ui64)
00123 #endif
00124 
00125 
00126 #define VTK_LARGE_INTEGER VTK_INT_MAX
00127 #define VTK_LARGE_FLOAT VTK_FLOAT_MAX
00128 
00129 
00130 
00131 
00132 
00133 
00134 #if VTK_SIZEOF_CHAR == 1
00135 typedef unsigned char vtkTypeUInt8;
00136 typedef signed char   vtkTypeInt8;
00137 # define VTK_TYPE_UINT8 VTK_UNSIGNED_CHAR
00138 # if VTK_TYPE_CHAR_IS_SIGNED
00139 #  define VTK_TYPE_INT8 VTK_CHAR
00140 # else
00141 #  define VTK_TYPE_INT8 VTK_SIGNED_CHAR
00142 # endif
00143 #else
00144 # error "No native data type can represent an 8-bit integer."
00145 #endif
00146 
00147 
00148 #if VTK_SIZEOF_SHORT == 2
00149 typedef unsigned short vtkTypeUInt16;
00150 typedef signed short   vtkTypeInt16;
00151 # define VTK_TYPE_UINT16 VTK_UNSIGNED_SHORT
00152 # define VTK_TYPE_INT16 VTK_SHORT
00153 #elif VTK_SIZEOF_INT == 2
00154 typedef unsigned int vtkTypeUInt16;
00155 typedef signed int   vtkTypeInt16;
00156 # define VTK_TYPE_UINT16 VTK_UNSIGNED_INT
00157 # define VTK_TYPE_INT16 VTK_INT
00158 #else
00159 # error "No native data type can represent a 16-bit integer."
00160 #endif
00161 
00162 
00163 #if VTK_SIZEOF_INT == 4
00164 typedef unsigned int vtkTypeUInt32;
00165 typedef signed int   vtkTypeInt32;
00166 # define VTK_TYPE_UINT32 VTK_UNSIGNED_INT
00167 # define VTK_TYPE_INT32 VTK_INT
00168 #elif VTK_SIZEOF_LONG == 4
00169 typedef unsigned long vtkTypeUInt32;
00170 typedef signed long   vtkTypeInt32;
00171 # define VTK_TYPE_UINT32 VTK_UNSIGNED_LONG
00172 # define VTK_TYPE_INT32 VTK_LONG
00173 #else
00174 # error "No native data type can represent a 32-bit integer."
00175 #endif
00176 
00177 
00178 #if VTK_SIZEOF_LONG == 8
00179 typedef unsigned long vtkTypeUInt64;
00180 typedef signed long   vtkTypeInt64;
00181 # define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG
00182 # define VTK_TYPE_INT64 VTK_LONG
00183 #elif defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8
00184 typedef unsigned long long vtkTypeUInt64;
00185 typedef signed long long   vtkTypeInt64;
00186 # define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG_LONG
00187 # define VTK_TYPE_INT64 VTK_LONG_LONG
00188 #elif defined(VTK_TYPE_USE___INT64) && VTK_SIZEOF___INT64 == 8
00189 typedef unsigned __int64 vtkTypeUInt64;
00190 typedef signed __int64   vtkTypeInt64;
00191 # define VTK_TYPE_UINT64 VTK_UNSIGNED___INT64
00192 # define VTK_TYPE_INT64 VTK___INT64
00193 #else
00194 # error "No native data type can represent a 64-bit integer."
00195 #endif
00196 
00197 
00198 #if VTK_SIZEOF_FLOAT == 4
00199 typedef float vtkTypeFloat32;
00200 # define VTK_TYPE_FLOAT32 VTK_FLOAT
00201 #else
00202 # error "No native data type can represent a 32-bit floating point value."
00203 #endif
00204 
00205 
00206 #if VTK_SIZEOF_DOUBLE == 8
00207 typedef double vtkTypeFloat64;
00208 # define VTK_TYPE_FLOAT64 VTK_DOUBLE
00209 #else
00210 # error "No native data type can represent a 64-bit floating point value."
00211 #endif
00212 
00213 
00214 
00215 #define VTK_HAS_ID_TYPE
00216 #ifdef VTK_USE_64BIT_IDS
00217 # if defined(VTK_SIZEOF_LONG) && VTK_SIZEOF_LONG == 8 && 0
00218 typedef long vtkIdType;
00219 #  define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG
00220 #  define VTK_LARGE_ID VTK_LONG_MAX
00221 # elif defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8
00222 typedef long long vtkIdType;
00223 #  define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG_LONG
00224 #  define VTK_LARGE_ID VTK_LONG_LONG_MAX
00225 # elif defined(VTK_TYPE_USE___INT64) && VTK_SIZEOF___INT64 == 8
00226 typedef __int64 vtkIdType;
00227 #  define VTK_SIZEOF_ID_TYPE VTK_SIZEOF___INT64
00228 #  define VTK_LARGE_ID VTK___INT64_MAX
00229 # else
00230 #  error "VTK_USE_64BIT_IDS is ON but no 64-bit integer type is available."
00231 # endif
00232 #else
00233 typedef int vtkIdType;
00234 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_INT
00235 # define VTK_LARGE_ID VTK_INT_MAX
00236 #endif
00237 
00238 
00239 
00240 
00241 
00242 #define vtkFloatingPointType vtkFloatingPointType
00243 typedef double vtkFloatingPointType;
00244 
00245 #endif