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
43class vtkGraph;
44
45class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
46{
47public:
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
95protected:
98
102private:
103
104 vtkGraphLayoutStrategy(const vtkGraphLayoutStrategy&) VTK_DELETE_FUNCTION;
105 void operator=(const vtkGraphLayoutStrategy&) VTK_DELETE_FUNCTION;
106};
107
108#endif
109
abstract superclass for all graph layout strategies
virtual void SetWeightEdges(bool state)
Whether to use edge weights in the layout or not.
virtual void SetEdgeWeightField(const char *field)
Set/Get the field to use for the edge weights.
virtual void Layout()=0
This is the layout method where the graph that was set in SetGraph() is laid out.
virtual int IsLayoutComplete()
If your concrete class is iterative than you should overload IsLayoutComplete() otherwise it simply r...
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void Initialize()
This method allows the layout strategy to do initialization of data structures or whatever else it mi...
virtual void SetGraph(vtkGraph *graph)
Setting the graph for the layout strategy.
Base class for graph data types.
Definition: vtkGraph.h:288
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
@ field
Definition: vtkX3D.h:177
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.