VTK
vtkDataObjectTreeIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataObjectTreeIterator.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 =========================================================================*/
25 #ifndef vtkDataObjectTreeIterator_h
26 #define vtkDataObjectTreeIterator_h
27 
28 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkSmartPointer.h" //to store data sets
31 
32 class vtkDataObjectTree;
35 class vtkDataObject;
36 class vtkInformation;
37 
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46  virtual void GoToFirstItem();
47 
49  virtual void GoToNextItem();
50 
54  virtual int IsDoneWithTraversal();
55 
59 
65 
68  virtual int HasCurrentMetaData();
69 
73  virtual unsigned int GetCurrentFlatIndex();
74 
76 
84  vtkSetMacro(VisitOnlyLeaves, int);
85  vtkGetMacro(VisitOnlyLeaves, int);
86  vtkBooleanMacro(VisitOnlyLeaves, int);
88 
90 
93  vtkSetMacro(TraverseSubTree, int);
94  vtkGetMacro(TraverseSubTree, int);
95  vtkBooleanMacro(TraverseSubTree, int);
97 
98 //BTX
99 protected:
101  virtual ~vtkDataObjectTreeIterator();
102 
103  // Takes the current location to the next dataset. This traverses the tree in
104  // preorder fashion.
105  // If the current location is a composite dataset, next is its 1st child dataset.
106  // If the current is not a composite dataset, then next is the next dataset.
107  // This method gives no guarantees whether the current dataset will be
108  // non-null or leaf.
109  void NextInternal();
110 
112  vtkDataObjectTreeIndex GetCurrentIndex();
113 
114  // Needs access to GetCurrentIndex().
115  friend class vtkDataObjectTree;
116  friend class vtkMultiDataSetInternal;
117 
118  unsigned int CurrentFlatIndex;
119 
120 private:
121  vtkDataObjectTreeIterator(const vtkDataObjectTreeIterator&); // Not implemented.
122  void operator=(const vtkDataObjectTreeIterator&); // Not implemented.
123 
124  class vtkInternals;
125  vtkInternals* Internals;
126  friend class vtkInternals;
127 
128  int TraverseSubTree;
129  int VisitOnlyLeaves;
130 
134 
135  // Cannot be called when this->IsDoneWithTraversal() return 1.
136  void UpdateLocation();
137 //ETX
138 };
139 
140 #endif
virtual int IsDoneWithTraversal()=0
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
virtual vtkInformation * GetCurrentMetaData()=0
virtual int HasCurrentMetaData()=0
virtual void GoToNextItem()=0
superclass for composite data iterators
virtual void GoToFirstItem()=0
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual vtkDataObject * GetCurrentDataObject()=0
superclass for composite data iterators
static vtkObject * New()
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned int GetCurrentFlatIndex()=0
#define VTKCOMMONDATAMODEL_EXPORT