VTK  9.0.3
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 "vtkArrayIterator.h"
26 #include "vtkCommonCoreModule.h" // For export macro
27 
28 class vtkBitArray;
29 class VTKCOMMONCORE_EXPORT vtkBitArrayIterator : public vtkArrayIterator
30 {
31 public:
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
43  void Initialize(vtkAbstractArray* array) override;
44 
49 
53  int* GetTuple(vtkIdType id);
54 
59 
64 
69 
74 
78  int GetDataType() const override;
79 
83  int GetDataTypeSize() const;
84 
89  void SetValue(vtkIdType id, int value);
90 
94  typedef int ValueType;
95 
96 protected:
99 
100  int* Tuple;
104 
105 private:
106  vtkBitArrayIterator(const vtkBitArrayIterator&) = delete;
107  void operator=(const vtkBitArrayIterator&) = delete;
108 };
109 
110 #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.
vtkIdType GetNumberOfTuples()
Must be called only after Initialize.
vtkAbstractArray * GetArray()
Get the array.
int GetValue(vtkIdType id)
Must be called only after Initialize.
int GetNumberOfComponents()
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
int GetDataTypeSize() const
Get the data type size from the underlying array.
vtkIdType GetNumberOfValues()
Must be called only after Initialize.
int ValueType
Data type of a value.
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:34
a simple class to control print indentation
Definition: vtkIndent.h:34
@ value
Definition: vtkX3D.h:226
int vtkIdType
Definition: vtkType.h:338