VTK  9.2.5
vtkCompositeDataIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompositeDataIterator.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 =========================================================================*/
26 #ifndef vtkCompositeDataIterator_h
27 #define vtkCompositeDataIterator_h
28 
29 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkObject.h"
31 
33 class vtkCompositeDataSetInternals;
34 class vtkCompositeDataSetIndex;
35 class vtkDataObject;
36 class vtkInformation;
37 
38 class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataIterator : public vtkObject
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
49  virtual void SetDataSet(vtkCompositeDataSet* ds);
50  vtkGetObjectMacro(DataSet, vtkCompositeDataSet);
52 
56  virtual void InitTraversal();
57 
61  virtual void InitReverseTraversal();
62 
66  virtual void GoToFirstItem() = 0;
67 
71  virtual void GoToNextItem() = 0;
72 
79  virtual int IsDoneWithTraversal() = 0;
80 
85 
92 
97  virtual int HasCurrentMetaData() = 0;
98 
100 
104  vtkSetMacro(SkipEmptyNodes, vtkTypeBool);
105  vtkGetMacro(SkipEmptyNodes, vtkTypeBool);
106  vtkBooleanMacro(SkipEmptyNodes, vtkTypeBool);
108 
112  virtual unsigned int GetCurrentFlatIndex() = 0;
113 
115 
118  vtkGetMacro(Reverse, int);
120 
121 protected:
124 
125  // Use macro to ensure MTime is updated:
126  vtkSetMacro(Reverse, int);
127 
129  int Reverse;
131 
132 private:
134  void operator=(const vtkCompositeDataIterator&) = delete;
135 };
136 
137 #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.
virtual int HasCurrentMetaData()=0
Returns if the a meta-data information object is present for the current item.
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 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
a simple class to control print indentation
Definition: vtkIndent.h:119
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:82
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:39
int vtkTypeBool
Definition: vtkABI.h:69