Common/vtkSystemIncludes.h Source File

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

# 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 =========================================================================*/
    00044 #ifndef __vtkSystemIncludes_h
    00045 #define __vtkSystemIncludes_h
    00046
    00047 /* first include the local configuration for this machine */
    00048 #define __VTK_SYSTEM_INCLUDES__INSIDE
    00049 #include "vtkWin32Header.h"
    00050 #undef __VTK_SYSTEM_INCLUDES__INSIDE
    00051
    00052 #ifndef VTK_NO_STD_NAMESPACE
    00053 # define vtkstd std
    00054 #else
    00055 # define vtkstd
    00056 #endif
    00057
    00058 // The language wrapper files do not need the real streams.  They
    00059 // define VTK_STREAMS_FWD_ONLY so that the streams are only
    00060 // forward-declared.  This significantly improves compile time on some
    00061 // platforms.
    00062 #if defined(VTK_STREAMS_FWD_ONLY)
    00063 # include "vtkIOStreamFwd.h" // Forward-declare the C++ streams.
    00064 #else
    00065 # include "vtkIOStream.h"    // Include the real C++ streams.
    00066 #endif
    00067
    00068 #define __VTK_SYSTEM_INCLUDES__INSIDE
    00069 #include "vtkIdType.h"            // Define vtkIdType and its stream operators.
    00070 #include "vtkOStreamWrapper.h"    // Include the ostream wrapper.
    00071 #include "vtkOStrStreamWrapper.h" // Include the ostrstream wrapper.
    00072 #undef __VTK_SYSTEM_INCLUDES__INSIDE
    00073
    00074 // Include generic stuff.
    00075 #include <stdio.h>
    00076 #include <stdlib.h>
    00077 #include <string.h>
    00078
    00079 // Some constants used throughout the code
    00080 #define VTK_LARGE_FLOAT 1.0e+38F
    00081 #ifdef VTK_USE_64BIT_IDS
    00082 #  ifdef _WIN32
    00083 #    define VTK_LARGE_ID 9223372036854775807i64 // 2^63 - 1
    00084 #  else
    00085 #    define VTK_LARGE_ID 9223372036854775807LL // 2^63 - 1
    00086 #  endif
    00087 #else
    00088 #  define VTK_LARGE_ID 2147483647 // 2^31 - 1
    00089 #endif
    00090
    00091 #define VTK_LARGE_INTEGER 2147483647 // 2^31 - 1
    00092
    00093 // These types are returned by GetDataType to indicate pixel type.
    00094 #define VTK_VOID            0
    00095 #define VTK_BIT             1
    00096 #define VTK_CHAR            2
    00097 #define VTK_UNSIGNED_CHAR   3
    00098 #define VTK_SHORT           4
    00099 #define VTK_UNSIGNED_SHORT  5
    00100 #define VTK_INT             6
    00101 #define VTK_UNSIGNED_INT    7
    00102 #define VTK_LONG            8
    00103 #define VTK_UNSIGNED_LONG   9
    00104 #define VTK_FLOAT          10
    00105 #define VTK_DOUBLE         11
    00106 #define VTK_ID_TYPE        12
    00107
    00108 // These types are not currently supported by GetDataType, but are
    00109 // for completeness.
    00110 #define VTK_STRING         13
    00111 #define VTK_OPAQUE         14
    00112
    00113 // Some constant required for correct template performance
    00114 #define VTK_BIT_MIN            0
    00115 #define VTK_BIT_MAX            1
    00116 #define VTK_CHAR_MIN          -128
    00117 #define VTK_CHAR_MAX           127
    00118 #define VTK_UNSIGNED_CHAR_MIN  0
    00119 #define VTK_UNSIGNED_CHAR_MAX  255
    00120 #define VTK_SHORT_MIN         -32768
    00121 #define VTK_SHORT_MAX          32767
    00122 #define VTK_UNSIGNED_SHORT_MIN 0
    00123 #define VTK_UNSIGNED_SHORT_MAX 65535
    00124 #define VTK_INT_MIN          (-VTK_LARGE_INTEGER-1)
    00125 #define VTK_INT_MAX            VTK_LARGE_INTEGER
    00126 #define VTK_UNSIGNED_INT_MIN   0
    00127 #define VTK_UNSIGNED_INT_MAX   4294967295UL
    00128 #define VTK_LONG_MIN         (-VTK_LARGE_INTEGER-1)
    00129 #define VTK_LONG_MAX           VTK_LARGE_INTEGER
    00130 #define VTK_UNSIGNED_LONG_MIN  0
    00131 #define VTK_UNSIGNED_LONG_MAX  4294967295UL
    00132 #define VTK_FLOAT_MIN         -VTK_LARGE_FLOAT
    00133 #define VTK_FLOAT_MAX          VTK_LARGE_FLOAT
    00134 #define VTK_DOUBLE_MIN        -1.0e+99L
    00135 #define VTK_DOUBLE_MAX         1.0e+99L
    00136
    00137 // These types are returned to distinguish data object types
    00138 #define VTK_POLY_DATA          0
    00139 #define VTK_STRUCTURED_POINTS  1
    00140 #define VTK_STRUCTURED_GRID    2
    00141 #define VTK_RECTILINEAR_GRID   3
    00142 #define VTK_UNSTRUCTURED_GRID  4
    00143 #define VTK_PIECEWISE_FUNCTION 5
    00144 #define VTK_IMAGE_DATA         6
    00145 #define VTK_DATA_OBJECT        7
    00146 #define VTK_DATA_SET           8
    00147 #define VTK_POINT_SET          9
    00148
    00149 // These types define error codes for vtk functions
    00150 #define VTK_OK                 1
    00151 #define VTK_ERROR              2
    00152
    00153 // These types define different text properties
    00154 #define VTK_ARIAL     0
    00155 #define VTK_COURIER   1
    00156 #define VTK_TIMES     2
    00157
    00158 #define VTK_TEXT_LEFT     0
    00159 #define VTK_TEXT_CENTERED 1
    00160 #define VTK_TEXT_RIGHT    2
    00161
    00162 #define VTK_TEXT_BOTTOM 0
    00163 #define VTK_TEXT_TOP    2
    00164
    00165 #define VTK_TEXT_GLOBAL_ANTIALIASING_SOME 0
    00166 #define VTK_TEXT_GLOBAL_ANTIALIASING_NONE 1
    00167 #define VTK_TEXT_GLOBAL_ANTIALIASING_ALL 2
    00168
    00169 #define VTK_LUMINANCE       1
    00170 #define VTK_LUMINANCE_ALPHA 2
    00171 #define VTK_RGB             3
    00172 #define VTK_RGBA            4
    00173
    00174 #define VTK_COLOR_MODE_DEFAULT 0
    00175 #define VTK_COLOR_MODE_MAP_SCALARS 1
    00176
    00177 // Constants for InterpolationType
    00178 #define VTK_NEAREST_INTERPOLATION       0
    00179 #define VTK_LINEAR_INTERPOLATION        1
    00180
    00181 // For volume rendering
    00182 #define VTK_MAX_VRCOMP                  4
    00183
    00184 // For multithreading
    00185
    00186 // The maximum number of threads allowed
    00187 #ifdef VTK_USE_SPROC
    00188 #define VTK_MAX_THREADS              32
    00189 #endif
    00190
    00191 #ifdef VTK_USE_PTHREADS
    00192 #define VTK_MAX_THREADS              32
    00193 #endif
    00194
    00195 #ifdef VTK_USE_WIN32_THREADS
    00196 #define VTK_MAX_THREADS              8
    00197 #endif
    00198
    00199 #ifndef VTK_USE_WIN32_THREADS
    00200 #ifndef VTK_USE_SPROC
    00201 #ifndef VTK_USE_PTHREADS
    00202 #define VTK_MAX_THREADS              1
    00203 #endif
    00204 #endif
    00205 #endif
    00206
    00207 // If VTK_USE_PTHREADS is defined, then the multithreaded
    00208 // function is of type void *, and returns NULL
    00209 // Otherwise the type is void which is correct for WIN32
    00210 // and SPROC
    00211 #ifdef VTK_USE_PTHREADS
    00212 #define VTK_THREAD_RETURN_VALUE  NULL
    00213 #define VTK_THREAD_RETURN_TYPE   void *
    00214 #endif
    00215
    00216 #ifdef VTK_USE_WIN32_THREADS
    00217 #define VTK_THREAD_RETURN_VALUE 0
    00218 #define VTK_THREAD_RETURN_TYPE DWORD __stdcall
    00219 #endif
    00220
    00221 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS)
    00222 #define VTK_THREAD_RETURN_VALUE
    00223 #define VTK_THREAD_RETURN_TYPE void
    00224 #endif
    00225
    00226 #endif