VTK
dox/Infovis/Core/vtkMutableGraphHelper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkMutableGraphHelper.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 (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00033 #ifndef __vtkMutableGraphHelper_h
00034 #define __vtkMutableGraphHelper_h
00035 
00036 #include "vtkInfovisCoreModule.h" // For export macro
00037 #include "vtkObject.h"
00038 #include "vtkGraph.h" // For vtkEdgeType
00039 
00040 class vtkDataSetAttributes;
00041 class vtkGraph;
00042 class vtkGraphEdge;
00043 class vtkMutableDirectedGraph;
00044 class vtkMutableUndirectedGraph;
00045 
00046 class VTKINFOVISCORE_EXPORT vtkMutableGraphHelper : public vtkObject
00047 {
00048 public:
00049   static vtkMutableGraphHelper *New();
00050   vtkTypeMacro(vtkMutableGraphHelper, vtkObject);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00057   void SetGraph(vtkGraph* g);
00058   vtkGraph* GetGraph();
00060 
00061 //BTX
00063 
00064   vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
00065 //ETX
00066   vtkGraphEdge* AddGraphEdge(vtkIdType u, vtkIdType v);
00068 
00070   vtkIdType AddVertex();
00071 
00073   void RemoveVertex(vtkIdType v);
00074 
00076   void RemoveVertices(vtkIdTypeArray* verts);
00077 
00079   void RemoveEdge(vtkIdType e);
00080 
00082   void RemoveEdges(vtkIdTypeArray* edges);
00083 
00084 protected:
00085   vtkMutableGraphHelper();
00086   ~vtkMutableGraphHelper();
00087 
00088   vtkGetObjectMacro(InternalGraph, vtkGraph);
00089   void SetInternalGraph(vtkGraph* g);
00090   vtkGraph* InternalGraph;
00091 
00092   vtkGraphEdge* GraphEdge;
00093 
00094   vtkMutableDirectedGraph* DirectedGraph;
00095   vtkMutableUndirectedGraph* UndirectedGraph;
00096 
00097 private:
00098   vtkMutableGraphHelper(const vtkMutableGraphHelper&);  // Not implemented.
00099   void operator=(const vtkMutableGraphHelper&);  // Not implemented.
00100 };
00101 
00102 #endif