Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
LayoutPlanRepUMLModule.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
41namespace ogdf {
42class PlanRep;
43class PlanRepUML;
44
51public:
54
56
64 virtual void call(PlanRepUML& PG, adjEntry adjExternal, Layout& drawing) = 0;
65
67 void operator()(PlanRepUML& PG, adjEntry adjExternal, Layout& drawing) {
68 call(PG, adjExternal, drawing);
69 }
70
72 const DPoint& getBoundingBox() const { return m_boundingBox; }
73
75 virtual void setOptions(int /* optionField */) { }
76
77 // don't make it abstract!
78
80 virtual int getOptions() { return 0; }
81
82 // don't make it abstract!
83
85 virtual double separation() const = 0;
86
88 virtual void separation(double sep) = 0;
89
90protected:
96
102 void setBoundingBox(PlanRep& PG, Layout& drawing) {
103 m_boundingBox = drawing.computeBoundingBox(PG);
104 }
105
107};
108
109}
Includes declaration of graph class.
Declaration of class Layout.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:49
DPoint computeBoundingBox(PlanRep &PG) const
Computes the bounding box of the layout, which is a drawing of PG.
Interface for planar UML layout algorithms.
virtual double separation() const =0
Returns the minimal allowed distance between edges and vertices.
DPoint m_boundingBox
Stores the bounding box of the computed layout.
virtual void separation(double sep)=0
Sets the minimal allowed distance between edges and vertices to sep.
virtual void setOptions(int)
Sets the (generic) options; derived classes have to cope with the interpretation)
void operator()(PlanRepUML &PG, adjEntry adjExternal, Layout &drawing)
Computes a planar layout of PG in drawing.
LayoutPlanRepUMLModule()
Initializes a UML planar layout module.
const DPoint & getBoundingBox() const
Returns the bounding box of the computed layout.
void setBoundingBox(PlanRep &PG, Layout &drawing)
Computes and sets the bounding box variable m_boundingBox.
virtual int getOptions()
Returns the (generic) options.
virtual void call(PlanRepUML &PG, adjEntry adjExternal, Layout &drawing)=0
Computes a planar layout of PG in drawing.
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:68
Planarized representation (of a connected component) of a UMLGraph; allows special handling of hierar...
Definition PlanRepUML.h:55
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition memory.h:92
Declaration of memory manager for allocating small pieces of memory.
The namespace for all OGDF objects.