Add tests for UpdateCrypto
[TortoiseGit.git] / ext / OGDF / ogdf / module / LayoutModule.h
blob506856c0fe2125ab9417a9400417f6b9febb93fb
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 layout algorithms (class
11 * LayoutModule)
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_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>
58 namespace ogdf {
61 /**
62 * \brief Interface of general layout algorithms.
65 class OGDF_EXPORT LayoutModule {
66 public:
67 //! Initializes a layout module.
68 LayoutModule() { }
70 virtual ~LayoutModule() { }
72 /**
73 * \brief Computes a layout of graph \a GA.
75 * This method is the actual algorithm call and must be implemented by
76 * derived classes.
77 * @param GA is the input graph and will also be assigned the layout information.
79 virtual void call(GraphAttributes &GA) = 0;
81 /**
82 * \brief Computes a layout of graph \a GA wrt the constraints in \a GC
83 * (if applicable).
85 virtual void call(GraphAttributes &GA, GraphConstraints & GC) { call(GA); }
87 /**
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
101 #endif