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 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 =========================================================================*/ 00033 #ifndef __vtkIdType_h 00034 #define __vtkIdType_h 00035 00036 #ifndef __VTK_SYSTEM_INCLUDES__INSIDE 00037 Do_not_include_vtkIdType_directly__vtkSystemIncludes_includes_it; 00038 #endif 00039 00040 // Choose an implementation for vtkIdType. 00041 #define VTK_HAS_ID_TYPE 00042 #ifdef VTK_USE_64BIT_IDS 00043 # define VTK_ID_TYPE_IS_NOT_BASIC_TYPE 00044 # define VTK_SIZEOF_ID_TYPE 8 00045 # ifdef _WIN32 00046 typedef __int64 vtkIdType; 00047 # define VTK_NEED_ID_TYPE_STREAM_OPERATORS 00048 # else // _WIN32 00049 typedef long long vtkIdType; 00050 # define VTK_NEED_ID_TYPE_STREAM_OPERATORS 00051 # endif // _WIN32 00052 #else // VTK_USE_64BIT_IDS 00053 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_INT 00054 typedef int vtkIdType; 00055 #endif // VTK_USE_64BIT_IDS 00056 00057 // Define a wrapper class so that we can define streaming operators 00058 // for vtkIdType without conflicting with other libraries' 00059 // implementations. 00060 class VTK_COMMON_EXPORT vtkIdTypeHolder 00061 { 00062 public: 00063 vtkIdTypeHolder(vtkIdType& v): Value(v) {} 00064 vtkIdType& Value; 00065 private: 00066 vtkIdTypeHolder& operator=(const vtkIdTypeHolder&); // Not Implemented. 00067 }; 00068 VTK_COMMON_EXPORT ostream& operator << (ostream& os, vtkIdTypeHolder idh); 00069 VTK_COMMON_EXPORT istream& operator >> (istream& is, vtkIdTypeHolder idh); 00070 00071 #endif