swm/include/config/config.h

18 lines
331 B
C
Raw Normal View History

2021-12-08 01:17:10 +00:00
#pragma once
#include <toml.hpp>
#include <toml/parser.hpp>
#include <toml/value.hpp>
#include "programs_config.h"
class Config {
public:
ProgramsConfig programs;
Config(const std::string& config_path) {
toml::value toml = toml::parse(config_path);
programs = ProgramsConfig(toml["programs"]);
}
};