VTK
vtkGraphLayoutStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphLayoutStrategy.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 -------------------------------------------------------------------------*/
37 #ifndef vtkGraphLayoutStrategy_h
38 #define vtkGraphLayoutStrategy_h
39 
40 #include "vtkInfovisLayoutModule.h" // For export macro
41 #include "vtkObject.h"
42 
43 class vtkGraph;
44 
45 class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
54  virtual void SetGraph(vtkGraph *graph);
55 
61  virtual void Initialize() {}
62 
70  virtual void Layout()=0;
71 
77  virtual int IsLayoutComplete() {return 1;}
78 
80 
83  virtual void SetWeightEdges(bool state);
84  vtkGetMacro(WeightEdges, bool);
86 
88 
91  virtual void SetEdgeWeightField(const char* field);
92  vtkGetStringMacro(EdgeWeightField);
94 
95 protected:
98 
102 private:
103 
104  vtkGraphLayoutStrategy(const vtkGraphLayoutStrategy&) VTK_DELETE_FUNCTION;
105  void operator=(const vtkGraphLayoutStrategy&) VTK_DELETE_FUNCTION;
106 };
107 
108 #endif
109 
vtkGraphLayoutStrategy
abstract superclass for all graph layout strategies
Definition: vtkGraphLayoutStrategy.h:46
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkGraphLayoutStrategy::EdgeWeightField
char * EdgeWeightField
Definition: vtkGraphLayoutStrategy.h:100
vtkGraphLayoutStrategy::IsLayoutComplete
virtual int IsLayoutComplete()
If your concrete class is iterative than you should overload IsLayoutComplete() otherwise it simply r...
Definition: vtkGraphLayoutStrategy.h:77
vtkGraphLayoutStrategy::Layout
virtual void Layout()=0
This is the layout method where the graph that was set in SetGraph() is laid out.
vtkGraphLayoutStrategy::Graph
vtkGraph * Graph
Definition: vtkGraphLayoutStrategy.h:99
vtkGraphLayoutStrategy::vtkGraphLayoutStrategy
vtkGraphLayoutStrategy()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkX3D::field
@ field
Definition: vtkX3D.h:177
vtkGraphLayoutStrategy::Initialize
virtual void Initialize()
This method allows the layout strategy to do initialization of data structures or whatever else it mi...
Definition: vtkGraphLayoutStrategy.h:61
vtkGraphLayoutStrategy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkGraphLayoutStrategy::WeightEdges
bool WeightEdges
Definition: vtkGraphLayoutStrategy.h:101
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkObject.h
vtkGraphLayoutStrategy::SetGraph
virtual void SetGraph(vtkGraph *graph)
Setting the graph for the layout strategy.
vtkGraphLayoutStrategy::SetWeightEdges
virtual void SetWeightEdges(bool state)
Whether to use edge weights in the layout or not.
vtkGraphLayoutStrategy::SetEdgeWeightField
virtual void SetEdgeWeightField(const char *field)
Set/Get the field to use for the edge weights.
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:288
vtkGraphLayoutStrategy::~vtkGraphLayoutStrategy
~vtkGraphLayoutStrategy()