]> Creatis software - clitk.git/blob - utilities/gengetopt/skels/check_modes.h
auto generate dicom file UIDs when new series/study is specified
[clitk.git] / utilities / gengetopt / skels / check_modes.h
1 /*
2  * File automatically generated by
3  * gengen 1.4.1 by Lorenzo Bettini 
4  * http://www.gnu.org/software/gengen
5  */
6
7 #ifndef CHECK_MODES_GEN_CLASS_H
8 #define CHECK_MODES_GEN_CLASS_H
9
10 #include <string>
11 #include <iostream>
12
13 using std::string;
14 using std::ostream;
15
16 class check_modes_gen_class
17 {
18  protected:
19   string mode1_given_fields;
20   string mode1_name;
21   string mode1_options;
22   string mode2_given_fields;
23   string mode2_name;
24   string mode2_options;
25
26  public:
27   check_modes_gen_class()
28   {
29   }
30   
31   check_modes_gen_class(const string &_mode1_given_fields, const string &_mode1_name, const string &_mode1_options, const string &_mode2_given_fields, const string &_mode2_name, const string &_mode2_options) :
32     mode1_given_fields (_mode1_given_fields), mode1_name (_mode1_name), mode1_options (_mode1_options), mode2_given_fields (_mode2_given_fields), mode2_name (_mode2_name), mode2_options (_mode2_options)
33   {
34   }
35
36   static void
37   generate_string(const string &s, ostream &stream, unsigned int indent)
38   {
39     if (!indent || s.find('\n') == string::npos)
40       {
41         stream << s;
42         return;
43       }
44
45     string::size_type pos;
46     string::size_type start = 0;
47     string ind (indent, ' ');
48     while ( (pos=s.find('\n', start)) != string::npos)
49       {
50         stream << s.substr (start, (pos+1)-start);
51         start = pos+1;
52         if (start+1 <= s.size ())
53           stream << ind;
54       }
55     if (start+1 <= s.size ())
56       stream << s.substr (start);
57   }
58
59   void set_mode1_given_fields(const string &_mode1_given_fields)
60   {
61     mode1_given_fields = _mode1_given_fields;
62   }
63
64   void set_mode1_name(const string &_mode1_name)
65   {
66     mode1_name = _mode1_name;
67   }
68
69   void set_mode1_options(const string &_mode1_options)
70   {
71     mode1_options = _mode1_options;
72   }
73
74   void set_mode2_given_fields(const string &_mode2_given_fields)
75   {
76     mode2_given_fields = _mode2_given_fields;
77   }
78
79   void set_mode2_name(const string &_mode2_name)
80   {
81     mode2_name = _mode2_name;
82   }
83
84   void set_mode2_options(const string &_mode2_options)
85   {
86     mode2_options = _mode2_options;
87   }
88
89   void generate_check_modes(ostream &stream, unsigned int indent = 0);
90   
91 };
92
93 #endif // CHECK_MODES_GEN_CLASS_H