VTK  9.3.20240419
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:
23  void PrintSelf(ostream& os, vtkIndent indent) override;
24 
32  void Initialize(vtkAbstractArray* array) override;
33 
38 
42  int* GetTuple(vtkIdType id);
43 
48 
53 
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:
88 
89  int* Tuple;
90  int TupleSize;
93 
94 private:
96  void operator=(const vtkBitArrayIterator&) = delete;
97 };
98 
99 VTK_ABI_NAMESPACE_END
100 #endif
Abstract superclass for all arrays.
Abstract superclass to iterate over elements in an vtkAbstractArray.
Iterator for vtkBitArray.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetValue(vtkIdType id, int value)
Sets the value at the index.
int GetDataType() const override
Get the data type from the underlying array.
int GetNumberOfComponents() const
Must be called only after Initialize.
vtkAbstractArray * GetArray()
Get the array.
int GetValue(vtkIdType id)
Must be called only after Initialize.
void Initialize(vtkAbstractArray *array) override
Set the array this iterator will iterate over.
void SetArray(vtkBitArray *b)
static vtkBitArrayIterator * New()
int * GetTuple(vtkIdType id)
Must be called only after Initialize.
~vtkBitArrayIterator() override
vtkIdType GetNumberOfValues() const
Must be called only after Initialize.
int GetDataTypeSize() const
Get the data type size from the underlying array.
vtkIdType GetNumberOfTuples() const
Must be called only after Initialize.
int ValueType
Data type of a value.
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:29
a simple class to control print indentation
Definition: vtkIndent.h:108
@ value
Definition: vtkX3D.h:220
int vtkIdType
Definition: vtkType.h:315