]> Creatis software - clitk.git/blob - vv/tools_ggo/clitkMIP_ggo.h
Add _ggo files for static compilation with .pro file
[clitk.git] / vv / tools_ggo / clitkMIP_ggo.h
1 /** @file clitkMIP_ggo.h
2  *  @brief The header file for the command line option parser
3  *  generated by GNU Gengetopt version 2.22
4  *  http://www.gnu.org/software/gengetopt.
5  *  DO NOT modify this file, since it can be overwritten
6  *  @author GNU Gengetopt by Lorenzo Bettini */
7
8 #ifndef CLITKMIP_GGO_H
9 #define CLITKMIP_GGO_H
10
11 /* If we use autoconf.  */
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15
16 #include <stdio.h> /* for FILE */
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21
22 #ifndef CMDLINE_PARSER_CLITKMIP_PACKAGE
23 /** @brief the program name */
24 #define CMDLINE_PARSER_CLITKMIP_PACKAGE "clitkMIP"
25 #endif
26
27 #ifndef CMDLINE_PARSER_CLITKMIP_VERSION
28 /** @brief the program version */
29 #define CMDLINE_PARSER_CLITKMIP_VERSION "1.0"
30 #endif
31
32 /** @brief Where the command line options are stored */
33 struct args_info_clitkMIP
34 {
35   const char *help_help; /**< @brief Print help and exit help description.  */
36   const char *version_help; /**< @brief Print version and exit help description.  */
37   char * config_arg;    /**< @brief Config file.  */
38   char * config_orig;   /**< @brief Config file original value given at command line.  */
39   const char *config_help; /**< @brief Config file help description.  */
40   int verbose_flag;     /**< @brief Verbose (default=off).  */
41   const char *verbose_help; /**< @brief Verbose help description.  */
42   int imagetypes_flag;  /**< @brief Display allowed image types (default=off).  */
43   const char *imagetypes_help; /**< @brief Display allowed image types help description.  */
44   char * input_arg;     /**< @brief Input image filename.  */
45   char * input_orig;    /**< @brief Input image filename original value given at command line.  */
46   const char *input_help; /**< @brief Input image filename help description.  */
47   char * output_arg;    /**< @brief Output image filename.  */
48   char * output_orig;   /**< @brief Output image filename original value given at command line.  */
49   const char *output_help; /**< @brief Output image filename help description.  */
50   int dimension_arg;    /**< @brief Dimension along which to projetct.  */
51   char * dimension_orig;        /**< @brief Dimension along which to projetct original value given at command line.  */
52   const char *dimension_help; /**< @brief Dimension along which to projetct help description.  */
53   
54   unsigned int help_given ;     /**< @brief Whether help was given.  */
55   unsigned int version_given ;  /**< @brief Whether version was given.  */
56   unsigned int config_given ;   /**< @brief Whether config was given.  */
57   unsigned int verbose_given ;  /**< @brief Whether verbose was given.  */
58   unsigned int imagetypes_given ;       /**< @brief Whether imagetypes was given.  */
59   unsigned int input_given ;    /**< @brief Whether input was given.  */
60   unsigned int output_given ;   /**< @brief Whether output was given.  */
61   unsigned int dimension_given ;        /**< @brief Whether dimension was given.  */
62
63   char **inputs ; /**< @brief unamed options (options without names) */
64   unsigned inputs_num ; /**< @brief unamed options number */
65 } ;
66
67 /** @brief The additional parameters to pass to parser functions */
68 struct cmdline_parser_clitkMIP_params
69 {
70   int override; /**< @brief whether to override possibly already present options (default 0) */
71   int initialize; /**< @brief whether to initialize the option structure args_info_clitkMIP (default 1) */
72   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
73   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure args_info_clitkMIP (default 0) */
74   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
75 } ;
76
77 /** @brief the purpose string of the program */
78 extern const char *args_info_clitkMIP_purpose;
79 /** @brief the usage string of the program */
80 extern const char *args_info_clitkMIP_usage;
81 /** @brief all the lines making the help output */
82 extern const char *args_info_clitkMIP_help[];
83
84 /**
85  * The command line parser
86  * @param argc the number of command line options
87  * @param argv the command line options
88  * @param args_info the structure where option information will be stored
89  * @return 0 if everything went fine, NON 0 if an error took place
90  */
91 int cmdline_parser_clitkMIP (int argc, char * const *argv,
92   struct args_info_clitkMIP *args_info);
93
94 /**
95  * The command line parser (version with additional parameters - deprecated)
96  * @param argc the number of command line options
97  * @param argv the command line options
98  * @param args_info the structure where option information will be stored
99  * @param override whether to override possibly already present options
100  * @param initialize whether to initialize the option structure my_args_info
101  * @param check_required whether to check that all required options were provided
102  * @return 0 if everything went fine, NON 0 if an error took place
103  * @deprecated use cmdline_parser_clitkMIP_ext() instead
104  */
105 int cmdline_parser_clitkMIP2 (int argc, char * const *argv,
106   struct args_info_clitkMIP *args_info,
107   int override, int initialize, int check_required);
108
109 /**
110  * The command line parser (version with additional parameters)
111  * @param argc the number of command line options
112  * @param argv the command line options
113  * @param args_info the structure where option information will be stored
114  * @param params additional parameters for the parser
115  * @return 0 if everything went fine, NON 0 if an error took place
116  */
117 int cmdline_parser_clitkMIP_ext (int argc, char * const *argv,
118   struct args_info_clitkMIP *args_info,
119   struct cmdline_parser_clitkMIP_params *params);
120
121 /**
122  * Save the contents of the option struct into an already open FILE stream.
123  * @param outfile the stream where to dump options
124  * @param args_info the option struct to dump
125  * @return 0 if everything went fine, NON 0 if an error took place
126  */
127 int cmdline_parser_clitkMIP_dump(FILE *outfile,
128   struct args_info_clitkMIP *args_info);
129
130 /**
131  * Save the contents of the option struct into a (text) file.
132  * This file can be read by the config file parser (if generated by gengetopt)
133  * @param filename the file where to save
134  * @param args_info the option struct to save
135  * @return 0 if everything went fine, NON 0 if an error took place
136  */
137 int cmdline_parser_clitkMIP_file_save(const char *filename,
138   struct args_info_clitkMIP *args_info);
139
140 /**
141  * Print the help
142  */
143 void cmdline_parser_clitkMIP_print_help(void);
144 /**
145  * Print the version
146  */
147 void cmdline_parser_clitkMIP_print_version(void);
148
149 /**
150  * Initializes all the fields a cmdline_parser_clitkMIP_params structure 
151  * to their default values
152  * @param params the structure to initialize
153  */
154 void cmdline_parser_clitkMIP_params_init(struct cmdline_parser_clitkMIP_params *params);
155
156 /**
157  * Allocates dynamically a cmdline_parser_clitkMIP_params structure and initializes
158  * all its fields to their default values
159  * @return the created and initialized cmdline_parser_clitkMIP_params structure
160  */
161 struct cmdline_parser_clitkMIP_params *cmdline_parser_clitkMIP_params_create(void);
162
163 /**
164  * Initializes the passed args_info_clitkMIP structure's fields
165  * (also set default values for options that have a default)
166  * @param args_info the structure to initialize
167  */
168 void cmdline_parser_clitkMIP_init (struct args_info_clitkMIP *args_info);
169 /**
170  * Deallocates the string fields of the args_info_clitkMIP structure
171  * (but does not deallocate the structure itself)
172  * @param args_info the structure to deallocate
173  */
174 void cmdline_parser_clitkMIP_free (struct args_info_clitkMIP *args_info);
175
176 /**
177  * The config file parser (deprecated version)
178  * @param filename the name of the config file
179  * @param args_info the structure where option information will be stored
180  * @param override whether to override possibly already present options
181  * @param initialize whether to initialize the option structure my_args_info
182  * @param check_required whether to check that all required options were provided
183  * @return 0 if everything went fine, NON 0 if an error took place
184  * @deprecated use cmdline_parser_clitkMIP_config_file() instead
185  */
186 int cmdline_parser_clitkMIP_configfile (char * const filename,
187   struct args_info_clitkMIP *args_info,
188   int override, int initialize, int check_required);
189
190 /**
191  * The config file parser
192  * @param filename the name of the config file
193  * @param args_info the structure where option information will be stored
194  * @param params additional parameters for the parser
195  * @return 0 if everything went fine, NON 0 if an error took place
196  */
197 int cmdline_parser_clitkMIP_config_file (char * const filename,
198   struct args_info_clitkMIP *args_info,
199   struct cmdline_parser_clitkMIP_params *params);
200
201 /**
202  * Checks that all the required options were specified
203  * @param args_info the structure to check
204  * @param prog_name the name of the program that will be used to print
205  *   possible errors
206  * @return
207  */
208 int cmdline_parser_clitkMIP_required (struct args_info_clitkMIP *args_info,
209   const char *prog_name);
210
211
212 #ifdef __cplusplus
213 }
214 #endif /* __cplusplus */
215 #endif /* CLITKMIP_GGO_H */