1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/apps/mwiniimporter/importer.hpp

30 lines
680 B
C++
Raw Normal View History

2012-03-30 18:59:44 +00:00
#ifndef MWINIIMPORTER_IMPORTER
#define MWINIIMPORTER_IMPORTER 1
#include <string>
2012-03-30 20:58:54 +00:00
#include <map>
#include <exception>
2012-03-31 16:28:48 +00:00
typedef std::multimap<std::string, std::string> strmap;
2012-03-30 18:59:44 +00:00
class MwIniImporter {
public:
2012-03-31 14:54:53 +00:00
MwIniImporter();
2012-03-30 20:58:54 +00:00
void setVerbose(bool verbose);
strmap loadIniFile(std::string filename);
strmap loadCfgFile(std::string filename);
void merge(strmap &cfg, strmap &ini);
void importGameFiles(strmap &cfg, strmap &ini);
2012-03-30 20:58:54 +00:00
void writeToFile(std::string file, strmap &cfg);
2012-03-30 18:59:44 +00:00
private:
2012-03-31 12:34:00 +00:00
bool specialMerge(std::string cfgKey, std::string iniKey, strmap &cfg, strmap &ini);
2012-03-30 20:58:54 +00:00
bool mVerbose;
strmap mMergeMap;
2012-03-30 18:59:44 +00:00
};
#endif