VTK
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 =========================================================================*/
25 #ifndef __vtkCompositeDataIterator_h
26 #define __vtkCompositeDataIterator_h
27 
28 #include "vtkObject.h"
29 
33 class vtkDataObject;
34 class vtkInformation;
35 
37 {
38 public:
39  static vtkCompositeDataIterator* New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
46  virtual void SetDataSet(vtkCompositeDataSet* ds);
47  vtkGetObjectMacro(DataSet, vtkCompositeDataSet);
49 
51  virtual void InitTraversal();
52 
55  virtual void InitReverseTraversal();
56 
58  virtual void GoToFirstItem();
59 
61  virtual void GoToNextItem();
62 
66  virtual int IsDoneWithTraversal();
67 
70  virtual vtkDataObject* GetCurrentDataObject();
71 
76  virtual vtkInformation* GetCurrentMetaData();
77 
80  virtual int HasCurrentMetaData();
81 
83 
91  vtkSetMacro(VisitOnlyLeaves, int);
92  vtkGetMacro(VisitOnlyLeaves, int);
93  vtkBooleanMacro(VisitOnlyLeaves, int);
95 
97 
100  vtkSetMacro(TraverseSubTree, int);
101  vtkGetMacro(TraverseSubTree, int);
102  vtkBooleanMacro(TraverseSubTree, int);
104 
105 
107 
109  vtkSetMacro(SkipEmptyNodes, int);
110  vtkGetMacro(SkipEmptyNodes, int);
111  vtkBooleanMacro(SkipEmptyNodes, int);
113 
117  unsigned int GetCurrentFlatIndex();
118 
120 
121  vtkGetMacro(Reverse, int);
123 
124 //BTX
125 protected:
127  virtual ~vtkCompositeDataIterator();
128 
129  // Takes the current location to the next dataset. This traverses the tree in
130  // preorder fashion.
131  // If the current location is a composite dataset, next is its 1st child dataset.
132  // If the current is not a composite dataset, then next is the next dataset.
133  // This method gives no guarantees whether the current dataset will be
134  // non-null or leaf.
135  void NextInternal();
136 
138  vtkCompositeDataSetIndex GetCurrentIndex();
139 
140  // Needs access to GetCurrentIndex().
141  friend class vtkCompositeDataSet;
142 
143  unsigned int CurrentFlatIndex;
144 
147  int Reverse;
150 private:
151  vtkCompositeDataIterator(const vtkCompositeDataIterator&); // Not implemented.
152  void operator=(const vtkCompositeDataIterator&); // Not implemented.
153 
154  class vtkInternals;
155  vtkInternals* Internals;
156  friend class vtkInternals;
157 
161 
162  // Cannot be called when this->IsDoneWithTraversal() return 1.
163  void UpdateLocation();
164 //ETX
165 };
166 
167 #endif
168 
169 
abstract base class for most VTK objects
Definition: vtkObject.h:60
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
friend class vtkCompositeDataIterator
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
static vtkObject * New()
general representation of visualization data
Definition: vtkDataObject.h:70