1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/apps/mwiniimporter/importer.hpp

32 lines
634 B
C++
Raw Normal View History

2012-03-30 20:59:44 +02:00
#ifndef MWINIIMPORTER_IMPORTER
#define MWINIIMPORTER_IMPORTER 1
#include <string>
2012-03-30 22:58:54 +02:00
#include <map>
#include <exception>
typedef std::map<std::string, std::string> strmap;
class IniParseException : public std::exception {
virtual const char* what() const throw() {
return "unexpected end of line";
}
};
2012-03-30 20:59:44 +02:00
class MwIniImporter {
public:
2012-03-30 22:58:54 +02:00
void setVerbose(bool verbose);
strmap loadIniFile(std::string filename);
strmap loadCfgFile(std::string filename);
void merge(strmap &cfg, strmap &ini);
void writeToFile(std::string file, strmap &cfg);
2012-03-30 20:59:44 +02:00
private:
2012-03-30 22:58:54 +02:00
bool mVerbose;
2012-03-30 20:59:44 +02:00
};
#endif