2 * File automatically generated by
3 * gengen 1.2 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef FREE_LIST_GEN_CLASS_H
8 #define FREE_LIST_GEN_CLASS_H
16 class free_list_gen_class
23 free_list_gen_class() :
28 free_list_gen_class(const string &_list_name, bool _string_list) :
29 list_name (_list_name), string_list (_string_list)
34 generate_string(const string &s, ostream &stream, unsigned int indent)
36 if (!indent || s.find('\n') == string::npos)
42 string::size_type pos;
43 string::size_type start = 0;
44 string ind (indent, ' ');
45 while ( (pos=s.find('\n', start)) != string::npos)
47 stream << s.substr (start, (pos+1)-start);
49 if (start+1 <= s.size ())
52 if (start+1 <= s.size ())
53 stream << s.substr (start);
56 void set_list_name(const string &_list_name)
58 list_name = _list_name;
61 void set_string_list(bool _string_list)
63 string_list = _string_list;
66 void generate_free_list(ostream &stream, unsigned int indent = 0);
70 #endif // FREE_LIST_GEN_CLASS_H