00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkEdgeListIterator.h 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 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00043 #ifndef __vtkEdgeListIterator_h 00044 #define __vtkEdgeListIterator_h 00045 00046 #include "vtkObject.h" 00047 00048 class vtkGraph; 00049 class vtkGraphEdge; 00050 //BTX 00051 struct vtkEdgeType; 00052 struct vtkOutEdgeType; 00053 //ETX 00054 class VTK_FILTERING_EXPORT vtkEdgeListIterator : public vtkObject 00055 { 00056 public: 00057 static vtkEdgeListIterator *New(); 00058 vtkTypeMacro(vtkEdgeListIterator, vtkObject); 00059 void PrintSelf(ostream& os, vtkIndent indent); 00060 00061 vtkGetObjectMacro(Graph, vtkGraph); 00062 virtual void SetGraph(vtkGraph *graph); 00063 00064 //BTX 00066 00067 vtkEdgeType Next(); 00068 //ETX 00070 00075 vtkGraphEdge *NextGraphEdge(); 00076 00078 bool HasNext(); 00079 00080 protected: 00081 vtkEdgeListIterator(); 00082 ~vtkEdgeListIterator(); 00083 00084 void Increment(); 00085 00086 vtkGraph *Graph; 00087 const vtkOutEdgeType *Current; 00088 const vtkOutEdgeType *End; 00089 vtkIdType Vertex; 00090 bool Directed; 00091 vtkGraphEdge *GraphEdge; 00092 00093 private: 00094 vtkEdgeListIterator(const vtkEdgeListIterator&); // Not implemented. 00095 void operator=(const vtkEdgeListIterator&); // Not implemented. 00096 }; 00097 00098 #endif