Initial public release of rem-essentials
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user