2007-01-21 16:01:37 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
* Copyright (C) 2006 by Felix Hammer *
|
|
|
|
|
* f.hammer@web.de *
|
|
|
|
|
* *
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
#ifndef CONFIGFILE_H
|
|
|
|
|
#define CONFIGFILE_H
|
|
|
|
|
|
|
|
|
|
#include "tinyxml.h"
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
class ConfigFile{
|
|
|
|
|
public:
|
|
|
|
|
ConfigFile();
|
|
|
|
|
|
|
|
|
|
~ConfigFile();
|
|
|
|
|
|
|
|
|
|
void createDefaultConfig();
|
|
|
|
|
|
2007-02-03 22:47:16 +00:00
|
|
|
std::string readConfigString(std::string varName);
|
2007-01-22 21:29:51 +00:00
|
|
|
void writeConfigString(std::string varName, std::string varCont);
|
2007-01-21 22:44:11 +00:00
|
|
|
|
2007-02-03 22:47:16 +00:00
|
|
|
int readConfigInt(std::string varName);
|
2007-01-22 21:29:51 +00:00
|
|
|
void writeConfigInt(std::string varName, int varCont);
|
2007-01-21 22:44:11 +00:00
|
|
|
|
2007-01-21 16:01:37 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::string configFileName;
|
2007-02-03 10:10:25 +00:00
|
|
|
std::string logDir;
|
2007-02-27 19:11:27 +00:00
|
|
|
std::string dataDir;
|
2007-01-27 16:34:16 +00:00
|
|
|
int configRev;
|
2007-01-21 16:01:37 +00:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|