6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
10 * \brief Declaration of interface for layout algorithms (class
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_MODULE_H
50 #define OGDF_LAYOUT_MODULE_H
54 #include <ogdf/basic/GraphAttributes.h>
55 #include <ogdf/basic/Constraints.h>
56 #include <ogdf/internal/energybased/MultilevelGraph.h>
62 * \brief Interface of general layout algorithms.
65 class OGDF_EXPORT LayoutModule
{
67 //! Initializes a layout module.
70 virtual ~LayoutModule() { }
73 * \brief Computes a layout of graph \a GA.
75 * This method is the actual algorithm call and must be implemented by
77 * @param GA is the input graph and will also be assigned the layout information.
79 virtual void call(GraphAttributes
&GA
) = 0;
82 * \brief Computes a layout of graph \a GA wrt the constraints in \a GC
85 virtual void call(GraphAttributes
&GA
, GraphConstraints
& GC
) { call(GA
); }
88 * \brief Computes a layout of graph \a GA.
90 * @param GA is the input graph and will also be assigned the layout information.
92 void operator()(GraphAttributes
&GA
) { call(GA
); }
94 OGDF_MALLOC_NEW_DELETE
98 } // end namespace ogdf