29 lines
487 B
C++
29 lines
487 B
C++
#ifndef Configuration_h_
|
|
#define Configuration_h_
|
|
|
|
#include <vector>
|
|
#include <fstream>
|
|
#include <ostream>
|
|
#include <iomanip>
|
|
|
|
#include "json/json.hpp"
|
|
|
|
#include "Node.hpp"
|
|
|
|
struct Configuration : Node
|
|
{
|
|
nlohmann::json sys_config, config;
|
|
fs::path config_path;
|
|
int tab_width = 4;
|
|
|
|
Configuration(Node*);
|
|
Configuration(Node*, fs::path);
|
|
void set_defaults();
|
|
void load();
|
|
void load(fs::path path);
|
|
void write();
|
|
void write(fs::path path);
|
|
};
|
|
|
|
#endif
|