VTK  9.3.0
vtkCompositeDataIterator.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
14 #ifndef vtkCompositeDataIterator_h
15 #define vtkCompositeDataIterator_h
16 
17 #include "vtkCommonDataModelModule.h" // For export macro
18 #include "vtkObject.h"
19 
20 VTK_ABI_NAMESPACE_BEGIN
22 class vtkCompositeDataSetInternals;
23 class vtkCompositeDataSetIndex;
24 class vtkDataObject;
25 class vtkInformation;
26 
27 class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataIterator : public vtkObject
28 {
29 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
38  virtual void SetDataSet(vtkCompositeDataSet* ds);
39  vtkGetObjectMacro(DataSet, vtkCompositeDataSet);
41 
45  virtual void InitTraversal();
46 
50  virtual void InitReverseTraversal();
51 
55  virtual void GoToFirstItem() = 0;
56 
60  virtual void GoToNextItem() = 0;
61 
68  virtual int IsDoneWithTraversal() = 0;
69 
74 
81 
87 
89 
93  vtkSetMacro(SkipEmptyNodes, vtkTypeBool);
94  vtkGetMacro(SkipEmptyNodes, vtkTypeBool);
95  vtkBooleanMacro(SkipEmptyNodes, vtkTypeBool);
97 
101  virtual unsigned int GetCurrentFlatIndex() = 0;
102 
104 
107  vtkGetMacro(Reverse, int);
109 
110 protected:
113 
114  // Use macro to ensure MTime is updated:
115  vtkSetMacro(Reverse, int);
116 
118  int Reverse;
120 
121 private:
123  void operator=(const vtkCompositeDataIterator&) = delete;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
superclass for composite data iterators
~vtkCompositeDataIterator() override
virtual void SetDataSet(vtkCompositeDataSet *ds)
Set the composite dataset this iterator is iterating over.
virtual vtkInformation * GetCurrentMetaData()=0
Returns the meta-data associated with the current item.
virtual void InitReverseTraversal()
Begin iterating over the composite dataset structure in reverse order.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int IsDoneWithTraversal()=0
Test whether the iterator is finished with the traversal.
virtual vtkDataObject * GetCurrentDataObject()=0
Returns the current item.
virtual void GoToFirstItem()=0
Move the iterator to the beginning of the collection.
virtual vtkTypeBool HasCurrentMetaData()=0
Returns if the a meta-data information object is present for the current item.
virtual void InitTraversal()
Begin iterating over the composite dataset structure.
virtual void GoToNextItem()=0
Move the iterator to the next item in the collection.
virtual unsigned int GetCurrentFlatIndex()=0
Flat index is an index to identify the data in a composite data structure.
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
Definition: vtkDataObject.h:55
a simple class to control print indentation
Definition: vtkIndent.h:29
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:52
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28
int vtkTypeBool
Definition: vtkABI.h:64