6 * $Date: 2012-07-12 01:02:21 +0200 (Do, 12. Jul 2012) $
7 ***************************************************************/
10 * \brief Declaration of interface for planar layout algorithms for
11 * UML diagrams (used in planarization approach).
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 ***************************************************************/
49 #ifndef OGDF_LAYOUT_CLUSTER_PLAN_REP_MODULE_H
50 #define OGDF_LAYOUT_CLUSTER_PLAN_REP_MODULE_H
54 #include <ogdf/cluster/ClusterPlanRep.h>
55 #include <ogdf/basic/Layout.h>
64 * \brief Interface for planar cluster layout algorithms.
66 * \warning This interface is likely to change in future releases.
67 * \see ClusterPlanarizationLayout
69 class OGDF_EXPORT LayoutClusterPlanRepModule
{
71 //! Initializes a cluster planar layout module.
72 LayoutClusterPlanRepModule() { }
74 virtual ~LayoutClusterPlanRepModule() { }
76 /** \brief Computes a layout of \a PG in \a drawing.
78 * Must be overridden by derived classes.
79 * @param PG is the input cluster planarized representation which may be modified.
80 * @param adjExternal is an adjacenty entry on the external face.
81 * @param drawing is the computed layout of \a PG.
82 * @param npEdges are pairs of nodes in the original graph that shall be connected.
83 * @param newEdges are assigned the inserted edges.
84 * @param originalGraph must be the original graph of \a PG.
90 List
<NodePair
>& npEdges
,
92 Graph
& originalGraph
) = 0;
95 //! Returns the bounding box of the computed layout.
96 const DPoint
&getBoundingBox() const {
100 //! Sets the (generic) options; derived classes have to cope with the interpretation)
101 virtual void setOptions(int /* optionField */) { } //don't make it abstract
103 //! Returns the (generic) options.
104 virtual int getOptions() { return 0; } //don't make it abstract
106 //! Returns the minimal allowed distance between edges and vertices.
107 virtual double separation() const = 0;
109 //! Sets the minimal allowed distance between edges and vertices to \a sep.
110 virtual void separation(double sep
) = 0;
114 * \brief Stores the bounding box of the computed layout.
115 * <b>Must be set by derived algorithms!</b>
117 DPoint m_boundingBox
;
120 OGDF_MALLOC_NEW_DELETE
124 } // end namespace ogdf