Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

EdgeInsertionModule.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Logger.h>
35 #include <ogdf/basic/Module.h>
36 #include <ogdf/basic/Timeouter.h>
38 
39 
40 namespace ogdf {
41 
43 
47 public:
50 
53 
55  virtual ~EdgeInsertionModule() { }
56 
58  virtual EdgeInsertionModule *clone() const = 0;
59 
61 
67  ReturnType call(PlanRepLight &pr, const Array<edge> &origEdges) {
68  return doCall(pr, origEdges, nullptr, nullptr, nullptr);
69  }
70 
72 
81  const EdgeArray<int> &costOrig,
82  const Array<edge> &origEdges)
83  {
84  return doCall(pr, origEdges, &costOrig, nullptr, nullptr);
85  }
86 
87 
89 
99  const EdgeArray<int> &costOrig,
100  const Array<edge> &origEdges,
101  const EdgeArray<uint32_t> &edgeSubGraphs)
102  {
103  return doCall(pr, origEdges, &costOrig, nullptr, &edgeSubGraphs);
104  }
105 
106 
108 
118  const EdgeArray<bool> &forbiddenOrig,
119  const Array<edge> &origEdges)
120  {
121  return doCall(pr, origEdges, nullptr, &forbiddenOrig, nullptr);
122  }
123 
125 
137  const EdgeArray<int> &costOrig,
138  const EdgeArray<bool> &forbiddenOrig,
139  const Array<edge> &origEdges)
140  {
141  return doCall(pr, origEdges, &costOrig, &forbiddenOrig, nullptr);
142  }
143 
144 
146 
159  const EdgeArray<int> &costOrig,
160  const EdgeArray<bool> &forbiddenOrig,
161  const Array<edge> &origEdges,
162  const EdgeArray<uint32_t> &edgeSubGraphs)
163  {
164  return doCall(pr, origEdges, &costOrig, &forbiddenOrig, &edgeSubGraphs);
165  }
166 
167 
169 
182  PlanRepLight &pr,
183  const Array<edge> &origEdges,
184  const EdgeArray<int> *pCostOrig = nullptr,
185  const EdgeArray<bool> *pForbiddenOrig = nullptr,
186  const EdgeArray<uint32_t> *pEdgeSubGraphs = nullptr)
187  {
188  return doCall(pr, origEdges, pCostOrig, pForbiddenOrig, pEdgeSubGraphs);
189  }
190 
191 
192 protected:
194 
204  virtual ReturnType doCall(
205  PlanRepLight &pr,
206  const Array<edge> &origEdges,
207  const EdgeArray<int> *pCostOrig,
208  const EdgeArray<bool> *pForbiddenOrig,
209  const EdgeArray<uint32_t> *pEdgeSubGraphs) = 0;
210 
211 
213 };
214 
215 } // end namespace ogdf
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:56
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges, const EdgeArray< uint32_t > &edgeSubGraphs)
Inserts all edges in origEdges with given costs, forbidden edges, and subgraphs (for simultaneous dra...
#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.
Interface for edge insertion algorithms.
Base class for modules.
Definition: Module.h:47
ReturnType call(PlanRepLight &pr, const Array< edge > &origEdges)
Inserts all edges in origEdges into pr.
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
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const Array< edge > &origEdges, const EdgeArray< uint32_t > &edgeSubGraphs)
Inserts all edges in origEdges with given costs and subgraphs (for simultaneous drawing) into pr...
ReturnType call(PlanRepLight &pr, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges)
Inserts all edges in origEdges with given forbidden edges into pr.
class for timeout funtionality.
Definition: Timeouter.h:47
Contains logging functionality.
virtual ~EdgeInsertionModule()
Destructor.
ReturnType callEx(PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr)
Inserts all edges in origEdges into pr, optionally costs, forbidden edges, and subgraphs (for simulta...
EdgeInsertionModule(const EdgeInsertionModule &eim)
Initializes an edge insertion module (copy constructor).
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges)
Inserts all edges in origEdges with given costs and forbidden edges into pr.
Declaration of class PlanRepLight.
Declares base class for modules with timeout functionality.
The namespace for all OGDF objects.
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const Array< edge > &origEdges)
Inserts all edges in origEdges with given costs into pr.
EdgeInsertionModule()
Initializes an edge insertion module (default constructor).