Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

LayoutPlanRepUMLModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/uml/PlanRepUML.h>
36 #include <ogdf/basic/Layout.h>
37 
38 
39 
40 namespace ogdf {
41 
42 
49 public:
52 
54 
62  virtual void call(PlanRepUML &PG,
63  adjEntry adjExternal,
64  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 {
73  return m_boundingBox;
74  }
75 
77  virtual void setOptions(int /* optionField */) { } //don't make it abstract
78 
80  virtual int getOptions() { return 0; } //don't make it abstract
81 
83  virtual double separation() const = 0;
84 
86  virtual void separation(double sep) = 0;
87 
88 protected:
94 
100  void setBoundingBox(PlanRep &PG, Layout &drawing) {
101  m_boundingBox = drawing.computeBoundingBox(PG);
102  }
103 
105 };
106 
107 
108 } // end namespace ogdf
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void setBoundingBox(PlanRep &PG, Layout &drawing)
Computes and sets the bounding box variable m_boundingBox.
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
virtual int getOptions()
Returns the (generic) options.
LayoutPlanRepUMLModule()
Initializes a UML planar layout module.
Real points.
Definition: geometry.h:219
Declaration of class Layout.
Declaration of class PlanRepUML.
DPoint computeBoundingBox(PlanRep &PG) const
Computes the bounding box of the layout, which is a drawing of PG.
Interface for planar UML layout algorithms.
Planarized representation (of a connected component) of a UMLGraph; allows special handling of hierar...
Definition: PlanRepUML.h:49
const DPoint & getBoundingBox() const
Returns the bounding box of the computed layout.
void operator()(PlanRepUML &PG, adjEntry adjExternal, Layout &drawing)
Computes a planar layout of PG in drawing.
The namespace for all OGDF objects.
DPoint m_boundingBox
Stores the bounding box of the computed layout.
Class for adjacency list elements.
Definition: Graph_d.h:78
virtual void setOptions(int)
Sets the (generic) options; derived classes have to cope with the interpretation) ...
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