2 * File automatically generated by
3 * gengen 1.4.1 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef CHECK_MODES_GEN_CLASS_H
8 #define CHECK_MODES_GEN_CLASS_H
16 class check_modes_gen_class
19 string mode1_given_fields;
22 string mode2_given_fields;
27 check_modes_gen_class()
31 check_modes_gen_class(const string &_mode1_given_fields, const string &_mode1_name, const string &_mode1_options, const string &_mode2_given_fields, const string &_mode2_name, const string &_mode2_options) :
32 mode1_given_fields (_mode1_given_fields), mode1_name (_mode1_name), mode1_options (_mode1_options), mode2_given_fields (_mode2_given_fields), mode2_name (_mode2_name), mode2_options (_mode2_options)
37 generate_string(const string &s, ostream &stream, unsigned int indent)
39 if (!indent || s.find('\n') == string::npos)
45 string::size_type pos;
46 string::size_type start = 0;
47 string ind (indent, ' ');
48 while ( (pos=s.find('\n', start)) != string::npos)
50 stream << s.substr (start, (pos+1)-start);
52 if (start+1 <= s.size ())
55 if (start+1 <= s.size ())
56 stream << s.substr (start);
59 void set_mode1_given_fields(const string &_mode1_given_fields)
61 mode1_given_fields = _mode1_given_fields;
64 void set_mode1_name(const string &_mode1_name)
66 mode1_name = _mode1_name;
69 void set_mode1_options(const string &_mode1_options)
71 mode1_options = _mode1_options;
74 void set_mode2_given_fields(const string &_mode2_given_fields)
76 mode2_given_fields = _mode2_given_fields;
79 void set_mode2_name(const string &_mode2_name)
81 mode2_name = _mode2_name;
84 void set_mode2_options(const string &_mode2_options)
86 mode2_options = _mode2_options;
89 void generate_check_modes(ostream &stream, unsigned int indent = 0);
93 #endif // CHECK_MODES_GEN_CLASS_H