VTK
dox/Infovis/Layout/vtkGraphLayoutStrategy.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGraphLayoutStrategy.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 -------------------------------------------------------------------------*/
00036 #ifndef __vtkGraphLayoutStrategy_h
00037 #define __vtkGraphLayoutStrategy_h
00038 
00039 #include "vtkInfovisLayoutModule.h" // For export macro
00040 #include "vtkObject.h"
00041 
00042 class vtkGraph;
00043 
00044 class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
00045 {
00046 public:
00047   vtkTypeMacro(vtkGraphLayoutStrategy,vtkObject);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051   virtual void SetGraph(vtkGraph *graph);
00052 
00055   virtual void Initialize() {};
00056 
00061   virtual void Layout()=0;
00062 
00065   virtual int IsLayoutComplete() {return 1;}
00066 
00068 
00069   virtual void SetWeightEdges(bool state);
00070   vtkGetMacro(WeightEdges, bool);
00072 
00074 
00075   virtual void SetEdgeWeightField(const char* field);
00076   vtkGetStringMacro(EdgeWeightField);
00078 
00079 protected:
00080   vtkGraphLayoutStrategy();
00081   ~vtkGraphLayoutStrategy();
00082 
00083   vtkGraph *Graph;
00084   char     *EdgeWeightField;
00085   bool     WeightEdges;
00086 private:
00087 
00088   vtkGraphLayoutStrategy(const vtkGraphLayoutStrategy&);  // Not implemented.
00089   void operator=(const vtkGraphLayoutStrategy&);  // Not implemented.
00090 };
00091 
00092 #endif
00093