Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
EmbedderModule.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/Module.h>
37#include <ogdf/basic/basic.h>
39#include <ogdf/basic/memory.h>
40
41namespace ogdf {
42
53public:
56
57 virtual ~EmbedderModule() { }
58
66 void call(Graph& G, adjEntry& adjExternal) {
67 if (G.numberOfNodes() > 1 && G.numberOfEdges() > 1) {
69 doCall(G, adjExternal);
70 } else if (G.numberOfEdges() == 1) {
71 adjExternal = G.firstEdge()->adjSource();
72 }
73 };
74
76 void operator()(Graph& G, adjEntry& adjExternal) { call(G, adjExternal); }
77
79protected:
85 virtual void doCall(Graph& G, adjEntry& adjExternal) = 0;
86};
87
88}
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.
Class for adjacency list elements.
Definition Graph_d.h:143
Base class for embedder algorithms.
EmbedderModule()
Initializes an embedder module.
void call(Graph &G, adjEntry &adjExternal)
Calls the embedder algorithm for graph G.
void operator()(Graph &G, adjEntry &adjExternal)
Calls the embedder algorithm for graph G.
virtual void doCall(Graph &G, adjEntry &adjExternal)=0
Calls the embedder algorithm for graph G.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Base class for modules.
Definition Module.h:49
class for timeout funtionality.
Definition Timeouter.h:46
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
Declaration of extended graph algorithms.
bool isPlanar(const Graph &G)
Returns true, if G is planar, false otherwise.
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition memory.h:92
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition basic.h:52
Declaration of memory manager for allocating small pieces of memory.
The namespace for all OGDF objects.