Add tests for UpdateCrypto
[TortoiseGit.git] / ext / OGDF / ogdf / module / MixedModelCrossingsBeautifierModule.h
blobc5093cb263b41c8666de4690553763c5493b3dab
1 /*
2 * $Revision: 2523 $
4 * last checkin:
5 * $Author: gutwenger $
6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
9 /** \file
10 * \brief Declaration of interface for mixed-model crossings
11 * beautifier algorithms
13 * \author Carsten Gutwenger
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 #ifdef _MSC_VER
45 #pragma once
46 #endif
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>
57 namespace ogdf {
59 /**
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
65 * look weird.
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 {
74 public:
75 //! Initializes the Mixed-Model crossings beautifier module.
76 MixedModelCrossingsBeautifierModule() { }
78 // destruction
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 {
92 return m_nCrossings;
96 protected:
97 /**
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;
106 private:
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
120 protected:
121 //!< Dummy implementation.
122 void doCall(const PlanRep &, GridLayout &, const List<node> &) { }
126 } // end namespace ogdf
128 #endif