VTK
dox/Common/Core/vtkCharArray.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCharArray.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 =========================================================================*/
00026 #ifndef __vtkCharArray_h
00027 #define __vtkCharArray_h
00028 
00029 // Tell the template header how to give our superclass a DLL interface.
00030 #if !defined(__vtkCharArray_cxx)
00031 # define VTK_DATA_ARRAY_TEMPLATE_TYPE char
00032 #endif
00033 
00034 #include "vtkCommonCoreModule.h" // For export macro
00035 #include "vtkDataArray.h"
00036 #include "vtkDataArrayTemplate.h" // Real Superclass
00037 
00038 // Fake the superclass for the wrappers.
00039 #define vtkDataArray vtkDataArrayTemplate<char>
00040 class VTKCOMMONCORE_EXPORT vtkCharArray : public vtkDataArray
00041 #undef vtkDataArray
00042 {
00043 public:
00044   static vtkCharArray* New();
00045   vtkTypeMacro(vtkCharArray,vtkDataArray);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00049 
00050   int GetDataType()
00051     { return VTK_CHAR; }
00053 
00055 
00056   void GetTupleValue(vtkIdType i, char* tuple)
00057     { this->RealSuperclass::GetTupleValue(i, tuple); }
00059 
00061 
00062   void SetTupleValue(vtkIdType i, const char* tuple)
00063     { this->RealSuperclass::SetTupleValue(i, tuple); }
00065 
00067 
00069   void InsertTupleValue(vtkIdType i, const char* tuple)
00070     { this->RealSuperclass::InsertTupleValue(i, tuple); }
00072 
00074 
00076   vtkIdType InsertNextTupleValue(const char* tuple)
00077     { return this->RealSuperclass::InsertNextTupleValue(tuple); }
00079 
00081 
00082   char GetValue(vtkIdType id)
00083     { return this->RealSuperclass::GetValue(id); }
00085 
00087 
00089   void SetValue(vtkIdType id, char value)
00090     { this->RealSuperclass::SetValue(id, value); }
00092 
00094 
00097   void SetNumberOfValues(vtkIdType number)
00098     { this->RealSuperclass::SetNumberOfValues(number); }
00100 
00102 
00103   void InsertValue(vtkIdType id, char f)
00104     { this->RealSuperclass::InsertValue(id, f); }
00106 
00108 
00110   vtkIdType InsertNextValue(char f)
00111     { return this->RealSuperclass::InsertNextValue(f); }
00113 
00114 //BTX
00116 
00118   char *GetValueRange(int comp)
00119     { return this->RealSuperclass::GetValueRange(comp); }
00120   void GetValueRange(char range[2], int comp)
00121     { this->RealSuperclass::GetValueRange(range, comp); }
00123 
00125 
00127   char *GetValueRange()
00128     { return this->RealSuperclass::GetValueRange(0); }
00129   void GetValueRange(char range[2])
00130     { this->RealSuperclass::GetValueRange(range, 0); }
00132 
00134   static char GetDataTypeValueMin() { return VTK_CHAR_MIN; }
00135 
00137 
00138   static char GetDataTypeValueMax() { return VTK_CHAR_MAX; }
00139 //ETX
00141 
00143 
00146   char* WritePointer(vtkIdType id, vtkIdType number)
00147     { return this->RealSuperclass::WritePointer(id, number); }
00149 
00151 
00153   char* GetPointer(vtkIdType id)
00154     { return this->RealSuperclass::GetPointer(id); }
00156 
00158 
00164   void SetArray(char* array, vtkIdType size, int save)
00165     { this->RealSuperclass::SetArray(array, size, save); }
00166   void SetArray(char* array, vtkIdType size, int save, int deleteMethod)
00167     { this->RealSuperclass::SetArray(array, size, save, deleteMethod); }
00169 
00170 protected:
00171   vtkCharArray(vtkIdType numComp=1);
00172   ~vtkCharArray();
00173 
00174 private:
00175   //BTX
00176   typedef vtkDataArrayTemplate<char> RealSuperclass;
00177   //ETX
00178   vtkCharArray(const vtkCharArray&);  // Not implemented.
00179   void operator=(const vtkCharArray&);  // Not implemented.
00180 };
00181 
00182 #endif