VTK  9.2.6
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
33class vtkCompositeDataSetInternals;
34class vtkCompositeDataSetIndex;
35class vtkDataObject;
36class vtkInformation;
37
38class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataIterator : public vtkObject
39{
40public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
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
121protected:
124
125 // Use macro to ensure MTime is updated:
126 vtkSetMacro(Reverse, int);
127
131
132private:
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 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 void GoToFirstItem()=0
Move the iterator to the beginning of the collection.
virtual vtkInformation * GetCurrentMetaData()=0
Returns the meta-data associated with the current item.
virtual void InitTraversal()
Begin iterating over the composite dataset structure.
virtual vtkDataObject * GetCurrentDataObject()=0
Returns the current item.
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:40
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition vtkObject.h:63
int vtkTypeBool
Definition vtkABI.h:69