2 * File automatically generated by
3 * gengen 1.2 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef HANDLE_HELP_GEN_CLASS_H
8 #define HANDLE_HELP_GEN_CLASS_H
16 class handle_help_gen_class
25 handle_help_gen_class() :
26 detailed_help (false), full_help (false), short_opt (false)
30 handle_help_gen_class(bool _detailed_help, bool _full_help, const string &_parser_name, bool _short_opt) :
31 detailed_help (_detailed_help), full_help (_full_help), parser_name (_parser_name), short_opt (_short_opt)
36 generate_string(const string &s, ostream &stream, unsigned int indent)
38 if (!indent || s.find('\n') == string::npos)
44 string::size_type pos;
45 string::size_type start = 0;
46 string ind (indent, ' ');
47 while ( (pos=s.find('\n', start)) != string::npos)
49 stream << s.substr (start, (pos+1)-start);
51 if (start+1 <= s.size ())
54 if (start+1 <= s.size ())
55 stream << s.substr (start);
58 void set_detailed_help(bool _detailed_help)
60 detailed_help = _detailed_help;
63 void set_full_help(bool _full_help)
65 full_help = _full_help;
68 void set_parser_name(const string &_parser_name)
70 parser_name = _parser_name;
73 void set_short_opt(bool _short_opt)
75 short_opt = _short_opt;
78 void generate_handle_help(ostream &stream, unsigned int indent = 0);
82 #endif // HANDLE_HELP_GEN_CLASS_H