You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
453 B
20 lines
453 B
3 weeks ago
|
#pragma once
|
||
|
#include <nlohmann/json.hpp>
|
||
|
#include <fstream>
|
||
|
#include <codecvt>
|
||
|
|
||
|
using namespace nlohmann;
|
||
|
|
||
|
struct Config {
|
||
|
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> $converter;
|
||
|
json $config;
|
||
|
std::string $src_path = "./config.json";
|
||
|
|
||
|
Config(const std::string src_path);
|
||
|
Config(Config &other) = delete;
|
||
|
|
||
|
json &operator[](const std::string &key);
|
||
|
|
||
|
std::wstring wstring(const std::string main_key, const std::string sub_key);
|
||
|
};
|