int_list_parser.hpp 445 Bytes
Newer Older
Swann Perarnau's avatar
Swann Perarnau committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#ifndef __INT_LIST_PARSER_HPP__
#define __INT_LIST_PARSER_HPP__
#include <string>
#include <vector>

using std::string;
using std::vector;

class Int_list_parser
{
	private:
		bool _has_stride;

		void expand_range(const string& input, vector<int>& out);
				
	public:
		Int_list_parser();
		~Int_list_parser(){};
		void convert_to_comprehensive(const string& input, vector<int>& out,
				bool append=false);
};
#endif //__INT_LIST_PARSER_HPP__