VTK
vtkTreeBFSIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: $RCSfile: vtkTreeBFSIterator.h,v $
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 =========================================================================*/
15 
33 #ifndef __vtkTreeBFSIterator_h
34 #define __vtkTreeBFSIterator_h
35 
36 #include "vtkObject.h"
37 
38 class vtkTree;
39 class vtkTreeBFSIteratorInternals;
40 class vtkIntArray;
41 class vtkIdList;
42 
44 {
45 public:
46  static vtkTreeBFSIterator* New();
47  vtkTypeMacro(vtkTreeBFSIterator, vtkObject);
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
50  //BTX
51  enum ModeType
52  {
54  FINISH
55  };
56  //ETX
57 
59  void SetTree(vtkTree* graph);
60 
62 
67  void SetMode(int mode);
68  vtkGetMacro(Mode, int);
70 
72 
75  void SetStartVertex(vtkIdType vertex);
76  vtkGetMacro(StartVertex, vtkIdType);
78 
80  vtkIdType Next();
81 
83  bool HasNext();
84 
85 protected:
88 
89  void Initialize();
90  vtkIdType NextInternal();
91 
93  int Mode;
96  vtkTreeBFSIteratorInternals* Internals;
99 
100  //BTX
102  {
105  BLACK
106  };
107  //ETX
108 
109 private:
110  vtkTreeBFSIterator(const vtkTreeBFSIterator &); // Not implemented.
111  void operator=(const vtkTreeBFSIterator &); // Not implemented.
112 };
113 
114 #endif