2
* File automatically generated by
3
* gengen 1.1 by Lorenzo Bettini
4
* http://www.gnu.org/software/gengen
7
#ifndef MULTIPLE_OPTION_GEN_CLASS_H
8
#define MULTIPLE_OPTION_GEN_CLASS_H
16
class multiple_option_gen_class
21
string group_var_name;
22
bool has_short_option;
24
string option_comment;
25
bool option_has_group;
27
bool option_has_values;
29
string option_var_name;
30
string package_var_name;
36
multiple_option_gen_class() :
37
has_short_option (false), option_has_group (false), option_has_type (false), option_has_values (false)
41
multiple_option_gen_class(const string &_defaultval, const string &_gen_else, const string &_group_var_name, bool _has_short_option, const string &_long_option, const string &_option_comment, bool _option_has_group, bool _option_has_type, bool _option_has_values, const string &_option_values, const string &_option_var_name, const string &_package_var_name, const string &_short_option, const string &_type, const string &_update_arg) :
42
defaultval (_defaultval), gen_else (_gen_else), group_var_name (_group_var_name), has_short_option (_has_short_option), long_option (_long_option), option_comment (_option_comment), option_has_group (_option_has_group), option_has_type (_option_has_type), option_has_values (_option_has_values), option_values (_option_values), option_var_name (_option_var_name), package_var_name (_package_var_name), short_option (_short_option), type (_type), update_arg (_update_arg)
47
generate_string(const string &s, ostream &stream, unsigned int indent)
49
if (!indent || s.find('\n') == string::npos)
55
string::size_type pos;
56
string::size_type start = 0;
57
string ind (indent, ' ');
58
while ( (pos=s.find('\n', start)) != string::npos)
60
stream << s.substr (start, (pos+1)-start);
62
if (start+1 <= s.size ())
65
if (start+1 <= s.size ())
66
stream << s.substr (start);
69
void set_defaultval(const string &_defaultval)
71
defaultval = _defaultval;
74
void set_gen_else(const string &_gen_else)
79
void set_group_var_name(const string &_group_var_name)
81
group_var_name = _group_var_name;
84
void set_has_short_option(bool _has_short_option)
86
has_short_option = _has_short_option;
89
void set_long_option(const string &_long_option)
91
long_option = _long_option;
94
void set_option_comment(const string &_option_comment)
96
option_comment = _option_comment;
99
void set_option_has_group(bool _option_has_group)
101
option_has_group = _option_has_group;
104
void set_option_has_type(bool _option_has_type)
106
option_has_type = _option_has_type;
109
void set_option_has_values(bool _option_has_values)
111
option_has_values = _option_has_values;
114
void set_option_values(const string &_option_values)
116
option_values = _option_values;
119
void set_option_var_name(const string &_option_var_name)
121
option_var_name = _option_var_name;
124
void set_package_var_name(const string &_package_var_name)
126
package_var_name = _package_var_name;
129
void set_short_option(const string &_short_option)
131
short_option = _short_option;
134
void set_type(const string &_type)
139
void set_update_arg(const string &_update_arg)
141
update_arg = _update_arg;
144
void generate_multiple_option(ostream &stream, unsigned int indent = 0);
148
#endif // MULTIPLE_OPTION_GEN_CLASS_H