Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / simultaneous / SimDrawCaller.h
blob206cb728eafe742be60f19dd4b3ecf915b3d802c
1 /*
2 * $Revision: 2528 $
4 * last checkin:
5 * $Author: gutwenger $
6 * $Date: 2012-07-03 23:05:08 +0200 (Tue, 03 Jul 2012) $
7 ***************************************************************/
9 /** \file
10 * \brief Offers variety of possible algorithm calls for simultaneous
11 * drawing.
13 * \author Michael Schulz
15 * \par License:
16 * This file is part of the Open Graph Drawing Framework (OGDF).
18 * \par
19 * Copyright (C)<br>
20 * See README.txt in the root directory of the OGDF installation for details.
22 * \par
23 * This program is free software; you can redistribute it and/or
24 * modify it under the terms of the GNU General Public License
25 * Version 2 or 3 as published by the Free Software Foundation;
26 * see the file LICENSE.txt included in the packaging of this file
27 * for details.
29 * \par
30 * This program is distributed in the hope that it will be useful,
31 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 * GNU General Public License for more details.
35 * \par
36 * You should have received a copy of the GNU General Public
37 * License along with this program; if not, write to the Free
38 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
39 * Boston, MA 02110-1301, USA.
41 * \see http://www.gnu.org/copyleft/gpl.html
42 ***************************************************************/
44 #ifndef OGDF_SIMDRAW_CALLER_H
45 #define OGDF_SIMDRAW_CALLER_H
47 #include <ogdf/simultaneous/SimDrawManipulatorModule.h>
49 namespace ogdf
52 //! Calls modified algorithms for simdraw instances
53 /**
54 * Runs special algorithms suitable for simultaneous drawing
55 * on current SimDraw instance. The algorithms take
56 * care of all necessary GraphAttributes activations and
57 * take over calculated coordinates and dummy nodes.
59 * A typical use of SimDrawCaller involves a predefined SimDraw
60 * instance on which SimDrawCaller works.
61 * \code
62 * SimDraw SD;
63 * ...
64 * SimDrawCaller SDC(SD);
65 * SDC.callSubgraphPlanarizer();
66 * \endcode
68 class OGDF_EXPORT SimDrawCaller : public SimDrawManipulatorModule
71 private:
72 EdgeArray<unsigned int> *m_esg; //!< saves edgeSubGraph data
74 //! updates m_esg
75 /**
76 * Should be called whenever graph changed and current
77 * basic graph membership is needed.
79 void updateESG();
81 public:
82 //! constructor
83 SimDrawCaller(SimDraw &SD);
85 //! runs SugiyamaLayout with modified SplitHeuristic
86 /**
87 * Runs special call of SugiyamaLayout using
88 * SugiyamaLayout::setSubgraphs().
89 * Saves node coordinates and dummy node bends in current
90 * simdraw instance.
92 * Uses TwoLayerCrossMinSimDraw object to perform crossing
93 * minimization. The default is SplitHeuristic.
95 * Automatically activates GraphAttributes::nodeGraphics.\n
96 * Automatically activates GraphAttributes::edgeGraphics.
98 void callSugiyamaLayout();
100 //! runs UMLPlanarizationLayout with modified inserter
102 * Runs UMLPlanarizationLayout with callSimDraw and retransfers
103 * node coordinates and dummy node bend to current simdraw
104 * instance.
106 * Automatically activates GraphAttributes::nodeGraphics.\n
107 * Automatically activates GraphAttributes::edgeGraphics.
109 void callUMLPlanarizationLayout();
111 //! runs SubgraphPlanarizer with modified inserter
113 * Runs SubgraphPlanarizer on connected component \a cc with simdraw
114 * call. Integer edge costs of GraphAttributes are used
115 * (1 for each edge if not available).
117 * Modifies graph by inserting dummy nodes for each crossing.
118 * All dummy nodes are marked as dummy.
119 * (Method SimDrawColorizer::addColorNodeVersion is recommended
120 * for visualizing dummy nodes.)
122 * No layout is calculated. The result is a planar graph.
124 int callSubgraphPlanarizer(int cc = 0, int numberOfPermutations = 1);
128 } // end namespace ogdf
130 #endif