6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
10 * \brief Declaration of interface for mixed-model crossings
11 * beautifier algorithms
13 * \author Carsten Gutwenger
16 * This file is part of the Open Graph Drawing Framework (OGDF).
20 * See README.txt in the root directory of the OGDF installation for details.
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
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.
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 ***************************************************************/
48 #ifndef OGDF_MIXED_MODEL_CROSSINGS_BEAUTIFIER_MODULE_H
49 #define OGDF_MIXED_MODEL_CROSSINGS_BEAUTIFIER_MODULE_H
53 #include <ogdf/planarity/PlanRep.h>
54 #include <ogdf/basic/GridLayout.h>
60 * \brief The base class for Mixed-Model crossings beautifier algorithms.
62 * The class MixedModelCrossingsBeautifierModule is the base class for
63 * mixed model bend crossing modules. Such a module transforms an input
64 * graph \a G into an output graph \a G' such that crossings of edges don't
67 * <H3>Implementation of Mixed-Model Crossings Beautifier Algorithms</H3>
69 * An implementation of a Mixed-Model crossings beautifier module must override
70 * the protected method doCall().
73 class OGDF_EXPORT MixedModelCrossingsBeautifierModule
{
75 //! Initializes the Mixed-Model crossings beautifier module.
76 MixedModelCrossingsBeautifierModule() { }
79 virtual ~MixedModelCrossingsBeautifierModule() { }
83 * \brief Calls the Mixed-Model crossings beautifier module for graph \a PG and grid layout \a gl.
85 * @param PG is the input graph.
86 * @param gl is the grid layout of \a PG.
88 void call(const PlanRep
&PG
, GridLayout
&gl
);
90 //! Returns the number of processed crossings.
91 int numberOfCrossings() const {
98 * \brief Implements the crossings beautifier module.
100 * @param PG is the input graph.
101 * @param gl is the grid layout of \a PG.
102 * @param L is the list of crossing nodes.
104 virtual void doCall(const PlanRep
&PG
, GridLayout
&gl
, const List
<node
> &L
) = 0;
107 int m_nCrossings
; //!< the number of processed crossings.
109 OGDF_MALLOC_NEW_DELETE
113 //! Dummy implementation of Mixed-Model crossings beautifier.
115 * This implementation does no beautification at all and can thus be used
116 * for obtaining the original Mixed-Model layout.
118 class MMDummyCrossingsBeautifier
: public MixedModelCrossingsBeautifierModule
121 //!< Dummy implementation.
122 void doCall(const PlanRep
&, GridLayout
&, const List
<node
> &) { }
126 } // end namespace ogdf