Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
UMLEdgeInsertionModule.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Array.h>
35#include <ogdf/basic/Graph.h>
36#include <ogdf/basic/Module.h>
38#include <ogdf/basic/basic.h>
39#include <ogdf/basic/memory.h>
40
41#include <cstdint>
42
43namespace ogdf {
44class PlanRepLight;
45
47
54public:
57
60
63
65 virtual UMLEdgeInsertionModule* clone() const = 0;
66
68
74 ReturnType call(PlanRepLight& pr, const Array<edge>& origEdges) {
75 return doCall(pr, origEdges, nullptr, nullptr);
76 }
77
79
86 ReturnType call(PlanRepLight& pr, const Array<edge>& origEdges, const EdgeArray<int>& costOrig) {
87 return doCall(pr, origEdges, &costOrig, nullptr);
88 }
89
92
102 const EdgeArray<int>* pCostOrig = nullptr,
103 const EdgeArray<uint32_t>* pEdgeSubGraphs = nullptr) {
104 return doCall(pr, origEdges, pCostOrig, pEdgeSubGraphs);
105 }
106
107
108protected:
110
119 virtual ReturnType doCall(PlanRepLight& pr, const Array<edge>& origEdges,
120 const EdgeArray<int>* pCostOrig, const EdgeArray<uint32_t>* pEdgeSubGraphs) = 0;
121
123};
124
125}
Declaration and implementation of Array class and Array algorithms.
Includes declaration of graph class.
Declares base class for all module types.
Declares base class for modules with timeout functionality.
Basic declarations, included by all source files.
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
Base class for modules.
Definition Module.h:49
ReturnType
The return type of a module.
Definition Module.h:52
Light-weight version of a planarized representation, associated with a PlanRep.
class for timeout funtionality.
Definition Timeouter.h:46
Interface for UML edge insertion algorithms.
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...
virtual ~UMLEdgeInsertionModule()
Destructor.
UMLEdgeInsertionModule()
Initializes a UML edge insertion module (default constructor).
virtual ReturnType doCall(PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig, const EdgeArray< uint32_t > *pEdgeSubGraphs)=0
Actual algorithm call that has to be implemented by derived classes.
virtual UMLEdgeInsertionModule * clone() const =0
Returns a new instance of the UML edge insertion module with the same option settings.
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,...
UMLEdgeInsertionModule(const UMLEdgeInsertionModule &eim)
Initializes a UML edge insertion module (copy constructor).
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
#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.