VTK
dox/Common/Core/vtkIdTypeArray.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkIdTypeArray.h
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 __vtkIdTypeArray_h
00030 #define __vtkIdTypeArray_h
00031 
00032 // Tell the template header how to give our superclass a DLL interface.
00033 #if !(defined(__vtkIdTypeArray_cxx) && defined(VTK_USE_64BIT_IDS)) && (defined(VTK_USE_64BIT_IDS) || !defined(__vtkIntArray_h))
00034 # define VTK_DATA_ARRAY_TEMPLATE_TYPE vtkIdType
00035 #endif
00036 
00037 #include "vtkCommonCoreModule.h" // For export macro
00038 #include "vtkDataArray.h"
00039 #include "vtkDataArrayTemplate.h" // Real Superclass
00040 
00041 // Fake the superclass for the wrappers.
00042 #ifndef __WRAP__
00043 #define vtkDataArray vtkDataArrayTemplate<vtkIdType>
00044 #endif
00045 class VTKCOMMONCORE_EXPORT vtkIdTypeArray : public vtkDataArray
00046 #ifndef __WRAP__
00047 #undef vtkDataArray
00048 #endif
00049 {
00050 public:
00051   static vtkIdTypeArray* New();
00052   vtkTypeMacro(vtkIdTypeArray,vtkDataArray);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00055   // This macro expands to the set of method declarations that
00056   // make up the interface of vtkDataArrayTemplate, which is ignored
00057   // by the wrappers.
00058 #ifdef __WRAP__
00059   vtkCreateWrappedArrayInterface(vtkIdType);
00060 #else
00061 
00063 
00064   int GetDataType()
00065     {
00066       // This needs to overwritten from superclass because
00067       // the templated superclass is not able to differentiate
00068       // vtkIdType from a long long or an int since vtkIdType
00069       // is simply a typedef. This means that
00070       // vtkDataArrayTemplate<vtkIdType> != vtkIdTypeArray.
00071       return VTK_ID_TYPE;
00072     }
00073 #endif
00074 
00075 
00077   static vtkIdType GetDataTypeValueMin() { return VTK_ID_MIN; }
00078 
00080   static vtkIdType GetDataTypeValueMax() { return VTK_ID_MAX; }
00081 
00082 protected:
00083   vtkIdTypeArray();
00084   ~vtkIdTypeArray();
00085 
00086 private:
00087   //BTX
00088   typedef vtkDataArrayTemplate<vtkIdType> RealSuperclass;
00089   //ETX
00090   vtkIdTypeArray(const vtkIdTypeArray&);  // Not implemented.
00091   void operator=(const vtkIdTypeArray&);  // Not implemented.
00092 };
00093 
00094 #endif