VTK
dox/Common/vtkBitArrayIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBitArrayIterator.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 =========================================================================*/
00021 #ifndef __vtkBitArrayIterator_h
00022 #define __vtkBitArrayIterator_h
00023 
00024 #include "vtkArrayIterator.h"
00025 
00026 class vtkBitArray;
00027 class VTK_COMMON_EXPORT vtkBitArrayIterator : public vtkArrayIterator
00028 {
00029 public:
00030   static vtkBitArrayIterator* New();
00031   vtkTypeMacro(vtkBitArrayIterator, vtkArrayIterator);
00032   void PrintSelf(ostream& os, vtkIndent indent);
00033 
00038   virtual void Initialize(vtkAbstractArray* array);
00039   
00041   vtkAbstractArray* GetArray();
00042   
00044   int* GetTuple(vtkIdType id) ;
00045 
00047   int GetValue(vtkIdType id);
00048   
00050   vtkIdType GetNumberOfTuples();
00051 
00053   vtkIdType GetNumberOfValues();
00054 
00056   int GetNumberOfComponents();
00057 
00059   int GetDataType();
00060 
00062   int GetDataTypeSize();
00063 
00067   void SetValue(vtkIdType id, int value);
00068 
00069   //BTX
00071 
00072   typedef int ValueType;
00073   //ETX
00074 protected:
00075   vtkBitArrayIterator();
00076   ~vtkBitArrayIterator();
00078   
00079   int *Tuple;
00080   int TupleSize;
00081   void SetArray(vtkBitArray* b);
00082   vtkBitArray* Array;
00083 private:
00084   vtkBitArrayIterator(const vtkBitArrayIterator&); // Not implemented.
00085   void operator=(const vtkBitArrayIterator&); // Not implemented.
00086 };
00087 
00088 #endif
00089