Skip to content
history.hh 405 B
Newer Older
#ifndef HISTORY_HH
# define HISTORY_HH

# include <list>

class History {
public:
  typedef std::list<string> t_lines;
  History();

public:
  const string &get(size_t off) const;

  void add(const string &line);

  size_t size() const;

  void max_size(size_t s);

  void save(const string &filename) const;
  void load(const string &filename);

private:
  t_lines table_;
  size_t max_size_;
};

#endif