VTK
|
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 "vtkObject.h" 00034 00035 class vtkTree; 00036 00037 class VTK_FILTERING_EXPORT vtkTreeIterator : public vtkObject 00038 { 00039 public: 00040 vtkTypeMacro(vtkTreeIterator, vtkObject); 00041 virtual void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00045 void SetTree(vtkTree* graph); 00046 vtkGetMacro(Tree, vtkTree*); 00048 00050 00053 void SetStartVertex(vtkIdType vertex); 00054 vtkGetMacro(StartVertex, vtkIdType); 00056 00058 vtkIdType Next(); 00059 00061 bool HasNext(); 00062 00064 void Restart(); 00065 00066 protected: 00067 vtkTreeIterator(); 00068 ~vtkTreeIterator(); 00069 00070 virtual void Initialize() = 0; 00071 virtual vtkIdType NextInternal() = 0; 00072 00073 vtkTree* Tree; 00074 vtkIdType StartVertex; 00075 vtkIdType NextId; 00076 00077 private: 00078 vtkTreeIterator(const vtkTreeIterator &); // Not implemented. 00079 void operator=(const vtkTreeIterator &); // Not implemented. 00080 }; 00081 00082 #endif