2 * File automatically generated by
3 * gengen 1.2 by Lorenzo Bettini
4 * http://www.gnu.org/software/gengen
7 #ifndef DEPENDANT_OPTION_GEN_CLASS_H
8 #define DEPENDANT_OPTION_GEN_CLASS_H
16 class dependant_option_gen_class
20 string dep_option_descr;
22 string option_var_name;
23 string package_var_name;
26 dependant_option_gen_class()
30 dependant_option_gen_class(const string &_dep_option, const string &_dep_option_descr, const string &_option_descr, const string &_option_var_name, const string &_package_var_name) :
31 dep_option (_dep_option), dep_option_descr (_dep_option_descr), option_descr (_option_descr), option_var_name (_option_var_name), package_var_name (_package_var_name)
36 generate_string(const string &s, ostream &stream, unsigned int indent)
38 if (!indent || s.find('\n') == string::npos)
44 string::size_type pos;
45 string::size_type start = 0;
46 string ind (indent, ' ');
47 while ( (pos=s.find('\n', start)) != string::npos)
49 stream << s.substr (start, (pos+1)-start);
51 if (start+1 <= s.size ())
54 if (start+1 <= s.size ())
55 stream << s.substr (start);
58 void set_dep_option(const string &_dep_option)
60 dep_option = _dep_option;
63 void set_dep_option_descr(const string &_dep_option_descr)
65 dep_option_descr = _dep_option_descr;
68 void set_option_descr(const string &_option_descr)
70 option_descr = _option_descr;
73 void set_option_var_name(const string &_option_var_name)
75 option_var_name = _option_var_name;
78 void set_package_var_name(const string &_package_var_name)
80 package_var_name = _package_var_name;
83 void generate_dependant_option(ostream &stream, unsigned int indent = 0);
87 #endif // DEPENDANT_OPTION_GEN_CLASS_H