• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Filtering/vtkCompositeDataIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCompositeDataIterator.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00025 #ifndef __vtkCompositeDataIterator_h
00026 #define __vtkCompositeDataIterator_h
00027 
00028 #include "vtkObject.h"
00029 
00030 class vtkCompositeDataSet;
00031 class vtkCompositeDataSetInternals;
00032 class vtkCompositeDataSetIndex;
00033 class vtkDataObject;
00034 class vtkInformation;
00035 
00036 class VTK_FILTERING_EXPORT vtkCompositeDataIterator : public vtkObject
00037 {
00038 public:
00039   static vtkCompositeDataIterator* New();
00040   vtkTypeRevisionMacro(vtkCompositeDataIterator, vtkObject);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044 
00046   virtual void SetDataSet(vtkCompositeDataSet* ds);
00047   vtkGetObjectMacro(DataSet, vtkCompositeDataSet);
00049 
00051   virtual void InitTraversal();
00052 
00055   virtual void InitReverseTraversal();
00056 
00058   virtual void GoToFirstItem();
00059 
00061   virtual void GoToNextItem();
00062 
00066   virtual int IsDoneWithTraversal();
00067 
00070   virtual vtkDataObject* GetCurrentDataObject();
00071 
00076   virtual vtkInformation* GetCurrentMetaData();
00077 
00080   virtual int HasCurrentMetaData();
00081 
00083 
00091   vtkSetMacro(VisitOnlyLeaves, int);
00092   vtkGetMacro(VisitOnlyLeaves, int);
00093   vtkBooleanMacro(VisitOnlyLeaves, int);
00095 
00097 
00100   vtkSetMacro(TraverseSubTree, int);
00101   vtkGetMacro(TraverseSubTree, int);
00102   vtkBooleanMacro(TraverseSubTree, int);
00104 
00105 
00107 
00109   vtkSetMacro(SkipEmptyNodes, int);
00110   vtkGetMacro(SkipEmptyNodes, int);
00111   vtkBooleanMacro(SkipEmptyNodes, int);
00113 
00117   unsigned int GetCurrentFlatIndex();
00118 
00120 
00121   vtkGetMacro(Reverse, int);
00123 
00124 //BTX
00125 protected:
00126   vtkCompositeDataIterator();
00127   virtual ~vtkCompositeDataIterator();
00128 
00129   // Takes the current location to the next dataset. This traverses the tree in
00130   // preorder fashion.
00131   // If the current location is a composite dataset, next is its 1st child dataset.
00132   // If the current is not a composite dataset, then next is the next dataset.
00133   // This method gives no guarantees  whether the current dataset will be
00134   // non-null or leaf.
00135   void NextInternal();
00136 
00138   vtkCompositeDataSetIndex GetCurrentIndex();
00139 
00140   // Needs access to GetCurrentIndex().
00141   friend class vtkCompositeDataSet;
00142 
00143   unsigned int CurrentFlatIndex;
00144 
00145   int SkipEmptyNodes;
00146   int TraverseSubTree;
00147   int Reverse;
00148   int VisitOnlyLeaves;
00149   vtkCompositeDataSet* DataSet;
00150 private:
00151   vtkCompositeDataIterator(const vtkCompositeDataIterator&); // Not implemented.
00152   void operator=(const vtkCompositeDataIterator&); // Not implemented.
00153 
00154   class vtkInternals;
00155   vtkInternals* Internals;
00156   friend class vtkInternals;
00157 
00160   vtkCompositeDataSetInternals* GetInternals(vtkCompositeDataSet*);
00161 
00162   // Cannot be called when this->IsDoneWithTraversal() return 1.
00163   void UpdateLocation();
00164 //ETX
00165 };
00166 
00167 #endif
00168 
00169 

Generated by  doxygen 1.7.1