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

vtkIntArray.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIntArray.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 =========================================================================*/
00041 #ifndef __vtkIntArray_h
00042 #define __vtkIntArray_h
00043 
00044 // Tell the template header how to give our superclass a DLL interface.
00045 #if !defined(__vtkIntArray_cxx)
00046 # define VTK_DATA_ARRAY_TEMPLATE_TYPE int
00047 #endif
00048 
00049 #include "vtkDataArray.h"
00050 #include "vtkDataArrayTemplate.h" // Real Superclass
00051 
00052 // Fake the superclass for the wrappers.
00053 #define vtkDataArray vtkDataArrayTemplate<int>
00054 class VTK_COMMON_EXPORT vtkIntArray : public vtkDataArray
00055 #undef vtkDataArray
00056 {
00057 public:
00058   static vtkIntArray* New();
00059   vtkTypeRevisionMacro(vtkIntArray,vtkDataArray);
00060   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00063 
00064   int GetDataType()
00065     { return VTK_INT; }
00067 
00069 
00070   int GetValue(vtkIdType id)
00071     { return this->RealSuperclass::GetValue(id); }
00073 
00075 
00077   void SetValue(vtkIdType id, int value)
00078     { this->RealSuperclass::SetValue(id, value); }
00080 
00082 
00085   void SetNumberOfValues(vtkIdType number)
00086     { this->RealSuperclass::SetNumberOfValues(number); }
00088 
00090 
00091   void InsertValue(vtkIdType id, int f)
00092     { this->RealSuperclass::InsertValue(id, f); }
00094 
00096 
00098   vtkIdType InsertNextValue(int f)
00099     { return this->RealSuperclass::InsertNextValue(f); }
00101 
00103 
00106   int* WritePointer(vtkIdType id, vtkIdType number)
00107     { return this->RealSuperclass::WritePointer(id, number); }
00109 
00111 
00113   int* GetPointer(vtkIdType id)
00114     { return this->RealSuperclass::GetPointer(id); }
00116 
00118 
00124   void SetArray(int* array, vtkIdType size, int save)
00125     { this->RealSuperclass::SetArray(array, size, save); }
00127 
00128 protected:
00129   vtkIntArray(vtkIdType numComp=1);
00130   ~vtkIntArray();
00131 
00132 private:
00133   //BTX
00134   typedef vtkDataArrayTemplate<int> RealSuperclass;
00135   //ETX
00136   vtkIntArray(const vtkIntArray&);  // Not implemented.
00137   void operator=(const vtkIntArray&);  // Not implemented.
00138 };
00139 
00140 #endif