abaddon-ppc/settings.hpp

19 lines
425 B
C++
Raw Normal View History

2020-08-19 05:07:55 +00:00
#pragma once
#include <string>
#include <SimpleIni.h>
class SettingsManager {
public:
SettingsManager(std::string filename);
void Close();
std::string GetSetting(std::string section, std::string key, std::string fallback = "");
void SetSetting(std::string section, std::string key, std::string value);
bool IsValid() const;
private:
bool m_ok;
std::string m_filename;
CSimpleIniA m_ini;
};