VTK  9.1.0
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=========================================================================*/
23#ifndef vtkCompositeDataIterator_h
24#define vtkCompositeDataIterator_h
25
26#include "vtkCommonDataModelModule.h" // For export macro
27#include "vtkObject.h"
28
30class vtkCompositeDataSetInternals;
31class vtkCompositeDataSetIndex;
32class vtkDataObject;
33class vtkInformation;
34
35class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataIterator : public vtkObject
36{
37public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
47 vtkGetObjectMacro(DataSet, vtkCompositeDataSet);
49
53 virtual void InitTraversal();
54
58 virtual void InitReverseTraversal();
59
63 virtual void GoToFirstItem() = 0;
64
68 virtual void GoToNextItem() = 0;
69
76 virtual int IsDoneWithTraversal() = 0;
77
82
89
94 virtual int HasCurrentMetaData() = 0;
95
97
101 vtkSetMacro(SkipEmptyNodes, vtkTypeBool);
102 vtkGetMacro(SkipEmptyNodes, vtkTypeBool);
103 vtkBooleanMacro(SkipEmptyNodes, vtkTypeBool);
105
109 virtual unsigned int GetCurrentFlatIndex() = 0;
110
112
115 vtkGetMacro(Reverse, int);
117
118protected:
121
122 // Use macro to ensure MTime is updated:
123 vtkSetMacro(Reverse, int);
124
128
129private:
131 void operator=(const vtkCompositeDataIterator&) = delete;
132};
133
134#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:113
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:73
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:39
int vtkTypeBool
Definition: vtkABI.h:69