Move Register to register_manager.hh
This commit is contained in:
parent
4e1ed13f25
commit
075c5013a1
|
@ -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<String> values) = 0;
|
|
||||||
|
|
||||||
virtual ConstArrayView<String> values(const Context& context) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // register_hh_INCLUDED
|
|
|
@ -1,9 +1,10 @@
|
||||||
#ifndef register_manager_hh_INCLUDED
|
#ifndef register_manager_hh_INCLUDED
|
||||||
#define register_manager_hh_INCLUDED
|
#define register_manager_hh_INCLUDED
|
||||||
|
|
||||||
#include "register.hh"
|
#include "array_view.hh"
|
||||||
#include "utils.hh"
|
#include "utils.hh"
|
||||||
#include "unordered_map.hh"
|
#include "unordered_map.hh"
|
||||||
|
#include "string.hh"
|
||||||
#include "vector.hh"
|
#include "vector.hh"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
@ -11,6 +12,17 @@
|
||||||
namespace Kakoune
|
namespace Kakoune
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class Context;
|
||||||
|
|
||||||
|
class Register
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~Register() {}
|
||||||
|
virtual Register& operator=(ConstArrayView<String> values) = 0;
|
||||||
|
|
||||||
|
virtual ConstArrayView<String> values(const Context& context) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
using RegisterRetriever = std::function<Vector<String, MemoryDomain::Registers> (const Context&)>;
|
using RegisterRetriever = std::function<Vector<String, MemoryDomain::Registers> (const Context&)>;
|
||||||
|
|
||||||
class RegisterManager : public Singleton<RegisterManager>
|
class RegisterManager : public Singleton<RegisterManager>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user