2012-02-08 00:01:02 +01:00
|
|
|
#ifndef register_hh_INCLUDED
|
|
|
|
#define register_hh_INCLUDED
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "memoryview.hh"
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
class Register
|
|
|
|
{
|
|
|
|
public:
|
2012-02-10 00:47:55 +01:00
|
|
|
Register& operator=(const std::string& value);
|
|
|
|
Register& operator=(const memoryview<std::string>& values);
|
|
|
|
|
2012-02-08 00:01:02 +01:00
|
|
|
const std::string& get() const;
|
|
|
|
const std::string& get(size_t index) const;
|
|
|
|
|
2012-02-10 00:47:55 +01:00
|
|
|
operator memoryview<std::string>() const
|
|
|
|
{ return memoryview<std::string>(m_content); }
|
|
|
|
|
2012-02-08 00:01:02 +01:00
|
|
|
private:
|
|
|
|
std::vector<std::string> m_content;
|
|
|
|
|
|
|
|
static const std::string ms_empty;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // register_hh_INCLUDED
|
|
|
|
|