00001 /*************************************************************************** 00002 configurationreader.h - description 00003 ------------------- 00004 begin : Son Nov 10 2002 00005 copyright : (C) 2002 by Andre Simon 00006 email : andre.simon1@gmx.de 00007 ***************************************************************************/ 00008 00009 00010 /* 00011 This file is part of Highlight. 00012 00013 Highlight is free software: you can redistribute it and/or modify 00014 it under the terms of the GNU General Public License as published by 00015 the Free Software Foundation, either version 3 of the License, or 00016 (at your option) any later version. 00017 00018 Highlight is distributed in the hope that it will be useful, 00019 but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 GNU General Public License for more details. 00022 00023 You should have received a copy of the GNU General Public License 00024 along with Highlight. If not, see <http://www.gnu.org/licenses/>. 00025 */ 00026 00027 00028 #ifndef CONFIGURATIONREADER_H 00029 #define CONFIGURATIONREADER_H 00030 00031 #include <string> 00032 #include <map> 00033 #include <vector> 00034 00035 using namespace std; 00036 00038 typedef map<string, string> ParameterMap; 00039 00040 00051 class ConfigurationReader 00052 { 00053 public: 00057 ConfigurationReader ( const string & configuration_path ); 00058 ~ConfigurationReader(); 00059 00062 string &getParameter ( const string & paramName ); 00063 00066 const char* getCParameter ( const string & paramName ); 00067 00069 bool found(); 00070 00072 vector<string> &getParameterNames(); 00073 00074 private: 00075 ParameterMap parameterMap; 00076 bool fileFound; 00077 vector<string> parameterNames; 00078 }; 00079 00080 #endif