dlvhex
2.5.0
|
00001 /* dlvhex -- Answer-Set Programming with external interfaces. 00002 * Copyright (C) 2005-2007 Roman Schindlauer 00003 * Copyright (C) 2006-2015 Thomas Krennwallner 00004 * Copyright (C) 2009-2016 Peter Schüller 00005 * Copyright (C) 2011-2016 Christoph Redl 00006 * Copyright (C) 2015-2016 Tobias Kaminski 00007 * Copyright (C) 2015-2016 Antonius Weinzierl 00008 * 00009 * This file is part of dlvhex. 00010 * 00011 * dlvhex is free software; you can redistribute it and/or modify it 00012 * under the terms of the GNU Lesser General Public License as 00013 * published by the Free Software Foundation; either version 2.1 of 00014 * the License, or (at your option) any later version. 00015 * 00016 * dlvhex is distributed in the hope that it will be useful, but 00017 * WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with dlvhex; if not, write to the Free Software 00023 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00024 * 02110-1301 USA. 00025 */ 00026 00035 #if !defined(_DLVHEX_CONFIGURATION_HPP) 00036 #define _DLVHEX_CONFIGURATION_HPP 00037 00038 #include "dlvhex2/PlatformDefinitions.h" 00039 00040 #include <string> 00041 #include <vector> 00042 #include <map> 00043 00044 DLVHEX_NAMESPACE_BEGIN 00045 00049 class DLVHEX_EXPORT Configuration 00050 { 00051 public: 00053 Configuration(); 00054 00058 typedef enum { 00060 DUMP_CONVERTED_PROGRAM, 00062 DUMP_PARSED_PROGRAM, 00064 DUMP_REWRITTEN_PROGRAM, 00066 SAFETY_ANALYSIS, 00068 DUMP_DEPENDENCY_GRAPH, 00070 DUMP_OPTIMIZED_PROGRAM, 00072 PLUGIN_LOADING, 00074 COMPONENT_EVALUATION, 00076 MODEL_GENERATOR, 00078 GRAPH_PROCESSOR, 00080 PROFILING, 00082 DUMP_OUTPUT 00083 } verboseAction_t; 00084 00090 unsigned 00091 getOption(const std::string& o) const; 00092 00102 bool 00103 doVerbose(verboseAction_t a); 00104 00111 void 00112 setOption(const std::string&, unsigned); 00113 00118 void 00119 addFilter(const std::string&); 00120 00125 const std::vector<std::string>& 00126 getFilters() const; 00127 00131 const std::string& getStringOption(const std::string& key) const; 00135 void setStringOption(const std::string& key, const std::string& value); 00136 00137 private: 00138 00142 std::map<verboseAction_t, unsigned> verboseLevel; 00143 00147 std::map<std::string, unsigned> optionMap; 00151 std::map<std::string, std::string> stringOptionMap; 00152 00156 std::vector<std::string> optionFilter; 00157 }; 00158 00159 DLVHEX_NAMESPACE_END 00160 #endif // _DLVHEX_CONFIGURATION_HPP 00161 00162 // vim: noet ts=8 sw=4 tw=80 00163 00164 00165 // vim:expandtab:ts=4:sw=4: 00166 // mode: C++ 00167 // End: