#ifndef hooks_manager_hh_INCLUDED #define hooks_manager_hh_INCLUDED #include "context.hh" #include "utils.hh" #include namespace Kakoune { typedef std::function HookFunc; class HooksManager { public: void add_hook(const std::string& hook_name, HookFunc hook); void run_hook(const std::string& hook_name, const std::string& param, const Context& context) const; private: std::unordered_map> m_hooks; }; class GlobalHooksManager : public HooksManager, public Singleton { }; } #endif // hooks_manager_hh_INCLUDED