summaryrefslogtreecommitdiff
path: root/src/config.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.hh')
-rw-r--r--src/config.hh29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/config.hh b/src/config.hh
new file mode 100644
index 0000000..6ea3607
--- /dev/null
+++ b/src/config.hh
@@ -0,0 +1,29 @@
+#ifndef CONFIG_HH
+#define CONFIG_HH
+
+#include <memory>
+#include <string>
+
+namespace stuff {
+
+class Config {
+public:
+ virtual ~Config() {}
+
+ virtual std::string get(const std::string& name,
+ const std::string& fallback) const = 0;
+ virtual bool load(const std::string& path) = 0;
+
+ static std::unique_ptr<Config> create();
+
+protected:
+ Config() {}
+
+private:
+ Config(const Config&) = delete;
+ Config& operator=(const Config&) = delete;
+};
+
+} // namespace stuff
+
+#endif /* CONFIG_HH */