Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
SyncPlanDrawer.h
Go to the documentation of this file.
1
31#pragma once
32
33#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/List.h>
38#include <ogdf/basic/basic.h>
41
42#include <functional>
43#include <memory>
44#include <utility>
45
46namespace ogdf {
47class PlanarGridLayoutModule;
48} // namespace ogdf
49
50namespace ogdf::sync_plan {
51class SyncPlan;
52
55
58 const ClusterGraph& CG, const EdgeArray<List<std::pair<adjEntry, cluster>>>& subdivisions,
60 const std::function<edge(edge)>& translate = [](edge e) -> edge { return e; });
61
63OGDF_EXPORT std::unique_ptr<std::pair<GraphCopy, GraphAttributes>> drawClusterGraph(ClusterGraph& CG,
64 GraphAttributes& GA, PlanarGridLayoutModule& layout, adjEntry adjExternal = nullptr);
65
68 std::unique_ptr<LayoutModule> planar_layout;
69 std::unique_ptr<LayoutModule> non_planar_layout;
71
78 std::unique_ptr<GraphAttributes> own_GA;
79
80public:
82
83 virtual ~SyncPlanDrawer() { cleanUp(); }
84
86
87 [[nodiscard]] const GraphAttributes& getBC_GA() const { return BC_GA; }
88
89 [[nodiscard]] const GraphIO::SVGSettings& getSvg() const { return svg; }
90
91 void layout(bool format = true, bool components = true);
92
93 void cleanUp();
94};
95}
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
Includes declaration of graph class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of graph copy classes.
Declares class GraphIO which provides access to all graph read and write functionality.
Declaration of interface for layout algorithms (class LayoutModule)
Declaration of doubly linked lists and iterators.
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Representation of clustered graphs.
Class for the representation of edges.
Definition Graph_d.h:364
Stores additional attributes of a graph (like layout information).
Condensed settings for drawing SVGs.
Definition GraphIO.h:128
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Class for the representation of nodes.
Definition Graph_d.h:241
Base class for planar grid layout algorithms.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
Utilities by dumping a drawing of the current state of a SyncPlan instance.
const GraphAttributes & getBC_GA() const
void layout(bool format=true, bool components=true)
std::unique_ptr< LayoutModule > non_planar_layout
std::unique_ptr< LayoutModule > planar_layout
GraphAttributes & ensureGraphAttributes()
std::unique_ptr< GraphAttributes > own_GA
const GraphIO::SVGSettings & getSvg() const
A class for modelling and solving Synchronized Planarity instances.
Definition SyncPlan.h:124
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
EdgeElement * edge
The type of edges.
Definition Graph_d.h:75
void formatNode(node n, GraphAttributes *ga, int group)
Simple util for apply a default style to nodes, including a group-based coloring.
std::unique_ptr< std::pair< GraphCopy, GraphAttributes > > drawClusterGraph(ClusterGraph &CG, GraphAttributes &GA, PlanarGridLayoutModule &layout, adjEntry adjExternal=nullptr)
Draw a graph using a given planar layout by turning its cluster borders into edges via planarizeClust...
void styleClusterBorder(const ClusterGraph &CG, const EdgeArray< List< std::pair< adjEntry, cluster > > > &subdivisions, GraphAttributes &GA, const std::function< edge(edge)> &translate=[](edge e) -> edge { return e;})
Properly style a cluster border inserted by planarizeClusterBorderCrossings()
The namespace for all OGDF objects.