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
102class vtkGraph;
103
104class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
105{
106public:
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
154protected:
157
161
162private:
164 void operator=(const vtkGraphLayoutStrategy&) = delete;
165};
166
167#endif
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkGraphLayoutStrategy() override
virtual int IsLayoutComplete()
If your concrete class is iterative than you should overload IsLayoutComplete() otherwise it simply r...
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:339
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82