2 * File automatically generated by
3 * gengen 1.2 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef GIVEN_FIELD_GEN_CLASS_H
8 #define GIVEN_FIELD_GEN_CLASS_H
16 class given_field_gen_class
24 given_field_gen_class() :
29 given_field_gen_class(const string &_arg_name, bool _group, const string &_long_opt) :
30 arg_name (_arg_name), group (_group), long_opt (_long_opt)
35 generate_string(const string &s, ostream &stream, unsigned int indent)
37 if (!indent || s.find('\n') == string::npos)
43 string::size_type pos;
44 string::size_type start = 0;
45 string ind (indent, ' ');
46 while ( (pos=s.find('\n', start)) != string::npos)
48 stream << s.substr (start, (pos+1)-start);
50 if (start+1 <= s.size ())
53 if (start+1 <= s.size ())
54 stream << s.substr (start);
57 void set_arg_name(const string &_arg_name)
62 void set_group(bool _group)
67 void set_long_opt(const string &_long_opt)
72 void generate_given_field(ostream &stream, unsigned int indent = 0);
76 #endif // GIVEN_FIELD_GEN_CLASS_H