VTK
vtkBitArrayIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBitArrayIterator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkBitArrayIterator_h
23 #define vtkBitArrayIterator_h
24 
25 #include "vtkCommonCoreModule.h" // For export macro
26 #include "vtkArrayIterator.h"
27 
28 class vtkBitArray;
29 class VTKCOMMONCORE_EXPORT vtkBitArrayIterator : public vtkArrayIterator
30 {
31 public:
32  static vtkBitArrayIterator* New();
34  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
35 
43  void Initialize(vtkAbstractArray* array) VTK_OVERRIDE;
44 
48  vtkAbstractArray* GetArray();
49 
53  int* GetTuple(vtkIdType id) ;
54 
58  int GetValue(vtkIdType id);
59 
63  vtkIdType GetNumberOfTuples();
64 
68  vtkIdType GetNumberOfValues();
69 
73  int GetNumberOfComponents();
74 
78  int GetDataType() VTK_OVERRIDE;
79 
83  int GetDataTypeSize();
84 
89  void SetValue(vtkIdType id, int value);
90 
94  typedef int ValueType;
95 
96 protected:
98  ~vtkBitArrayIterator() VTK_OVERRIDE;
99 
100  int *Tuple;
101  int TupleSize;
102  void SetArray(vtkBitArray* b);
103  vtkBitArray* Array;
104 private:
105  vtkBitArrayIterator(const vtkBitArrayIterator&) VTK_DELETE_FUNCTION;
106  void operator=(const vtkBitArrayIterator&) VTK_DELETE_FUNCTION;
107 };
108 
109 #endif
110 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Iterator for vtkBitArray.
virtual int GetDataType()=0
Get the data type from the underlying array.
Abstract superclass for all arrays.
int vtkIdType
Definition: vtkType.h:287
int ValueType
Data type of a value.
virtual void Initialize(vtkAbstractArray *array)=0
Set the array this iterator will iterate over.
a simple class to control print indentation
Definition: vtkIndent.h:39
Abstract superclass to iterate over elements in an vtkAbstractArray.
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...