2 * File automatically generated by
3 * gengen 1.2 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef MULTIPLE_FILL_ARRAY_GEN_CLASS_H
8 #define MULTIPLE_FILL_ARRAY_GEN_CLASS_H
16 class multiple_fill_array_gen_class
21 string option_var_name;
25 multiple_fill_array_gen_class()
29 multiple_fill_array_gen_class(const string &_arg_type, const string &_default_value, const string &_option_var_name, const string &_type) :
30 arg_type (_arg_type), default_value (_default_value), option_var_name (_option_var_name), type (_type)
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_type(const string &_arg_type)
62 void set_default_value(const string &_default_value)
64 default_value = _default_value;
67 void set_option_var_name(const string &_option_var_name)
69 option_var_name = _option_var_name;
72 void set_type(const string &_type)
77 void generate_multiple_fill_array(ostream &stream, unsigned int indent = 0);
81 #endif // MULTIPLE_FILL_ARRAY_GEN_CLASS_H