VTK  9.1.0
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 -------------------------------------------------------------------------*/
96 #ifndef vtkGraphLayoutStrategy_h
97 #define vtkGraphLayoutStrategy_h
98 
99 #include "vtkInfovisLayoutModule.h" // For export macro
100 #include "vtkObject.h"
101 
102 class vtkGraph;
103 
104 class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
105 {
106 public:
108  void PrintSelf(ostream& os, vtkIndent indent) override;
109 
113  virtual void SetGraph(vtkGraph* graph);
114 
120  virtual void Initialize() {}
121 
129  virtual void Layout() = 0;
130 
136  virtual int IsLayoutComplete() { return 1; }
137 
139 
142  virtual void SetWeightEdges(bool state);
143  vtkGetMacro(WeightEdges, bool);
145 
147 
150  virtual void SetEdgeWeightField(const char* field);
151  vtkGetStringMacro(EdgeWeightField);
153 
154 protected:
157 
161 
162 private:
164  void operator=(const vtkGraphLayoutStrategy&) = delete;
165 };
166 
167 #endif
vtkGraphLayoutStrategy
abstract superclass for all graph layout strategies
Definition: vtkGraphLayoutStrategy.h:105
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkGraphLayoutStrategy::EdgeWeightField
char * EdgeWeightField
Definition: vtkGraphLayoutStrategy.h:159
vtkGraphLayoutStrategy::IsLayoutComplete
virtual int IsLayoutComplete()
If your concrete class is iterative than you should overload IsLayoutComplete() otherwise it simply r...
Definition: vtkGraphLayoutStrategy.h:136
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:158
vtkGraphLayoutStrategy::vtkGraphLayoutStrategy
vtkGraphLayoutStrategy()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkX3D::field
@ field
Definition: vtkX3D.h:183
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:120
vtkGraphLayoutStrategy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphLayoutStrategy::WeightEdges
bool WeightEdges
Definition: vtkGraphLayoutStrategy.h:160
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:339
vtkGraphLayoutStrategy::~vtkGraphLayoutStrategy
~vtkGraphLayoutStrategy() override