/* * File automatically generated by * gengen 1.4.2 by Lorenzo Bettini * http://www.gnu.org/software/gengen */ #ifndef HANDLE_VERSION_GEN_CLASS_H #define HANDLE_VERSION_GEN_CLASS_H #include #include using std::string; using std::ostream; class handle_version_gen_class { protected: string parser_name; bool short_opt; public: handle_version_gen_class() : short_opt (false) { } handle_version_gen_class(const string &_parser_name, bool _short_opt) : parser_name (_parser_name), short_opt (_short_opt) { } 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_parser_name(const string &_parser_name) { parser_name = _parser_name; } void set_short_opt(bool _short_opt) { short_opt = _short_opt; } void generate_handle_version(ostream &stream, unsigned int indent = 0); }; #endif // HANDLE_VERSION_GEN_CLASS_H