2 * File automatically generated by
3 * gengen 1.3 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef GROUP_COUNTER_GEN_CLASS_H
8 #define GROUP_COUNTER_GEN_CLASS_H
16 class group_counter_gen_class
23 group_counter_gen_class()
27 group_counter_gen_class(const string &_group_name, const string &_name) :
28 group_name (_group_name), name (_name)
33 generate_string(const string &s, ostream &stream, unsigned int indent)
35 if (!indent || s.find('\n') == string::npos)
41 string::size_type pos;
42 string::size_type start = 0;
43 string ind (indent, ' ');
44 while ( (pos=s.find('\n', start)) != string::npos)
46 stream << s.substr (start, (pos+1)-start);
48 if (start+1 <= s.size ())
51 if (start+1 <= s.size ())
52 stream << s.substr (start);
55 void set_group_name(const string &_group_name)
57 group_name = _group_name;
60 void set_name(const string &_name)
65 void generate_group_counter(ostream &stream, unsigned int indent = 0);
69 #endif // GROUP_COUNTER_GEN_CLASS_H