2 * File automatically generated by
3 * gengen 1.4.2 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef ENUM_DECL_GEN_CLASS_H
8 #define ENUM_DECL_GEN_CLASS_H
16 class enum_decl_gen_class
27 enum_decl_gen_class(const string &_enum_values, const string &_var_arg) :
28 enum_values (_enum_values), var_arg (_var_arg)
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_enum_values(const string &_enum_values)
57 enum_values = _enum_values;
60 void set_var_arg(const string &_var_arg)
65 void generate_enum_decl(ostream &stream, unsigned int indent = 0);
69 #endif // ENUM_DECL_GEN_CLASS_H