2 * File automatically generated by
3 * gengen 1.2 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef PRINT_HELP_STRING_GEN_CLASS_H
8 #define PRINT_HELP_STRING_GEN_CLASS_H
16 class print_help_string_gen_class
28 print_help_string_gen_class() :
29 last (false), shared (false)
33 print_help_string_gen_class(const string &_from, const string &_full_index, const string &_helpstring, const string &_index, bool _last, bool _shared, const string &_target) :
34 from (_from), full_index (_full_index), helpstring (_helpstring), index (_index), last (_last), shared (_shared), target (_target)
39 generate_string(const string &s, ostream &stream, unsigned int indent)
41 if (!indent || s.find('\n') == string::npos)
47 string::size_type pos;
48 string::size_type start = 0;
49 string ind (indent, ' ');
50 while ( (pos=s.find('\n', start)) != string::npos)
52 stream << s.substr (start, (pos+1)-start);
54 if (start+1 <= s.size ())
57 if (start+1 <= s.size ())
58 stream << s.substr (start);
61 void set_from(const string &_from)
66 void set_full_index(const string &_full_index)
68 full_index = _full_index;
71 void set_helpstring(const string &_helpstring)
73 helpstring = _helpstring;
76 void set_index(const string &_index)
81 void set_last(bool _last)
86 void set_shared(bool _shared)
91 void set_target(const string &_target)
96 void generate_print_help_string(ostream &stream, unsigned int indent = 0);
100 #endif // PRINT_HELP_STRING_GEN_CLASS_H