VTK  9.3.1
vtkBitArrayIterator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkBitArrayIterator_h
11 #define vtkBitArrayIterator_h
12 
13 #include "vtkArrayIterator.h"
14 #include "vtkCommonCoreModule.h" // For export macro
15 
16 VTK_ABI_NAMESPACE_BEGIN
17 class vtkBitArray;
18 class VTKCOMMONCORE_EXPORT vtkBitArrayIterator : public vtkArrayIterator
19 {
20 public:
21  static vtkBitArrayIterator* New();
23  void PrintSelf(ostream& os, vtkIndent indent) override;
24 
32  void Initialize(vtkAbstractArray* array) override;
33 
37  vtkAbstractArray* GetArray();
38 
42  int* GetTuple(vtkIdType id);
43 
47  int GetValue(vtkIdType id);
48 
52  vtkIdType GetNumberOfTuples() const;
53 
57  vtkIdType GetNumberOfValues() const;
58 
62  int GetNumberOfComponents() const;
63 
67  int GetDataType() const override;
68 
72  int GetDataTypeSize() const;
73 
78  void SetValue(vtkIdType id, int value);
79 
83  typedef int ValueType;
84 
85 protected:
87  ~vtkBitArrayIterator() override;
88 
89  int* Tuple;
90  int TupleSize;
91  void SetArray(vtkBitArray* b);
93 
94 private:
96  void operator=(const vtkBitArrayIterator&) = delete;
97 };
98 
99 VTK_ABI_NAMESPACE_END
100 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Iterator for vtkBitArray.
Abstract superclass for all arrays.
int vtkIdType
Definition: vtkType.h:315
int ValueType
Data type of a value.
virtual int GetDataType() const =0
Get the data type from the underlying array.
virtual void Initialize(vtkAbstractArray *array)=0
Set the array this iterator will iterate over.
a simple class to control print indentation
Definition: vtkIndent.h:28
Abstract superclass to iterate over elements in an vtkAbstractArray.
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:28
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...