VTK  9.3.1
vtkUniformGridAMRDataIterator.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
13 #ifndef vtkUniformGridAMRDataIterator_h
14 #define vtkUniformGridAMRDataIterator_h
15 
16 #include "vtkCommonDataModelModule.h" // For export macro
18 #include "vtkSmartPointer.h" //for member variable Information
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkInformation;
22 class vtkAMRInformation;
24 class vtkUniformGridAMR;
25 class AMRIndexIterator;
26 
27 class VTKCOMMONDATAMODEL_EXPORT vtkUniformGridAMRDataIterator : public vtkCompositeDataIterator
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
41 
42  vtkTypeBool HasCurrentMetaData() override { return 1; }
43 
48 
54  unsigned int GetCurrentFlatIndex() override;
55 
59  virtual unsigned int GetCurrentLevel();
60 
65  virtual unsigned int GetCurrentIndex();
66 
70  void GoToFirstItem() override;
71 
75  void GoToNextItem() override;
76 
83  int IsDoneWithTraversal() override;
84 
85 protected:
89 
90 private:
92  void operator=(const vtkUniformGridAMRDataIterator&) = delete;
93 
96  vtkAMRInformation* AMRInfo;
97  vtkAMRDataInternals* AMRData;
98 
99  void GetCurrentIndexPair(unsigned int& level, unsigned int& id);
100 };
101 
102 VTK_ABI_NAMESPACE_END
103 #endif
virtual int IsDoneWithTraversal()=0
Test whether the iterator is finished with the traversal.
subclass of vtkCompositeDataIterator with API to get current level and dataset index.
Store vtkAlgorithm input/output information.
virtual vtkInformation * GetCurrentMetaData()=0
Returns the meta-data associated with the current item.
vtkSmartPointer< AMRIndexIterator > Iter
virtual void GoToNextItem()=0
Move the iterator to the next item in the collection.
superclass for composite data iterators
int vtkTypeBool
Definition: vtkABI.h:64
virtual void GoToFirstItem()=0
Move the iterator to the beginning of the collection.
Meta data that describes the structure of an AMR data set.
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
container of vtkUniformGrid for an AMR data set
virtual vtkDataObject * GetCurrentDataObject()=0
Returns the current item.
vtkTypeBool HasCurrentMetaData() override
Returns if the a meta-data information object is present for the current item.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
general representation of visualization data
Definition: vtkDataObject.h:54
virtual unsigned int GetCurrentFlatIndex()=0
Flat index is an index to identify the data in a composite data structure.
a concrete implementation of vtkCompositeDataSet