Files
rem-essentials-pub/include/rem/config.h
T

31 lines
833 B
C++

#pragma once
#include <windows.h>
#include <string>
#include <unordered_map>
#include "rem/feature_manager.h"
namespace rem
{
class Config
{
public:
void Load(HINSTANCE module);
bool GetBool(const char* section, const char* key, bool fallback) const;
int GetInt(const char* section, const char* key, int fallback) const;
float GetFloat(const char* section, const char* key, float fallback) const;
std::string GetString(const char* section, const char* key, const char* fallback = "") const;
private:
std::string GetValue(const char* section, const char* key) const;
std::unordered_map<std::string, std::unordered_map<std::string, std::string>> sections_;
};
Config& GetConfig();
void ReadConfig(HINSTANCE module, FeatureManager& manager);
}