VTK  9.3.1
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 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkGraph;
29 
30 class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
31 {
32 public:
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 
80 protected:
82  ~vtkGraphLayoutStrategy() override;
83 
87 
88 private:
90  void operator=(const vtkGraphLayoutStrategy&) = delete;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract superclass for all graph layout strategies
Base class for graph data types.
Definition: vtkGraph.h:280
a simple class to control print indentation
Definition: vtkIndent.h:28
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...