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

dox/Common/vtkIdType.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkIdType.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00029 #ifndef __vtkIdType_h 00030 #define __vtkIdType_h 00031 00032 #ifndef __VTK_SYSTEM_INCLUDES__INSIDE 00033 Do_not_include_vtkIdType_directly__vtkSystemIncludes_includes_it; 00034 #endif 00035 00036 // Choose an implementation for vtkIdType. 00037 #define VTK_HAS_ID_TYPE 00038 #ifdef VTK_USE_64BIT_IDS 00039 # define VTK_ID_TYPE_IS_NOT_BASIC_TYPE 00040 # define VTK_SIZEOF_ID_TYPE 8 00041 # ifdef _WIN32 00042 typedef __int64 vtkIdType; 00043 # define VTK_NEED_ID_TYPE_STREAM_OPERATORS 00044 # else // _WIN32 00045 typedef long long vtkIdType; 00046 # define VTK_NEED_ID_TYPE_STREAM_OPERATORS 00047 # endif // _WIN32 00048 #else // VTK_USE_64BIT_IDS 00049 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_INT 00050 typedef int vtkIdType; 00051 #endif // VTK_USE_64BIT_IDS 00052 00053 // Visual Studio 6 does not provide these operators. 00054 #if defined(VTK_USE_64BIT_IDS) && defined(_MSC_VER) && (_MSC_VER < 1300) 00055 # if !defined(VTK_NO_INT64_OSTREAM_OPERATOR) 00056 VTK_COMMON_EXPORT ostream& vtkIdTypeOutput(ostream& os, __int64 id); 00057 inline ostream& operator << (ostream& os, __int64 id) 00058 { 00059 return vtkIdTypeOutput(os, id); 00060 } 00061 # endif 00062 # if !defined(VTK_NO_INT64_ISTREAM_OPERATOR) 00063 VTK_COMMON_EXPORT istream& vtkIdTypeInput(istream& is, __int64& id); 00064 inline istream& operator >> (istream& is, __int64& id) 00065 { 00066 return vtkIdTypeInput(is, id); 00067 } 00068 # endif 00069 #endif 00070 00071 #endif