VEGO-Engine  0.1
Loading...
Searching...
No Matches
ConfigLoader.h
1#pragma once
2
3#include <nlohmann/json.hpp>
4
5using json = nlohmann::json;
6
23
24class ConfigLoader {
25
26public:
27 ConfigLoader();
28 ~ConfigLoader();
29
39 void init();
47 void setCustomConfig(const std::optional<std::string>& path);
53 json getFinalConfig();
54
55private:
56
57 std::optional<std::string> customConfigPath;
58 json finalConfig;
59
60 json loadConfigFromJSON(const std::string& path);
61 json mergeConfigs(json baseConfig, json customConfig); //<! Merges 2 config.json files, prioritising the custom to the base one
62};