You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3coop/apps/mwiniimporter/importer.hpp

34 lines
1.0 KiB
C++

13 years ago
#ifndef MWINIIMPORTER_IMPORTER
#define MWINIIMPORTER_IMPORTER 1
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/stream.hpp>
13 years ago
#include <string>
13 years ago
#include <map>
#include <vector>
13 years ago
#include <exception>
typedef std::map<std::string, std::string> strmap;
13 years ago
class MwIniImporter {
public:
MwIniImporter();
13 years ago
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, std::vector<std::string> &esmFiles, std::vector<std::string> &espFiles);
void writeGameFiles(boost::iostreams::stream<boost::iostreams::file_sink> &out, std::vector<std::string> &esmFiles, std::vector<std::string> &espFiles);
void writeToFile(boost::iostreams::stream<boost::iostreams::file_sink> &out, strmap &cfg);
13 years ago
private:
bool specialMerge(std::string cfgKey, std::string iniKey, strmap &cfg, strmap &ini);
13 years ago
bool mVerbose;
strmap mMergeMap;
13 years ago
};
#endif