Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

LayoutPlanRepModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/planarity/PlanRep.h>
36 #include <ogdf/basic/Layout.h>
37 
38 
39 namespace ogdf {
40 
41 
43 
47 public:
50 
52  virtual ~LayoutPlanRepModule() { }
53 
55 
63  virtual void call(PlanRep &PG,
64  adjEntry adjExternal,
65  Layout &drawing) = 0;
66 
68  void operator()(PlanRep &PG, adjEntry adjExternal, Layout &drawing) {
69  call(PG,adjExternal,drawing);
70  }
71 
73  const DPoint &getBoundingBox() const {
74  return m_boundingBox;
75  }
76 
78  virtual double separation() const = 0;
79 
81  virtual void separation(double sep) = 0;
82 
83 protected:
85 
89 
91 
95  void setBoundingBox(PlanRep &PG, Layout &drawing) {
96  m_boundingBox = drawing.computeBoundingBox(PG);
97  }
98 
100 };
101 
102 
103 } // end namespace ogdf
void operator()(PlanRep &PG, adjEntry adjExternal, Layout &drawing)
Computes a planar layout of PG in drawing.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
virtual ~LayoutPlanRepModule()
Destructor.
Declaration of a base class for planar representations of graphs and cluster graphs.
void setBoundingBox(PlanRep &PG, Layout &drawing)
Computes and sets the bounding box variable m_boundingBox.
LayoutPlanRepModule()
Initializes a planar layout module.
Interface for planar layout algorithms (used in the planarization approach).
Real points.
Definition: geometry.h:219
Declaration of class Layout.
DPoint m_boundingBox
Stores the bounding box of the computed layout.
DPoint computeBoundingBox(PlanRep &PG) const
Computes the bounding box of the layout, which is a drawing of PG.
The namespace for all OGDF objects.
const DPoint & getBoundingBox() const
Returns the bounding box of the computed layout.
Class for adjacency list elements.
Definition: Graph_d.h:78
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:60
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46