Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LayoutPlanRepModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/Layout.h>
37 #include <ogdf/basic/basic.h>
38 #include <ogdf/basic/geometry.h>
39 #include <ogdf/basic/memory.h>
40 
41 namespace ogdf {
42 class PlanRep;
43 
45 
49 public:
52 
54  virtual ~LayoutPlanRepModule() { }
55 
57 
65  virtual void call(PlanRep& PG, adjEntry adjExternal, 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 { return m_boundingBox; }
74 
76  virtual double separation() const = 0;
77 
79  virtual void separation(double sep) = 0;
80 
81 protected:
83 
87 
89 
93  void setBoundingBox(PlanRep& PG, Layout& drawing) {
94  m_boundingBox = drawing.computeBoundingBox(PG);
95  }
96 
98 };
99 
100 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< double >
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
Layout.h
Declaration of class Layout.
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::LayoutPlanRepModule::m_boundingBox
DPoint m_boundingBox
Stores the bounding box of the computed layout.
Definition: LayoutPlanRepModule.h:86
ogdf::LayoutPlanRepModule::LayoutPlanRepModule
LayoutPlanRepModule()
Initializes a planar layout module.
Definition: LayoutPlanRepModule.h:51
ogdf::LayoutPlanRepModule::operator()
void operator()(PlanRep &PG, adjEntry adjExternal, Layout &drawing)
Computes a planar layout of PG in drawing.
Definition: LayoutPlanRepModule.h:68
ogdf::LayoutPlanRepModule::~LayoutPlanRepModule
virtual ~LayoutPlanRepModule()
Destructor.
Definition: LayoutPlanRepModule.h:54
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:92
ogdf::LayoutPlanRepModule
Interface for planar layout algorithms (used in the planarization approach).
Definition: LayoutPlanRepModule.h:48
ogdf::LayoutPlanRepModule::getBoundingBox
const DPoint & getBoundingBox() const
Returns the bounding box of the computed layout.
Definition: LayoutPlanRepModule.h:73
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::LayoutPlanRepModule::setBoundingBox
void setBoundingBox(PlanRep &PG, Layout &drawing)
Computes and sets the bounding box variable m_boundingBox.
Definition: LayoutPlanRepModule.h:93
memory.h
Declaration of memory manager for allocating small pieces of memory.
ogdf::Layout::computeBoundingBox
DPoint computeBoundingBox(PlanRep &PG) const
Computes the bounding box of the layout, which is a drawing of PG.