VTK
dox/Common/DataModel/vtkEdgeListIterator.h
Go to the documentation of this file.
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 "vtkCommonDataModelModule.h" // For export macro
00047 #include "vtkObject.h"
00048 
00049 class vtkGraph;
00050 class vtkGraphEdge;
00051 //BTX
00052 struct vtkEdgeType;
00053 struct vtkOutEdgeType;
00054 //ETX
00055 class VTKCOMMONDATAMODEL_EXPORT vtkEdgeListIterator : public vtkObject
00056 {
00057 public:
00058   static vtkEdgeListIterator *New();
00059   vtkTypeMacro(vtkEdgeListIterator, vtkObject);
00060   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00062   vtkGetObjectMacro(Graph, vtkGraph);
00063   virtual void SetGraph(vtkGraph *graph);
00064 
00065   //BTX
00067 
00068   vtkEdgeType Next();
00069   //ETX
00071 
00076   vtkGraphEdge *NextGraphEdge();
00077 
00079   bool HasNext();
00080 
00081 protected:
00082   vtkEdgeListIterator();
00083   ~vtkEdgeListIterator();
00084 
00085   void Increment();
00086 
00087   vtkGraph *Graph;
00088   const vtkOutEdgeType *Current;
00089   const vtkOutEdgeType *End;
00090   vtkIdType             Vertex;
00091   bool                  Directed;
00092   vtkGraphEdge        *GraphEdge;
00093 
00094 private:
00095   vtkEdgeListIterator(const vtkEdgeListIterator&);  // Not implemented.
00096   void operator=(const vtkEdgeListIterator&);  // Not implemented.
00097 };
00098 
00099 #endif