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 =========================================================================*/
28 #ifndef vtkDataObjectTreeIterator_h
29 #define vtkDataObjectTreeIterator_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
33 #include "vtkSmartPointer.h" //to store data sets
34 
35 class vtkDataObjectTree;
38 class vtkDataObject;
39 class vtkInformation;
40 
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49  virtual void GoToFirstItem();
50 
52  virtual void GoToNextItem();
53 
57  virtual int IsDoneWithTraversal();
58 
62 
68 
71  virtual int HasCurrentMetaData();
72 
76  virtual unsigned int GetCurrentFlatIndex();
77 
79 
87  vtkSetMacro(VisitOnlyLeaves, int);
88  vtkGetMacro(VisitOnlyLeaves, int);
89  vtkBooleanMacro(VisitOnlyLeaves, int);
91 
93 
96  vtkSetMacro(TraverseSubTree, int);
97  vtkGetMacro(TraverseSubTree, int);
98  vtkBooleanMacro(TraverseSubTree, int);
100 
101 //BTX
102 protected:
104  virtual ~vtkDataObjectTreeIterator();
105 
106  // Takes the current location to the next dataset. This traverses the tree in
107  // preorder fashion.
108  // If the current location is a composite dataset, next is its 1st child dataset.
109  // If the current is not a composite dataset, then next is the next dataset.
110  // This method gives no guarantees whether the current dataset will be
111  // non-null or leaf.
112  void NextInternal();
113 
115  vtkDataObjectTreeIndex GetCurrentIndex();
116 
117  // Needs access to GetCurrentIndex().
118  friend class vtkDataObjectTree;
119  friend class vtkMultiDataSetInternal;
120 
121  unsigned int CurrentFlatIndex;
122 
123 private:
124  vtkDataObjectTreeIterator(const vtkDataObjectTreeIterator&); // Not implemented.
125  void operator=(const vtkDataObjectTreeIterator&); // Not implemented.
126 
127  class vtkInternals;
128  vtkInternals* Internals;
129  friend class vtkInternals;
130 
131  int TraverseSubTree;
132  int VisitOnlyLeaves;
133 
137 
138  // Cannot be called when this->IsDoneWithTraversal() return 1.
139  void UpdateLocation();
140 //ETX
141 };
142 
143 #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