Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

UMLEdgeInsertionModule.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 #include <ogdf/basic/Logger.h>
37 #include <ogdf/basic/Module.h>
38 #include <ogdf/basic/Timeouter.h>
39 
40 
41 namespace ogdf {
42 
44 
51 public:
52 
55 
58 
61 
63  virtual UMLEdgeInsertionModule *clone() const = 0;
64 
65 
67 
73  ReturnType call(PlanRepLight &pr, const Array<edge> &origEdges)
74  {
75  return doCall(pr, origEdges, nullptr, nullptr);
76  }
77 
79 
87  const Array<edge> &origEdges,
88  const EdgeArray<int> &costOrig)
89  {
90  return doCall(pr, origEdges, &costOrig, nullptr);
91  }
92 
93 
95 
105  PlanRepLight &pr,
106  const Array<edge> &origEdges,
107  const EdgeArray<int> *pCostOrig = nullptr,
108  const EdgeArray<uint32_t> *pEdgeSubGraphs = nullptr)
109  {
110  return doCall(pr, origEdges, pCostOrig, pEdgeSubGraphs);
111  }
112 
113 
114 protected:
116 
125  virtual ReturnType doCall(
126  PlanRepLight &pr,
127  const Array<edge> &origEdges,
128  const EdgeArray<int> *pCostOrig,
129  const EdgeArray<uint32_t> *pEdgeSubGraphs) = 0;
130 
132 };
133 
134 }
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:200
virtual ~UMLEdgeInsertionModule()
Destructor.
ReturnType callEx(PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr)
Inserts all edges in origEdges into pr while avoiding crossings between generalizations, optionally costs and subgraphs may be given.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
Declares base class for all module types.
Base class for modules.
Definition: Module.h:47
ReturnType
The return type of a module.
Definition: Module.h:51
Light-weight version of a planarized representation, associated with a PlanRep.
Definition: PlanRepLight.h:44
UMLEdgeInsertionModule(const UMLEdgeInsertionModule &eim)
Initializes a UML edge insertion module (copy constructor).
class for timeout funtionality.
Definition: Timeouter.h:47
Contains logging functionality.
ReturnType call(PlanRepLight &pr, const Array< edge > &origEdges)
Inserts all edges in origEdges into pr while avoiding crossings between generalizations.
ReturnType call(PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > &costOrig)
Inserts all edges in origEdges with given costs into pr while avoiding crossings between generalizati...
Declaration of class PlanRepLight.
Declares base class for modules with timeout functionality.
UMLEdgeInsertionModule()
Initializes a UML edge insertion module (default constructor).
Interface for UML edge insertion algorithms.
The namespace for all OGDF objects.