iparser.hpp 421 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
#ifndef __IPARSER_HPP__
#define __IPARSER_HPP__

#include <string>
#include <vector>

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

class IParser
{
	protected:
	public:
		virtual bool parse(string& error_message) = 0;
		template <typename T>  virtual bool get_value(
				const string& key, T& value) = 0;
		template <typename T>  virtual bool get_values(i
				const string& key, vector<T>& out) = 0;
};
#endif //__IPARSER_HPP__