1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-10-10 15:10:33 +00:00

Make a SettingsBag class that wraps the ini settings.

Easily allows to have default values for options
that are not specified in the loaded ini file.
This commit is contained in:
King_DuckZ 2017-04-21 23:10:16 +01:00
commit b03c3198b8
14 changed files with 134 additions and 37 deletions

View file

@ -22,13 +22,13 @@
#include <memory>
namespace tawashi {
class IniFile;
class SettingsBag;
class ResponseFactory {
public:
typedef std::function<std::unique_ptr<Response>(const IniFile&)> ResponseMakerFunc;
typedef std::function<std::unique_ptr<Response>(const SettingsBag&)> ResponseMakerFunc;
explicit ResponseFactory (const Kakoune::SafePtr<IniFile>& parSettings);
explicit ResponseFactory (const Kakoune::SafePtr<SettingsBag>& parSettings);
~ResponseFactory() noexcept;
std::unique_ptr<Response> make_response(const boost::string_ref& parName);