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:
parent
34b4588481
commit
b03c3198b8
14 changed files with 134 additions and 37 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue