Commit 0aa14c84 authored by louiz’'s avatar louiz’
Browse files

Improve the config singleton

parent 1994c5b5
......@@ -19,13 +19,15 @@
#include <iostream>
#include <string>
#include <functional>
#include <memory>
typedef std::function<void()> t_config_changed_callback;
class Config
Config() = default;
~Config() = default;
* returns a value from the config. If it doesn’t exist, use
* the second argument as the default.
......@@ -69,14 +71,12 @@ public:
* The uniq config instance.
static Config* instance;
static std::unique_ptr<Config> instance;
* Close the config file, saving it to the file is save == true.
static void close(bool save = false);
Config(const Config &){};
* Write all the config values into the configuration file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment