1 /** @file RNAparconv_cmdl.h
2 * @brief The header file for the command line option parser
3 * generated by GNU Gengetopt version 2.22.5
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 */
8 #ifndef RNAPARCONV_CMDL_H
9 #define RNAPARCONV_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNAPARCONV_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPARCONV_CMDLINE_PARSER_PACKAGE "RNAparconv"
27 #ifndef RNAPARCONV_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAPARCONV_CMDLINE_PARSER_PACKAGE_NAME "RNAparconv"
32 #ifndef RNAPARCONV_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPARCONV_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAparconv_args_info
40 const char *help_help; /**< @brief Print help and exit help description. */
41 const char *full_help_help; /**< @brief Print help, including hidden options, and exit help description. */
42 const char *version_help; /**< @brief Print version and exit help description. */
43 char * output_arg; /**< @brief Specify an output file name. If argument is missing the converted energy parameters are printed to 'stdout'.
46 char * output_orig; /**< @brief Specify an output file name. If argument is missing the converted energy parameters are printed to 'stdout'.
48 original value given at command line. */
49 const char *output_help; /**< @brief Specify an output file name. If argument is missing the converted energy parameters are printed to 'stdout'.
52 char * input_arg; /**< @brief Specify an input file name. If argument is missing the energy parameter input can be supplied via 'stdin'.
55 char * input_orig; /**< @brief Specify an input file name. If argument is missing the energy parameter input can be supplied via 'stdin'.
57 original value given at command line. */
58 const char *input_help; /**< @brief Specify an input file name. If argument is missing the energy parameter input can be supplied via 'stdin'.
61 int vanilla_flag; /**< @brief Print just as much as needed to represent the given energy parameters data set.
62 This option overrides all other output settings!
65 const char *vanilla_help; /**< @brief Print just as much as needed to represent the given energy parameters data set.
66 This option overrides all other output settings!
69 int dump_flag; /**< @brief Just dump Vienna 1.8.4 energy parameters in format used since 2.0.
70 This option skips any energy parameter input!
73 const char *dump_help; /**< @brief Just dump Vienna 1.8.4 energy parameters in format used since 2.0.
74 This option skips any energy parameter input!
77 int silent_flag; /**< @brief Print just energy parameters and appropriate comment lines but suppress all other output
80 const char *silent_help; /**< @brief Print just energy parameters and appropriate comment lines but suppress all other output
83 int without_HairpinE_flag; /**< @brief Do not print converted hairpin energies and enthalpies
86 const char *without_HairpinE_help; /**< @brief Do not print converted hairpin energies and enthalpies
89 int without_StackE_flag; /**< @brief Do not print converted stacking energies and enthalpies
92 const char *without_StackE_help; /**< @brief Do not print converted stacking energies and enthalpies
95 int without_IntE_flag; /**< @brief Do not print converted interior loop energies, enthalpies and asymetry factors
98 const char *without_IntE_help; /**< @brief Do not print converted interior loop energies, enthalpies and asymetry factors
101 int without_BulgeE_flag; /**< @brief Do not print converted bulge loop energies and enthalpies
104 const char *without_BulgeE_help; /**< @brief Do not print converted bulge loop energies and enthalpies
107 int without_MultiE_flag; /**< @brief Do not print converted multi loop energies and enthalpies
110 const char *without_MultiE_help; /**< @brief Do not print converted multi loop energies and enthalpies
113 int without_MismatchE_flag; /**< @brief Do not print converted exterior loop mismatch energies and enthalpies
116 const char *without_MismatchE_help; /**< @brief Do not print converted exterior loop mismatch energies and enthalpies
119 int without_MismatchH_flag; /**< @brief Do not print converted hairpin mismatch energies and enthalpies
122 const char *without_MismatchH_help; /**< @brief Do not print converted hairpin mismatch energies and enthalpies
125 int without_MismatchI_flag; /**< @brief Do not print converted interior loop mismatch energies and enthalpies
128 const char *without_MismatchI_help; /**< @brief Do not print converted interior loop mismatch energies and enthalpies
131 int without_MismatchM_flag; /**< @brief Do not print converted multi loop mismatch energies and enthalpies
134 const char *without_MismatchM_help; /**< @brief Do not print converted multi loop mismatch energies and enthalpies
137 int without_Dangle5_flag; /**< @brief Do not print converted 5' dangle energies and enthalpies
140 const char *without_Dangle5_help; /**< @brief Do not print converted 5' dangle energies and enthalpies
143 int without_Dangle3_flag; /**< @brief Do not print converted 3' dangle energies and enthalpies
146 const char *without_Dangle3_help; /**< @brief Do not print converted 3' dangle energies and enthalpies
149 int without_Misc_flag; /**< @brief Do not print converted Misc energies and enthalpies (TerminalAU, DuplexInit, lxc)
152 const char *without_Misc_help; /**< @brief Do not print converted Misc energies and enthalpies (TerminalAU, DuplexInit, lxc)
156 unsigned int help_given ; /**< @brief Whether help was given. */
157 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
158 unsigned int version_given ; /**< @brief Whether version was given. */
159 unsigned int output_given ; /**< @brief Whether output was given. */
160 unsigned int input_given ; /**< @brief Whether input was given. */
161 unsigned int vanilla_given ; /**< @brief Whether vanilla was given. */
162 unsigned int dump_given ; /**< @brief Whether dump was given. */
163 unsigned int silent_given ; /**< @brief Whether silent was given. */
164 unsigned int without_HairpinE_given ; /**< @brief Whether without-HairpinE was given. */
165 unsigned int without_StackE_given ; /**< @brief Whether without-StackE was given. */
166 unsigned int without_IntE_given ; /**< @brief Whether without-IntE was given. */
167 unsigned int without_BulgeE_given ; /**< @brief Whether without-BulgeE was given. */
168 unsigned int without_MultiE_given ; /**< @brief Whether without-MultiE was given. */
169 unsigned int without_MismatchE_given ; /**< @brief Whether without-MismatchE was given. */
170 unsigned int without_MismatchH_given ; /**< @brief Whether without-MismatchH was given. */
171 unsigned int without_MismatchI_given ; /**< @brief Whether without-MismatchI was given. */
172 unsigned int without_MismatchM_given ; /**< @brief Whether without-MismatchM was given. */
173 unsigned int without_Dangle5_given ; /**< @brief Whether without-Dangle5 was given. */
174 unsigned int without_Dangle3_given ; /**< @brief Whether without-Dangle3 was given. */
175 unsigned int without_Misc_given ; /**< @brief Whether without-Misc was given. */
177 char **inputs ; /**< @brief unamed options (options without names) */
178 unsigned inputs_num ; /**< @brief unamed options number */
181 /** @brief The additional parameters to pass to parser functions */
182 struct RNAparconv_cmdline_parser_params
184 int override; /**< @brief whether to override possibly already present options (default 0) */
185 int initialize; /**< @brief whether to initialize the option structure RNAparconv_args_info (default 1) */
186 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
187 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAparconv_args_info (default 0) */
188 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
191 /** @brief the purpose string of the program */
192 extern const char *RNAparconv_args_info_purpose;
193 /** @brief the usage string of the program */
194 extern const char *RNAparconv_args_info_usage;
195 /** @brief all the lines making the help output */
196 extern const char *RNAparconv_args_info_help[];
197 /** @brief all the lines making the full help output (including hidden options) */
198 extern const char *RNAparconv_args_info_full_help[];
201 * The command line parser
202 * @param argc the number of command line options
203 * @param argv the command line options
204 * @param args_info the structure where option information will be stored
205 * @return 0 if everything went fine, NON 0 if an error took place
207 int RNAparconv_cmdline_parser (int argc, char **argv,
208 struct RNAparconv_args_info *args_info);
211 * The command line parser (version with additional parameters - deprecated)
212 * @param argc the number of command line options
213 * @param argv the command line options
214 * @param args_info the structure where option information will be stored
215 * @param override whether to override possibly already present options
216 * @param initialize whether to initialize the option structure my_args_info
217 * @param check_required whether to check that all required options were provided
218 * @return 0 if everything went fine, NON 0 if an error took place
219 * @deprecated use RNAparconv_cmdline_parser_ext() instead
221 int RNAparconv_cmdline_parser2 (int argc, char **argv,
222 struct RNAparconv_args_info *args_info,
223 int override, int initialize, int check_required);
226 * The command line parser (version with additional parameters)
227 * @param argc the number of command line options
228 * @param argv the command line options
229 * @param args_info the structure where option information will be stored
230 * @param params additional parameters for the parser
231 * @return 0 if everything went fine, NON 0 if an error took place
233 int RNAparconv_cmdline_parser_ext (int argc, char **argv,
234 struct RNAparconv_args_info *args_info,
235 struct RNAparconv_cmdline_parser_params *params);
238 * Save the contents of the option struct into an already open FILE stream.
239 * @param outfile the stream where to dump options
240 * @param args_info the option struct to dump
241 * @return 0 if everything went fine, NON 0 if an error took place
243 int RNAparconv_cmdline_parser_dump(FILE *outfile,
244 struct RNAparconv_args_info *args_info);
247 * Save the contents of the option struct into a (text) file.
248 * This file can be read by the config file parser (if generated by gengetopt)
249 * @param filename the file where to save
250 * @param args_info the option struct to save
251 * @return 0 if everything went fine, NON 0 if an error took place
253 int RNAparconv_cmdline_parser_file_save(const char *filename,
254 struct RNAparconv_args_info *args_info);
259 void RNAparconv_cmdline_parser_print_help(void);
261 * Print the full help (including hidden options)
263 void RNAparconv_cmdline_parser_print_full_help(void);
267 void RNAparconv_cmdline_parser_print_version(void);
270 * Initializes all the fields a RNAparconv_cmdline_parser_params structure
271 * to their default values
272 * @param params the structure to initialize
274 void RNAparconv_cmdline_parser_params_init(struct RNAparconv_cmdline_parser_params *params);
277 * Allocates dynamically a RNAparconv_cmdline_parser_params structure and initializes
278 * all its fields to their default values
279 * @return the created and initialized RNAparconv_cmdline_parser_params structure
281 struct RNAparconv_cmdline_parser_params *RNAparconv_cmdline_parser_params_create(void);
284 * Initializes the passed RNAparconv_args_info structure's fields
285 * (also set default values for options that have a default)
286 * @param args_info the structure to initialize
288 void RNAparconv_cmdline_parser_init (struct RNAparconv_args_info *args_info);
290 * Deallocates the string fields of the RNAparconv_args_info structure
291 * (but does not deallocate the structure itself)
292 * @param args_info the structure to deallocate
294 void RNAparconv_cmdline_parser_free (struct RNAparconv_args_info *args_info);
297 * Checks that all the required options were specified
298 * @param args_info the structure to check
299 * @param prog_name the name of the program that will be used to print
303 int RNAparconv_cmdline_parser_required (struct RNAparconv_args_info *args_info,
304 const char *prog_name);
309 #endif /* __cplusplus */
310 #endif /* RNAPARCONV_CMDL_H */