summaryrefslogtreecommitdiff
path: root/src/config.hh
blob: 6ea3607562a13d0751d490b2875d0768c4f3c0b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 */