/* * File automatically generated by * gengen 1.0 by Lorenzo Bettini * http://www.gnu.org/software/gengen */ #ifndef GENERIC_OPTION_GROUP_GEN_CLASS_H #define GENERIC_OPTION_GROUP_GEN_CLASS_H #include #include using std::string; using std::ostream; class generic_option_group_gen_class { protected: string group_var_name; public: generic_option_group_gen_class() { } generic_option_group_gen_class(const string &_group_var_name) : group_var_name (_group_var_name) { } static void generate_string(const string &s, ostream &stream, unsigned int indent) { if (!indent || s.find('\n') == string::npos) { stream << s; return; } string::size_type pos; string::size_type start = 0; string ind (indent, ' '); while ( (pos=s.find('\n', start)) != string::npos) { stream << s.substr (start, (pos+1)-start); start = pos+1; if (start+1 <= s.size ()) stream << ind; } if (start+1 <= s.size ()) stream << s.substr (start); } void set_group_var_name(const string &_group_var_name) { group_var_name = _group_var_name; } void generate_generic_option_group(ostream &stream, unsigned int indent = 0); }; #endif // GENERIC_OPTION_GROUP_GEN_CLASS_H