Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
41 namespace ogdf {
42 class PlanRep;
43 class PlanRepUML;
44 
51 public:
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 
90 protected:
96 
102  void setBoundingBox(PlanRep& PG, Layout& drawing) {
103  m_boundingBox = drawing.computeBoundingBox(PG);
104  }
105 
107 };
108 
109 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::LayoutPlanRepUMLModule
Interface for planar UML layout algorithms.
Definition: LayoutPlanRepUMLModule.h:50
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::PlanRepUML
Planarized representation (of a connected component) of a UMLGraph; allows special handling of hierar...
Definition: PlanRepUML.h:55
ogdf::LayoutPlanRepUMLModule::getOptions
virtual int getOptions()
Returns the (generic) options.
Definition: LayoutPlanRepUMLModule.h:80
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::LayoutPlanRepUMLModule::~LayoutPlanRepUMLModule
virtual ~LayoutPlanRepUMLModule()
Definition: LayoutPlanRepUMLModule.h:55
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
ogdf::LayoutPlanRepUMLModule::LayoutPlanRepUMLModule
LayoutPlanRepUMLModule()
Initializes a UML planar layout module.
Definition: LayoutPlanRepUMLModule.h:53
ogdf::LayoutPlanRepUMLModule::operator()
void operator()(PlanRepUML &PG, adjEntry adjExternal, Layout &drawing)
Computes a planar layout of PG in drawing.
Definition: LayoutPlanRepUMLModule.h:67
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:92
ogdf::LayoutPlanRepUMLModule::setBoundingBox
void setBoundingBox(PlanRep &PG, Layout &drawing)
Computes and sets the bounding box variable m_boundingBox.
Definition: LayoutPlanRepUMLModule.h:102
ogdf::LayoutPlanRepUMLModule::setOptions
virtual void setOptions(int)
Sets the (generic) options; derived classes have to cope with the interpretation)
Definition: LayoutPlanRepUMLModule.h:75
basic.h
Basic declarations, included by all source files.
ogdf::LayoutPlanRepUMLModule::getBoundingBox
const DPoint & getBoundingBox() const
Returns the bounding box of the computed layout.
Definition: LayoutPlanRepUMLModule.h:72
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::LayoutPlanRepUMLModule::m_boundingBox
DPoint m_boundingBox
Stores the bounding box of the computed layout.
Definition: LayoutPlanRepUMLModule.h:95
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.