Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / basic / Module.h
blob66d3a0c9b4d95ba421270f4ed9c5dddb853825d2
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 Declares base class for all module types.
12 * \author Carsten Gutwenger
14 * \par License:
15 * This file is part of the Open Graph Drawing Framework (OGDF).
17 * \par
18 * Copyright (C)<br>
19 * See README.txt in the root directory of the OGDF installation for details.
21 * \par
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * Version 2 or 3 as published by the Free Software Foundation;
25 * see the file LICENSE.txt included in the packaging of this file
26 * for details.
28 * \par
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
34 * \par
35 * You should have received a copy of the GNU General Public
36 * License along with this program; if not, write to the Free
37 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
38 * Boston, MA 02110-1301, USA.
40 * \see http://www.gnu.org/copyleft/gpl.html
41 ***************************************************************/
43 #ifdef _MSC_VER
44 #pragma once
45 #endif
48 #ifndef OGDF_MODULE_H
49 #define OGDF_MODULE_H
52 #include <ogdf/basic/basic.h>
54 namespace ogdf {
57 /**
58 * \brief Base class for modules.
60 * A module represents an algorithm that implements a certain interface.
61 * There are various specific module types present in the OGDF, which all
62 * inherit Module as a base class. These module types define the interface
63 * implemented by the module.
65 * \sa ModuleOption
67 class OGDF_EXPORT Module
69 public:
70 //! The return type of a module.
71 enum ReturnType {
72 retFeasible, //!< The solution is feasible.
73 retOptimal, //!< The solution is optimal
74 retNoFeasibleSolution, //!< There exists no feasible solution.
75 retTimeoutFeasible, //!< The solution is feasible, but there was a timeout.
76 retTimeoutInfeasible, //!< The solution is not feasible due to a timeout.
77 retError //! Computation was aborted due to an error.
80 //! Initializes a module.
81 Module() { }
83 virtual ~Module() { }
85 //! Returns true iff \a retVal indicates that the module returned a feasible solution.
86 static bool isSolution(ReturnType ret) {
87 return ret == retFeasible || ret == retOptimal || ret == retTimeoutFeasible;
92 } // end namespace ogdf
95 #endif