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

Common/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 =========================================================================*/
00029 #ifndef __vtkIntArray_h
00030 #define __vtkIntArray_h
00031 
00032 // Tell the template header how to give our superclass a DLL interface.
00033 #if !defined(__vtkIntArray_cxx)
00034 # define VTK_DATA_ARRAY_TEMPLATE_TYPE int
00035 #endif
00036 
00037 #include "vtkDataArray.h"
00038 #include "vtkDataArrayTemplate.h" // Real Superclass
00039 
00040 // Fake the superclass for the wrappers.
00041 #define vtkDataArray vtkDataArrayTemplate<int>
00042 class VTK_COMMON_EXPORT vtkIntArray : public vtkDataArray
00043 #undef vtkDataArray
00044 {
00045 public:
00046   static vtkIntArray* New();
00047   vtkTypeRevisionMacro(vtkIntArray,vtkDataArray);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00052   int GetDataType()
00053     { return VTK_INT; }
00055 
00057 
00058   int GetValue(vtkIdType id)
00059     { return this->RealSuperclass::GetValue(id); }
00061 
00063 
00065   void SetValue(vtkIdType id, int value)
00066     { this->RealSuperclass::SetValue(id, value); }
00068 
00070 
00073   void SetNumberOfValues(vtkIdType number)
00074     { this->RealSuperclass::SetNumberOfValues(number); }
00076 
00078 
00079   void InsertValue(vtkIdType id, int f)
00080     { this->RealSuperclass::InsertValue(id, f); }
00082 
00084 
00086   vtkIdType InsertNextValue(int f)
00087     { return this->RealSuperclass::InsertNextValue(f); }
00089 
00091 
00094   int* WritePointer(vtkIdType id, vtkIdType number)
00095     { return this->RealSuperclass::WritePointer(id, number); }
00097 
00099 
00101   int* GetPointer(vtkIdType id)
00102     { return this->RealSuperclass::GetPointer(id); }
00104 
00106 
00112   void SetArray(int* array, vtkIdType size, int save)
00113     { this->RealSuperclass::SetArray(array, size, save); }
00115 
00116 protected:
00117   vtkIntArray(vtkIdType numComp=1);
00118   ~vtkIntArray();
00119 
00120 private:
00121   //BTX
00122   typedef vtkDataArrayTemplate<int> RealSuperclass;
00123   //ETX
00124   vtkIntArray(const vtkIntArray&);  // Not implemented.
00125   void operator=(const vtkIntArray&);  // Not implemented.
00126 };
00127 
00128 #endif