VTK
dox/Common/DataModel/vtkTreeIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTreeIterator.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 =========================================================================*/
00015 
00030 #ifndef __vtkTreeIterator_h
00031 #define __vtkTreeIterator_h
00032 
00033 #include "vtkCommonDataModelModule.h" // For export macro
00034 #include "vtkObject.h"
00035 
00036 class vtkTree;
00037 
00038 class VTKCOMMONDATAMODEL_EXPORT vtkTreeIterator : public vtkObject
00039 {
00040 public:
00041   vtkTypeMacro(vtkTreeIterator, vtkObject);
00042   virtual void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00046   void SetTree(vtkTree* graph);
00047   vtkGetMacro(Tree, vtkTree*);
00049 
00051 
00054   void SetStartVertex(vtkIdType vertex);
00055   vtkGetMacro(StartVertex, vtkIdType);
00057 
00059   vtkIdType Next();
00060 
00062   bool HasNext();
00063 
00065   void Restart();
00066 
00067 protected:
00068   vtkTreeIterator();
00069   ~vtkTreeIterator();
00070 
00071   virtual void Initialize() = 0;
00072   virtual vtkIdType NextInternal() = 0;
00073 
00074   vtkTree* Tree;
00075   vtkIdType StartVertex;
00076   vtkIdType NextId;
00077 
00078 private:
00079   vtkTreeIterator(const vtkTreeIterator &);  // Not implemented.
00080   void operator=(const vtkTreeIterator &);        // Not implemented.
00081 };
00082 
00083 #endif