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

vtkFloatArray.h

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