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

vtkUnsignedCharArray.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkUnsignedCharArray.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 =========================================================================*/
00040 #ifndef __vtkUnsignedCharArray_h
00041 #define __vtkUnsignedCharArray_h
00042 
00043 // Tell the template header how to give our superclass a DLL interface.
00044 #if !defined(__vtkUnsignedCharArray_cxx)
00045 # define VTK_DATA_ARRAY_TEMPLATE_TYPE unsigned char
00046 #endif
00047 
00048 #include "vtkDataArray.h"
00049 #include "vtkDataArrayTemplate.h" // Real Superclass
00050 
00051 // Fake the superclass for the wrappers.
00052 #define vtkDataArray vtkDataArrayTemplate<unsigned char>
00053 class VTK_COMMON_EXPORT vtkUnsignedCharArray : public vtkDataArray
00054 #undef vtkDataArray
00055 {
00056 public:
00057   static vtkUnsignedCharArray* New();
00058   vtkTypeRevisionMacro(vtkUnsignedCharArray,vtkDataArray);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062 
00063   int GetDataType()
00064     { return VTK_UNSIGNED_CHAR; }
00066 
00068 
00069   unsigned char GetValue(vtkIdType id)
00070     { return this->RealSuperclass::GetValue(id); }
00072 
00074 
00076   void SetValue(vtkIdType id, unsigned char value)
00077     { this->RealSuperclass::SetValue(id, value); }
00079 
00081 
00084   void SetNumberOfValues(vtkIdType number)
00085     { this->RealSuperclass::SetNumberOfValues(number); }
00087 
00089 
00090   void InsertValue(vtkIdType id, unsigned char f)
00091     { this->RealSuperclass::InsertValue(id, f); }
00093 
00095 
00097   vtkIdType InsertNextValue(unsigned char f)
00098     { return this->RealSuperclass::InsertNextValue(f); }
00100 
00102 
00105   unsigned char* WritePointer(vtkIdType id, vtkIdType number)
00106     { return this->RealSuperclass::WritePointer(id, number); }
00108 
00110 
00112   unsigned char* GetPointer(vtkIdType id)
00113     { return this->RealSuperclass::GetPointer(id); }
00115 
00117 
00123   void SetArray(unsigned char* array, vtkIdType size, int save)
00124     { this->RealSuperclass::SetArray(array, size, save); }
00126 
00127 protected:
00128   vtkUnsignedCharArray(vtkIdType numComp=1);
00129   ~vtkUnsignedCharArray();
00130 
00131 private:
00132   //BTX
00133   typedef vtkDataArrayTemplate<unsigned char> RealSuperclass;
00134   //ETX
00135   vtkUnsignedCharArray(const vtkUnsignedCharArray&);  // Not implemented.
00136   void operator=(const vtkUnsignedCharArray&);  // Not implemented.
00137 };
00138 
00139 #endif