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 */
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef CMDLINE_PARSER_CLITKMIP_PACKAGE
23 /** @brief the program name */
24 #define CMDLINE_PARSER_CLITKMIP_PACKAGE "clitkMIP"
27 #ifndef CMDLINE_PARSER_CLITKMIP_VERSION
28 /** @brief the program version */
29 #define CMDLINE_PARSER_CLITKMIP_VERSION "1.0"
32 /** @brief Where the command line options are stored */
33 struct args_info_clitkMIP
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. */
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. */
63 char **inputs ; /**< @brief unamed options (options without names) */
64 unsigned inputs_num ; /**< @brief unamed options number */
67 /** @brief The additional parameters to pass to parser functions */
68 struct cmdline_parser_clitkMIP_params
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) */
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[];
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
91 int cmdline_parser_clitkMIP (int argc, char * const *argv,
92 struct args_info_clitkMIP *args_info);
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
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);
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
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);
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
127 int cmdline_parser_clitkMIP_dump(FILE *outfile,
128 struct args_info_clitkMIP *args_info);
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
137 int cmdline_parser_clitkMIP_file_save(const char *filename,
138 struct args_info_clitkMIP *args_info);
143 void cmdline_parser_clitkMIP_print_help(void);
147 void cmdline_parser_clitkMIP_print_version(void);
150 * Initializes all the fields a cmdline_parser_clitkMIP_params structure
151 * to their default values
152 * @param params the structure to initialize
154 void cmdline_parser_clitkMIP_params_init(struct cmdline_parser_clitkMIP_params *params);
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
161 struct cmdline_parser_clitkMIP_params *cmdline_parser_clitkMIP_params_create(void);
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
168 void cmdline_parser_clitkMIP_init (struct args_info_clitkMIP *args_info);
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
174 void cmdline_parser_clitkMIP_free (struct args_info_clitkMIP *args_info);
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
186 int cmdline_parser_clitkMIP_configfile (char * const filename,
187 struct args_info_clitkMIP *args_info,
188 int override, int initialize, int check_required);
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
197 int cmdline_parser_clitkMIP_config_file (char * const filename,
198 struct args_info_clitkMIP *args_info,
199 struct cmdline_parser_clitkMIP_params *params);
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
208 int cmdline_parser_clitkMIP_required (struct args_info_clitkMIP *args_info,
209 const char *prog_name);
214 #endif /* __cplusplus */
215 #endif /* CLITKMIP_GGO_H */