Merge branch 'scintilla-357'
[TortoiseGit.git] / ext / OGDF / ogdf / module / HierarchyClusterLayoutModule.h
blob478b5429af32d271031f1cf74140f21462fa3eb9
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 hierarchy layout algorithms
11 * (3. phase of Sugiyama) for cluster graphs.
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 ***************************************************************/
45 #ifdef _MSC_VER
46 #pragma once
47 #endif
49 #ifndef OGDF_HIER_CLUSTER_LAYOUT_MODULE_H
50 #define OGDF_HIER_CLUSTER_LAYOUT_MODULE_H
54 #include <ogdf/cluster/ClusterGraphCopyAttributes.h>
57 namespace ogdf {
60 /**
61 * \brief Interface of hierarchy layout algorithms for cluster graphs.
63 * \see SugiyamaLayout
65 class OGDF_EXPORT HierarchyClusterLayoutModule {
66 public:
67 //! Initializes a hierarchy cluster layout module.
68 HierarchyClusterLayoutModule() { }
70 virtual ~HierarchyClusterLayoutModule() { }
72 /**
73 * \brief Computes a hierarchy layout of a clustered hierarchy \a H in \a ACG.
74 * @param H is the input clustered hierarchy.
75 * @param ACG is assigned the cluster hierarchy layout.
77 void callCluster(const ExtendedNestingGraph& H, ClusterGraphAttributes &ACG) {
78 ClusterGraphCopyAttributes ACGC(H,ACG);
79 doCall(H,ACGC);
80 ACGC.transform();
83 protected:
84 /**
85 * \brief Implements the actual algorithm call.
87 * Must be implemented by derived classes.
89 * @param H is the input clustered hierarchy.
90 * @param ACGC has to be assigned the cluster hierarchy layout.
92 virtual void doCall(
93 const ExtendedNestingGraph& H,
94 ClusterGraphCopyAttributes &ACGC) = 0;
96 OGDF_MALLOC_NEW_DELETE
100 } // end namespace ogdf
103 #endif