From 075c5013a115375a35418da6352e9c77e2d0c469 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 23 Apr 2015 21:51:48 +0100 Subject: [PATCH] Move Register to register_manager.hh --- src/register.hh | 23 ----------------------- src/register_manager.hh | 14 +++++++++++++- 2 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 src/register.hh diff --git a/src/register.hh b/src/register.hh deleted file mode 100644 index 40cd068d..00000000 --- a/src/register.hh +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef register_hh_INCLUDED -#define register_hh_INCLUDED - -#include "array_view.hh" -#include "string.hh" - -namespace Kakoune -{ - -class Context; - -class Register -{ -public: - virtual ~Register() {} - virtual Register& operator=(ConstArrayView values) = 0; - - virtual ConstArrayView values(const Context& context) = 0; -}; - -} - -#endif // register_hh_INCLUDED diff --git a/src/register_manager.hh b/src/register_manager.hh index 52217374..df829763 100644 --- a/src/register_manager.hh +++ b/src/register_manager.hh @@ -1,9 +1,10 @@ #ifndef register_manager_hh_INCLUDED #define register_manager_hh_INCLUDED -#include "register.hh" +#include "array_view.hh" #include "utils.hh" #include "unordered_map.hh" +#include "string.hh" #include "vector.hh" #include @@ -11,6 +12,17 @@ namespace Kakoune { +class Context; + +class Register +{ +public: + virtual ~Register() {} + virtual Register& operator=(ConstArrayView values) = 0; + + virtual ConstArrayView values(const Context& context) = 0; +}; + using RegisterRetriever = std::function (const Context&)>; class RegisterManager : public Singleton