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/Layout.h>
36 #include <ogdf/uml/PlanRepUML.h>
37 
38 namespace ogdf {
39 
40 
47 public:
50 
52 
60  virtual void call(PlanRepUML& PG, adjEntry adjExternal, Layout& drawing) = 0;
61 
63  void operator()(PlanRepUML& PG, adjEntry adjExternal, Layout& drawing) {
64  call(PG, adjExternal, drawing);
65  }
66 
68  const DPoint& getBoundingBox() const { return m_boundingBox; }
69 
71  virtual void setOptions(int /* optionField */) { }
72 
73  // don't make it abstract!
74 
76  virtual int getOptions() { return 0; }
77 
78  // don't make it abstract!
79 
81  virtual double separation() const = 0;
82 
84  virtual void separation(double sep) = 0;
85 
86 protected:
92 
98  void setBoundingBox(PlanRep& PG, Layout& drawing) {
99  m_boundingBox = drawing.computeBoundingBox(PG);
100  }
101 
103 };
104 
105 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::LayoutPlanRepUMLModule
Interface for planar UML layout algorithms.
Definition: LayoutPlanRepUMLModule.h:46
ogdf::GenericPoint< double >
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:57
Layout.h
Declaration of class Layout.
ogdf::PlanRepUML
Planarized representation (of a connected component) of a UMLGraph; allows special handling of hierar...
Definition: PlanRepUML.h:48
PlanRepUML.h
Declaration of class PlanRepUML.
ogdf::LayoutPlanRepUMLModule::getOptions
virtual int getOptions()
Returns the (generic) options.
Definition: LayoutPlanRepUMLModule.h:76
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::LayoutPlanRepUMLModule::~LayoutPlanRepUMLModule
virtual ~LayoutPlanRepUMLModule()
Definition: LayoutPlanRepUMLModule.h:51
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46
ogdf::LayoutPlanRepUMLModule::LayoutPlanRepUMLModule
LayoutPlanRepUMLModule()
Initializes a UML planar layout module.
Definition: LayoutPlanRepUMLModule.h:49
ogdf::LayoutPlanRepUMLModule::operator()
void operator()(PlanRepUML &PG, adjEntry adjExternal, Layout &drawing)
Computes a planar layout of PG in drawing.
Definition: LayoutPlanRepUMLModule.h:63
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
ogdf::LayoutPlanRepUMLModule::setBoundingBox
void setBoundingBox(PlanRep &PG, Layout &drawing)
Computes and sets the bounding box variable m_boundingBox.
Definition: LayoutPlanRepUMLModule.h:98
ogdf::LayoutPlanRepUMLModule::setOptions
virtual void setOptions(int)
Sets the (generic) options; derived classes have to cope with the interpretation)
Definition: LayoutPlanRepUMLModule.h:71
ogdf::LayoutPlanRepUMLModule::getBoundingBox
const DPoint & getBoundingBox() const
Returns the bounding box of the computed layout.
Definition: LayoutPlanRepUMLModule.h:68
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:91
ogdf::Layout::computeBoundingBox
DPoint computeBoundingBox(PlanRep &PG) const
Computes the bounding box of the layout, which is a drawing of PG.