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 
43 class vtkGraph;
44 
45 class VTKINFOVISLAYOUT_EXPORT vtkGraphLayoutStrategy : public vtkObject
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
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 
95 protected:
97  ~vtkGraphLayoutStrategy() override;
98 
102 
103 private:
105  void operator=(const vtkGraphLayoutStrategy&) = delete;
106 };
107 
108 #endif
vtkGraphLayoutStrategy
abstract superclass for all graph layout strategies
Definition: vtkGraphLayoutStrategy.h:45
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:53
vtkGraphLayoutStrategy::EdgeWeightField
char * EdgeWeightField
Definition: vtkGraphLayoutStrategy.h:100
vtkGraphLayoutStrategy::IsLayoutComplete
virtual int IsLayoutComplete()
If your concrete class is iterative than you should overload IsLayoutComplete() otherwise it simply r...
Definition: vtkGraphLayoutStrategy.h:77
vtkGraphLayoutStrategy::Graph
vtkGraph * Graph
Definition: vtkGraphLayoutStrategy.h:99
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkX3D::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:61
vtkObject::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:101
vtkObject.h
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:289