2 * File automatically generated by
3 * gengen 1.4.1 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef EXIT_FAILURE_GEN_CLASS_H
8 #define EXIT_FAILURE_GEN_CLASS_H
16 class exit_failure_gen_class
23 exit_failure_gen_class() :
28 exit_failure_gen_class(bool _handle_error, const string &_parser_name) :
29 handle_error (_handle_error), parser_name (_parser_name)
34 generate_string(const string &s, ostream &stream, unsigned int indent)
36 if (!indent || s.find('\n') == string::npos)
42 string::size_type pos;
43 string::size_type start = 0;
44 string ind (indent, ' ');
45 while ( (pos=s.find('\n', start)) != string::npos)
47 stream << s.substr (start, (pos+1)-start);
49 if (start+1 <= s.size ())
52 if (start+1 <= s.size ())
53 stream << s.substr (start);
56 void set_handle_error(bool _handle_error)
58 handle_error = _handle_error;
61 void set_parser_name(const string &_parser_name)
63 parser_name = _parser_name;
66 void generate_exit_failure(ostream &stream, unsigned int indent = 0);
70 #endif // EXIT_FAILURE_GEN_CLASS_H