Skip to content
history.hh 402 B
Newer Older
Seblu's avatar
Seblu committed
#ifndef HISTORY_HH
# define HISTORY_HH

# include <vector>

# define HISTORY_MAX_SIZE 256
Seblu's avatar
Seblu committed

class History {
public:
  History(size_t size);
  ~History();

  const string &get(size_t off) const;
  const string &get() const;
  void add(const string &line);
  size_t size() const;

  void save(const string &filename);

private:
  string filename_;
  std::vector<string> table_;
  size_t size_;
};

#endif