]> Creatis software - clitk.git/blob - utilities/gengetopt/skels/reset_group.h
Sync gengetopt cmake files with rtk
[clitk.git] / utilities / gengetopt / skels / reset_group.h
1 /*
2  * File automatically generated by
3  * gengen 1.2 by Lorenzo Bettini 
4  * http://www.gnu.org/software/gengen
5  */
6
7 #ifndef RESET_GROUP_GEN_CLASS_H
8 #define RESET_GROUP_GEN_CLASS_H
9
10 #include <string>
11 #include <iostream>
12
13 using std::string;
14 using std::ostream;
15
16 class reset_group_gen_class
17 {
18  protected:
19   string args_info;
20   string body;
21   string name;
22
23  public:
24   reset_group_gen_class()
25   {
26   }
27   
28   reset_group_gen_class(const string &_args_info, const string &_body, const string &_name) :
29     args_info (_args_info), body (_body), name (_name)
30   {
31   }
32
33   static void
34   generate_string(const string &s, ostream &stream, unsigned int indent)
35   {
36     if (!indent || s.find('\n') == string::npos)
37       {
38         stream << s;
39         return;
40       }
41
42     string::size_type pos;
43     string::size_type start = 0;
44     string ind (indent, ' ');
45     while ( (pos=s.find('\n', start)) != string::npos)
46       {
47         stream << s.substr (start, (pos+1)-start);
48         start = pos+1;
49         if (start+1 <= s.size ())
50           stream << ind;
51       }
52     if (start+1 <= s.size ())
53       stream << s.substr (start);
54   }
55
56   void set_args_info(const string &_args_info)
57   {
58     args_info = _args_info;
59   }
60
61   void set_body(const string &_body)
62   {
63     body = _body;
64   }
65
66   void set_name(const string &_name)
67   {
68     name = _name;
69   }
70
71   void generate_reset_group(ostream &stream, unsigned int indent = 0);
72   
73 };
74
75 #endif // RESET_GROUP_GEN_CLASS_H