diff options
Diffstat (limited to 'src/libutil/config.hh')
-rw-r--r-- | src/libutil/config.hh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libutil/config.hh b/src/libutil/config.hh index 3e232d224..01e1239b3 100644 --- a/src/libutil/config.hh +++ b/src/libutil/config.hh @@ -375,6 +375,26 @@ public: void operator =(const std::optional<Path> & v); }; +/** + * Like `OptionalPathSetting`, but allows multiple paths. + */ +class PathsSetting : public BaseSetting<Paths> +{ +public: + + PathsSetting(Config * options, + const Paths & def, + const std::string & name, + const std::string & description, + const std::set<std::string> & aliases = {}); + + Paths parse(const std::string & str) const override; + + void operator =(const Paths & v); + + operator bool() const noexcept; +}; + struct GlobalConfig : public AbstractConfig { typedef std::vector<Config*> ConfigRegistrations; |