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

dox/Common/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 =========================================================================*/ 00026 #ifndef __vtkUnsignedCharArray_h 00027 #define __vtkUnsignedCharArray_h 00028 00029 // Tell the template header how to give our superclass a DLL interface. 00030 #if !defined(__vtkUnsignedCharArray_cxx) 00031 # define VTK_DATA_ARRAY_TEMPLATE_TYPE unsigned char 00032 #endif 00033 00034 #include "vtkDataArray.h" 00035 #include "vtkDataArrayTemplate.h" // Real Superclass 00036 00037 // Fake the superclass for the wrappers. 00038 #define vtkDataArray vtkDataArrayTemplate<unsigned char> 00039 class VTK_COMMON_EXPORT vtkUnsignedCharArray : public vtkDataArray 00040 #undef vtkDataArray 00041 { 00042 public: 00043 static vtkUnsignedCharArray* New(); 00044 vtkTypeRevisionMacro(vtkUnsignedCharArray,vtkDataArray); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00049 int GetDataType() 00050 { return VTK_UNSIGNED_CHAR; } 00052 00054 00055 unsigned char GetValue(vtkIdType id) 00056 { return this->RealSuperclass::GetValue(id); } 00058 00060 00062 void SetValue(vtkIdType id, unsigned char value) 00063 { this->RealSuperclass::SetValue(id, value); } 00065 00067 00070 void SetNumberOfValues(vtkIdType number) 00071 { this->RealSuperclass::SetNumberOfValues(number); } 00073 00075 00076 void InsertValue(vtkIdType id, unsigned char f) 00077 { this->RealSuperclass::InsertValue(id, f); } 00079 00081 00083 vtkIdType InsertNextValue(unsigned char f) 00084 { return this->RealSuperclass::InsertNextValue(f); } 00086 00088 00091 unsigned char* WritePointer(vtkIdType id, vtkIdType number) 00092 { return this->RealSuperclass::WritePointer(id, number); } 00094 00096 00098 unsigned char* GetPointer(vtkIdType id) 00099 { return this->RealSuperclass::GetPointer(id); } 00101 00103 00109 void SetArray(unsigned char* array, vtkIdType size, int save) 00110 { this->RealSuperclass::SetArray(array, size, save); } 00112 00113 protected: 00114 vtkUnsignedCharArray(vtkIdType numComp=1); 00115 ~vtkUnsignedCharArray(); 00116 00117 private: 00118 //BTX 00119 typedef vtkDataArrayTemplate<unsigned char> RealSuperclass; 00120 //ETX 00121 vtkUnsignedCharArray(const vtkUnsignedCharArray&); // Not implemented. 00122 void operator=(const vtkUnsignedCharArray&); // Not implemented. 00123 }; 00124 00125 #endif