Newer
Older
SLC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
SLC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SLC; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#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