10#ifndef vtkBitArrayIterator_h
11#define vtkBitArrayIterator_h
15#include "vtkCommonCoreModule.h"
19VTK_ABI_NAMESPACE_BEGIN
43 vtkErrorMacro(
"vtkBitArrayIterator can iterate only over vtkBitArray.");
67 this->
TupleSize =
static_cast<int>(numComps);
72 for (
int j = 0; j < numComps; j++)
74 this->
Tuple[j] = this->
Array->GetValue(loc + j);
86 return this->
Array->GetValue(
id);
88 vtkErrorMacro(
"Array Iterator not initialized.");
99 return this->
Array->GetNumberOfTuples();
111 return this->
Array->GetNumberOfTuples() * this->
Array->GetNumberOfComponents();
123 return this->
Array->GetNumberOfComponents();
135 return this->
Array->GetDataType();
147 return this->
Array->GetDataTypeSize();
160 this->
Array->SetValue(
id, value);
172 this->
Array =
nullptr;
173 this->
Tuple =
nullptr;
179 delete[] this->
Tuple;
Abstract superclass for all arrays.
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
a simple class to control print indentation
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
ArrayT * vtkArrayDownCast(vtkAbstractArray *array)
vtkArrayDownCast is to be used by generic (e.g.
#define VTK_DEPRECATED_IN_9_7_0(reason)
#define VTK_STANDARD_NEW_BODY(thisClass)