X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cmake%2Fgengetopt%2Fskels%2Fupdate_given.h;fp=cmake%2Fgengetopt%2Fskels%2Fupdate_given.h;h=29f5c8d731bf663c798b52b1c3eb5d64a3ee3c79;hb=91eacd1b09351ab508c9688f1071c5ea1e2b01b8;hp=0000000000000000000000000000000000000000;hpb=4e01ca1a00455f4bacc778aca446bbdf2bc1c74d;p=clitk.git diff --git a/cmake/gengetopt/skels/update_given.h b/cmake/gengetopt/skels/update_given.h new file mode 100644 index 0000000..29f5c8d --- /dev/null +++ b/cmake/gengetopt/skels/update_given.h @@ -0,0 +1,63 @@ +/* + * File automatically generated by + * gengen 1.2 by Lorenzo Bettini + * http://www.gnu.org/software/gengen + */ + +#ifndef UPDATE_GIVEN_GEN_CLASS_H +#define UPDATE_GIVEN_GEN_CLASS_H + +#include +#include + +using std::string; +using std::ostream; + +class update_given_gen_class +{ + protected: + string option_var_name; + + public: + update_given_gen_class() + { + } + + update_given_gen_class(const string &_option_var_name) : + option_var_name (_option_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_option_var_name(const string &_option_var_name) + { + option_var_name = _option_var_name; + } + + void generate_update_given(ostream &stream, unsigned int indent = 0); + +}; + +#endif // UPDATE_GIVEN_GEN_CLASS_H