summaryrefslogtreecommitdiff
path: root/include/history.h
blob: 44d81b1cf9b3893b5d0a94e554c545971569d439 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef NEWSBEUTER_HISTORY__H
#define NEWSBEUTER_HISTORY__H

#include <vector>
#include <string>

namespace newsbeuter {

	class history {
		public:
			history();
			~history();
			void add_line(const std::string& line);
			std::string prev();
			std::string next();
			void load_from_file(const std::string& file);
			void save_to_file(const std::string& file, unsigned int limit);
		private:
			std::vector<std::string> lines;
			unsigned int idx;
	};

}

#endif