diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-10-30 14:00:42 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-10-30 14:04:57 +0000 |
| commit | e38ba6ce3d62c2629ebdaad41258d5e4b48f5296 (patch) | |
| tree | 609ef5d7df44e7222ab961634b7c81c97102881a /src/buffer.hh | |
| parent | 8649371ff23df34c0bf6ca34c1d8b61d7482821e (diff) | |
Add scope class and encapsulate Options, Keymaps, Aliases and Hooks in it
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index 63b2e7cd..4715ddc1 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -1,13 +1,10 @@ #ifndef buffer_hh_INCLUDED #define buffer_hh_INCLUDED -#include "alias_registry.hh" #include "coord.hh" #include "flags.hh" -#include "hook_manager.hh" -#include "option_manager.hh" -#include "keymap_manager.hh" #include "safe_ptr.hh" +#include "scope.hh" #include "interned_string.hh" #include "value.hh" @@ -71,7 +68,7 @@ private: // The Buffer class permits to read and mutate this file // representation. It also manage modifications undo/redo and // provides tools to deal with the line/column nature of text. -class Buffer : public SafeCountable, public OptionManagerWatcher +class Buffer : public SafeCountable, public OptionManagerWatcher, public Scope { public: enum class Flags @@ -150,15 +147,6 @@ public: // notify the buffer that it was saved in the current state void notify_saved(); - OptionManager& options() { return m_options; } - const OptionManager& options() const { return m_options; } - HookManager& hooks() { return m_hooks; } - const HookManager& hooks() const { return m_hooks; } - KeymapManager& keymaps() { return m_keymaps; } - const KeymapManager& keymaps() const { return m_keymaps; } - AliasRegistry& aliases() { return m_aliases; } - const AliasRegistry& aliases() const { return m_aliases; } - ValueMap& values() const { return m_values; } void run_hook_in_own_context(const String& hook_name, StringView param); @@ -217,11 +205,6 @@ private: time_t m_fs_timestamp; - OptionManager m_options; - HookManager m_hooks; - KeymapManager m_keymaps; - AliasRegistry m_aliases; - // Values are just data holding by the buffer, so it is part of its // observable state mutable ValueMap m_values; |
