VTK  9.3.20240423
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
16VTK_ABI_NAMESPACE_BEGIN
17class vtkBitArray;
18class VTKCOMMONCORE_EXPORT vtkBitArrayIterator : public vtkArrayIterator
19{
20public:
23 void PrintSelf(ostream& os, vtkIndent indent) override;
24
32 void Initialize(vtkAbstractArray* array) override;
33
38
43
48
53
58
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
85protected:
88
89 int* Tuple;
93
94private:
96 void operator=(const vtkBitArrayIterator&) = delete;
97};
98
99VTK_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.
vtkAbstractArray * GetArray()
Get the array.
static vtkBitArrayIterator * New()
int GetNumberOfComponents() const
Must be called only after Initialize.
int GetValue(vtkIdType id)
Must be called only after Initialize.
int * GetTuple(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)
~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
int vtkIdType
Definition vtkType.h:315