29 lines
682 B
C++
29 lines
682 B
C++
#pragma once
|
|
|
|
#include <boost/core/noncopyable.hpp>
|
|
#include <string>
|
|
#include <list>
|
|
|
|
namespace elna
|
|
{
|
|
struct editor_history : public boost::noncopyable
|
|
{
|
|
using const_iterator = std::list<std::string>::const_iterator;
|
|
|
|
editor_history();
|
|
|
|
void push(const std::string& entry);
|
|
void clear();
|
|
|
|
const_iterator next() noexcept;
|
|
const_iterator prev() noexcept;
|
|
const_iterator cbegin() const noexcept;
|
|
const_iterator cend() const noexcept;
|
|
const_iterator current() const noexcept;
|
|
|
|
private:
|
|
std::list<std::string> commands;
|
|
std::list<std::string>::const_iterator current_pointer;
|
|
};
|
|
}
|