kakoune/src/register.hh

34 lines
594 B
C++
Raw Normal View History

#ifndef register_hh_INCLUDED
#define register_hh_INCLUDED
#include <string>
#include <vector>
#include "memoryview.hh"
namespace Kakoune
{
class Register
{
public:
Register& operator=(const std::string& value);
Register& operator=(const memoryview<std::string>& values);
const std::string& get() const;
const std::string& get(size_t index) const;
operator memoryview<std::string>() const
{ return memoryview<std::string>(m_content); }
private:
std::vector<std::string> m_content;
static const std::string ms_empty;
};
}
#endif // register_hh_INCLUDED