Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkSystemIncludes.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkSystemIncludes.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00031 #ifndef __vtkSystemIncludes_h 00032 #define __vtkSystemIncludes_h 00033 00034 /* first include the local configuration for this machine */ 00035 #define __VTK_SYSTEM_INCLUDES__INSIDE 00036 #include "vtkWin32Header.h" 00037 #undef __VTK_SYSTEM_INCLUDES__INSIDE 00038 00039 #ifndef VTK_NO_STD_NAMESPACE 00040 # define vtkstd std 00041 #else 00042 # define vtkstd 00043 #endif 00044 00045 // The language wrapper files do not need the real streams. They 00046 // define VTK_STREAMS_FWD_ONLY so that the streams are only 00047 // forward-declared. This significantly improves compile time on some 00048 // platforms. 00049 #if defined(VTK_STREAMS_FWD_ONLY) 00050 # include "vtkIOStreamFwd.h" // Forward-declare the C++ streams. 00051 #else 00052 # include "vtkIOStream.h" // Include the real C++ streams. 00053 #endif 00054 00055 // define the type of floating point interface used for old and new versions 00056 // of VTK. VTK42 and older use float and VTK 44 and newer use double for most 00057 // of the API calls 00058 #define vtkFloatingPointType vtkFloatingPointType 00059 typedef float vtkFloatingPointType; 00060 00061 #define __VTK_SYSTEM_INCLUDES__INSIDE 00062 #include "vtkIdType.h" // Define vtkIdType and its stream operators. 00063 #include "vtkOStreamWrapper.h" // Include the ostream wrapper. 00064 #include "vtkOStrStreamWrapper.h" // Include the ostrstream wrapper. 00065 #undef __VTK_SYSTEM_INCLUDES__INSIDE 00066 00067 // Include generic stuff. 00068 #include <stdio.h> 00069 #include <stdlib.h> 00070 #include <string.h> 00071 00072 // Some constants used throughout the code 00073 #define VTK_LARGE_FLOAT 1.0e+38F 00074 #ifdef VTK_USE_64BIT_IDS 00075 # ifdef _WIN32 00076 # define VTK_LARGE_ID 9223372036854775807i64 // 2^63 - 1 00077 # else 00078 # define VTK_LARGE_ID 9223372036854775807LL // 2^63 - 1 00079 # endif 00080 #else 00081 # define VTK_LARGE_ID 2147483647 // 2^31 - 1 00082 #endif 00083 00084 #define VTK_LARGE_INTEGER 2147483647 // 2^31 - 1 00085 00086 // These types are returned by GetDataType to indicate pixel type. 00087 #define VTK_VOID 0 00088 #define VTK_BIT 1 00089 #define VTK_CHAR 2 00090 #define VTK_UNSIGNED_CHAR 3 00091 #define VTK_SHORT 4 00092 #define VTK_UNSIGNED_SHORT 5 00093 #define VTK_INT 6 00094 #define VTK_UNSIGNED_INT 7 00095 #define VTK_LONG 8 00096 #define VTK_UNSIGNED_LONG 9 00097 #define VTK_FLOAT 10 00098 #define VTK_DOUBLE 11 00099 #define VTK_ID_TYPE 12 00100 00101 // These types are not currently supported by GetDataType, but are 00102 // for completeness. 00103 #define VTK_STRING 13 00104 #define VTK_OPAQUE 14 00105 00106 // Some constant required for correct template performance 00107 #define VTK_BIT_MIN 0 00108 #define VTK_BIT_MAX 1 00109 #define VTK_CHAR_MIN -128 00110 #define VTK_CHAR_MAX 127 00111 #define VTK_UNSIGNED_CHAR_MIN 0 00112 #define VTK_UNSIGNED_CHAR_MAX 255 00113 #define VTK_SHORT_MIN -32768 00114 #define VTK_SHORT_MAX 32767 00115 #define VTK_UNSIGNED_SHORT_MIN 0 00116 #define VTK_UNSIGNED_SHORT_MAX 65535 00117 #define VTK_INT_MIN (-VTK_LARGE_INTEGER-1) 00118 #define VTK_INT_MAX VTK_LARGE_INTEGER 00119 #define VTK_UNSIGNED_INT_MIN 0 00120 #define VTK_UNSIGNED_INT_MAX 4294967295UL 00121 #define VTK_LONG_MIN (-VTK_LARGE_INTEGER-1) 00122 #define VTK_LONG_MAX VTK_LARGE_INTEGER 00123 #define VTK_UNSIGNED_LONG_MIN 0 00124 #define VTK_UNSIGNED_LONG_MAX 4294967295UL 00125 #define VTK_FLOAT_MIN -VTK_LARGE_FLOAT 00126 #define VTK_FLOAT_MAX VTK_LARGE_FLOAT 00127 #define VTK_DOUBLE_MIN -1.0e+99L 00128 #define VTK_DOUBLE_MAX 1.0e+99L 00129 00130 // These types are returned to distinguish data object types 00131 #define VTK_POLY_DATA 0 00132 #define VTK_STRUCTURED_POINTS 1 00133 #define VTK_STRUCTURED_GRID 2 00134 #define VTK_RECTILINEAR_GRID 3 00135 #define VTK_UNSTRUCTURED_GRID 4 00136 #define VTK_PIECEWISE_FUNCTION 5 00137 #define VTK_IMAGE_DATA 6 00138 #define VTK_DATA_OBJECT 7 00139 #define VTK_DATA_SET 8 00140 #define VTK_POINT_SET 9 00141 00142 // These types define error codes for vtk functions 00143 #define VTK_OK 1 00144 #define VTK_ERROR 2 00145 00146 // These types define different text properties 00147 #define VTK_ARIAL 0 00148 #define VTK_COURIER 1 00149 #define VTK_TIMES 2 00150 00151 #define VTK_TEXT_LEFT 0 00152 #define VTK_TEXT_CENTERED 1 00153 #define VTK_TEXT_RIGHT 2 00154 00155 #define VTK_TEXT_BOTTOM 0 00156 #define VTK_TEXT_TOP 2 00157 00158 #define VTK_TEXT_GLOBAL_ANTIALIASING_SOME 0 00159 #define VTK_TEXT_GLOBAL_ANTIALIASING_NONE 1 00160 #define VTK_TEXT_GLOBAL_ANTIALIASING_ALL 2 00161 00162 #define VTK_LUMINANCE 1 00163 #define VTK_LUMINANCE_ALPHA 2 00164 #define VTK_RGB 3 00165 #define VTK_RGBA 4 00166 00167 #define VTK_COLOR_MODE_DEFAULT 0 00168 #define VTK_COLOR_MODE_MAP_SCALARS 1 00169 00170 // Constants for InterpolationType 00171 #define VTK_NEAREST_INTERPOLATION 0 00172 #define VTK_LINEAR_INTERPOLATION 1 00173 00174 // For volume rendering 00175 #define VTK_MAX_VRCOMP 4 00176 00177 // For multithreading 00178 00179 // The maximum number of threads allowed 00180 #ifdef VTK_USE_SPROC 00181 #define VTK_MAX_THREADS 32 00182 #endif 00183 00184 #ifdef VTK_USE_PTHREADS 00185 #define VTK_MAX_THREADS 32 00186 #endif 00187 00188 #ifdef VTK_USE_WIN32_THREADS 00189 #define VTK_MAX_THREADS 8 00190 #endif 00191 00192 #ifndef VTK_USE_WIN32_THREADS 00193 #ifndef VTK_USE_SPROC 00194 #ifndef VTK_USE_PTHREADS 00195 #define VTK_MAX_THREADS 1 00196 #endif 00197 #endif 00198 #endif 00199 00200 // If VTK_USE_PTHREADS is defined, then the multithreaded 00201 // function is of type void *, and returns NULL 00202 // Otherwise the type is void which is correct for WIN32 00203 // and SPROC 00204 #ifdef VTK_USE_PTHREADS 00205 #define VTK_THREAD_RETURN_VALUE NULL 00206 #define VTK_THREAD_RETURN_TYPE void * 00207 #endif 00208 00209 #ifdef VTK_USE_WIN32_THREADS 00210 #define VTK_THREAD_RETURN_VALUE 0 00211 #define VTK_THREAD_RETURN_TYPE DWORD __stdcall 00212 #endif 00213 00214 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS) 00215 #define VTK_THREAD_RETURN_VALUE 00216 #define VTK_THREAD_RETURN_TYPE void 00217 #endif 00218 00219 #endif