configurationreader.h

00001 /***************************************************************************
00002                           configurationreader.h  -  description
00003                              -------------------
00004     begin                : Son Nov 10 2002
00005     copyright            : (C) 2002 by Andr�Simon
00006     email                : andre.simon1@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef CONFIGURATIONREADER_H
00019 #define CONFIGURATIONREADER_H
00020 
00021 #include <string>
00022 #include <sstream>
00023 #include <map>
00024 #include <iostream>
00025 #include <fstream>
00026 #include <vector>
00027 
00028 #include "stringtools.h"
00029 
00030 using namespace std;
00031 
00033 typedef map<string, string> ParameterMap;
00034 
00035 
00046 class ConfigurationReader
00047   {
00048   public:
00052     ConfigurationReader(const string & configuration_path);
00053     ~ConfigurationReader();
00054 
00057     string &getParameter(const string & paramName);
00058 
00061     const char* getCParameter(const string & paramName);
00062 
00064     bool found();
00065 
00067     vector<string> &getParameterNames();
00068 
00069   private:
00070     ParameterMap parameterMap;
00071     bool fileFound;
00072     vector<string> parameterNames;
00073   };
00074 
00075 #endif

Generated on Fri Apr 27 13:12:35 2007 for Highlight Code Converter by  doxygen 1.5.2