VTK  9.3.0
vtkGraphLayoutStrategy.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
21#ifndef vtkGraphLayoutStrategy_h
22#define vtkGraphLayoutStrategy_h
23
24#include "vtkInfovisLayoutModule.h" // For export macro
25#include "vtkObject.h"
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkGraph;
29
30class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
39 virtual void SetGraph(vtkGraph* graph);
40
46 virtual void Initialize() {}
47
55 virtual void Layout() = 0;
56
62 virtual int IsLayoutComplete() { return 1; }
63
65
68 virtual void SetWeightEdges(bool state);
69 vtkGetMacro(WeightEdges, bool);
71
73
76 virtual void SetEdgeWeightField(const char* field);
77 vtkGetStringMacro(EdgeWeightField);
79
80protected:
83
87
88private:
90 void operator=(const vtkGraphLayoutStrategy&) = delete;
91};
92
93VTK_ABI_NAMESPACE_END
94#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:281
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49