VTK
vtkTreeDFSIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTreeDFSIterator.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
36 #ifndef __vtkTreeDFSIterator_h
37 #define __vtkTreeDFSIterator_h
38 
39 #include "vtkObject.h"
40 
41 class vtkTree;
42 class vtkTreeDFSIteratorInternals;
43 class vtkIntArray;
44 class vtkIdList;
45 
47 {
48 public:
49  static vtkTreeDFSIterator* New();
50  vtkTypeMacro(vtkTreeDFSIterator, vtkObject);
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
53  //BTX
54  enum ModeType
55  {
57  FINISH
58  };
59  //ETX
60 
62  void SetTree(vtkTree* graph);
63 
65 
70  void SetMode(int mode);
71  vtkGetMacro(Mode, int);
73 
75 
78  void SetStartVertex(vtkIdType vertex);
79  vtkGetMacro(StartVertex, vtkIdType);
81 
83  vtkIdType Next();
84 
86  bool HasNext();
87 
88 protected:
91 
92  void Initialize();
93  vtkIdType NextInternal();
94 
96  int Mode;
99  vtkTreeDFSIteratorInternals* Internals;
102 
103  //BTX
105  {
108  BLACK
109  };
110  //ETX
111 
112 private:
113  vtkTreeDFSIterator(const vtkTreeDFSIterator &); // Not implemented.
114  void operator=(const vtkTreeDFSIterator &); // Not implemented.
115 };
116 
117 
118 #endif
119 
abstract base class for most VTK objects
Definition: vtkObject.h:60
#define VTK_FILTERING_EXPORT
vtkTreeDFSIteratorInternals * Internals
int vtkIdType
Definition: vtkType.h:255
depth first seedgeh iterator through a vtkGraph
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:42
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
static vtkObject * New()
A rooted tree data structure.
Definition: vtkTree.h:58