1 /** @file RNApdist_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 RNAPDIST_CMDL_H
9 #define RNAPDIST_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNAPDIST_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPDIST_CMDLINE_PARSER_PACKAGE "RNApdist"
27 #ifndef RNAPDIST_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAPDIST_CMDLINE_PARSER_PACKAGE_NAME "RNApdist"
32 #ifndef RNAPDIST_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPDIST_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNApdist_args_info
40 const char *help_help; /**< @brief Print help and exit help description. */
41 const char *detailed_help_help; /**< @brief Print help, including all details and hidden options, and exit help description. */
42 const char *full_help_help; /**< @brief Print help, including hidden options, and exit help description. */
43 const char *version_help; /**< @brief Print version and exit help description. */
44 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
47 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
50 char * compare_arg; /**< @brief Specify the comparison directive.
52 char * compare_orig; /**< @brief Specify the comparison directive.
53 original value given at command line. */
54 const char *compare_help; /**< @brief Specify the comparison directive.
56 char * backtrack_arg; /**< @brief Print an \"alignment\" with gaps of the profiles. The aligned structures are written to <filename>, if specified.
58 char * backtrack_orig; /**< @brief Print an \"alignment\" with gaps of the profiles. The aligned structures are written to <filename>, if specified.
59 original value given at command line. */
60 const char *backtrack_help; /**< @brief Print an \"alignment\" with gaps of the profiles. The aligned structures are written to <filename>, if specified.
62 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
65 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
67 original value given at command line. */
68 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
71 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
74 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
77 int dangles_arg; /**< @brief set energy model for treatment of dangling bases
80 char * dangles_orig; /**< @brief set energy model for treatment of dangling bases
82 original value given at command line. */
83 const char *dangles_help; /**< @brief set energy model for treatment of dangling bases
86 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
88 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
90 int noGU_flag; /**< @brief Do not allow GU pairs
93 const char *noGU_help; /**< @brief Do not allow GU pairs
96 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
99 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
102 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
104 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
105 original value given at command line. */
106 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
108 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
110 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
111 original value given at command line. */
112 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
114 int energyModel_arg; /**< @brief Rarely used option to fold sequences from the artificial ABCD... alphabet, where A pairs B, C-D etc. Use the energy parameters for GC (-e 1) or AU (-e 2) pairs.
117 char * energyModel_orig; /**< @brief Rarely used option to fold sequences from the artificial ABCD... alphabet, where A pairs B, C-D etc. Use the energy parameters for GC (-e 1) or AU (-e 2) pairs.
119 original value given at command line. */
120 const char *energyModel_help; /**< @brief Rarely used option to fold sequences from the artificial ABCD... alphabet, where A pairs B, C-D etc. Use the energy parameters for GC (-e 1) or AU (-e 2) pairs.
124 unsigned int help_given ; /**< @brief Whether help was given. */
125 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
126 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
127 unsigned int version_given ; /**< @brief Whether version was given. */
128 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
129 unsigned int compare_given ; /**< @brief Whether compare was given. */
130 unsigned int backtrack_given ; /**< @brief Whether backtrack was given. */
131 unsigned int temp_given ; /**< @brief Whether temp was given. */
132 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
133 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
134 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
135 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
136 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
137 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
138 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
139 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
143 /** @brief The additional parameters to pass to parser functions */
144 struct RNApdist_cmdline_parser_params
146 int override; /**< @brief whether to override possibly already present options (default 0) */
147 int initialize; /**< @brief whether to initialize the option structure RNApdist_args_info (default 1) */
148 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
149 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNApdist_args_info (default 0) */
150 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
153 /** @brief the purpose string of the program */
154 extern const char *RNApdist_args_info_purpose;
155 /** @brief the usage string of the program */
156 extern const char *RNApdist_args_info_usage;
157 /** @brief all the lines making the help output */
158 extern const char *RNApdist_args_info_help[];
159 /** @brief all the lines making the full help output (including hidden options) */
160 extern const char *RNApdist_args_info_full_help[];
161 /** @brief all the lines making the detailed help output (including hidden options and details) */
162 extern const char *RNApdist_args_info_detailed_help[];
165 * The command line parser
166 * @param argc the number of command line options
167 * @param argv the command line options
168 * @param args_info the structure where option information will be stored
169 * @return 0 if everything went fine, NON 0 if an error took place
171 int RNApdist_cmdline_parser (int argc, char **argv,
172 struct RNApdist_args_info *args_info);
175 * The command line parser (version with additional parameters - deprecated)
176 * @param argc the number of command line options
177 * @param argv the command line options
178 * @param args_info the structure where option information will be stored
179 * @param override whether to override possibly already present options
180 * @param initialize whether to initialize the option structure my_args_info
181 * @param check_required whether to check that all required options were provided
182 * @return 0 if everything went fine, NON 0 if an error took place
183 * @deprecated use RNApdist_cmdline_parser_ext() instead
185 int RNApdist_cmdline_parser2 (int argc, char **argv,
186 struct RNApdist_args_info *args_info,
187 int override, int initialize, int check_required);
190 * The command line parser (version with additional parameters)
191 * @param argc the number of command line options
192 * @param argv the command line options
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 RNApdist_cmdline_parser_ext (int argc, char **argv,
198 struct RNApdist_args_info *args_info,
199 struct RNApdist_cmdline_parser_params *params);
202 * Save the contents of the option struct into an already open FILE stream.
203 * @param outfile the stream where to dump options
204 * @param args_info the option struct to dump
205 * @return 0 if everything went fine, NON 0 if an error took place
207 int RNApdist_cmdline_parser_dump(FILE *outfile,
208 struct RNApdist_args_info *args_info);
211 * Save the contents of the option struct into a (text) file.
212 * This file can be read by the config file parser (if generated by gengetopt)
213 * @param filename the file where to save
214 * @param args_info the option struct to save
215 * @return 0 if everything went fine, NON 0 if an error took place
217 int RNApdist_cmdline_parser_file_save(const char *filename,
218 struct RNApdist_args_info *args_info);
223 void RNApdist_cmdline_parser_print_help(void);
225 * Print the full help (including hidden options)
227 void RNApdist_cmdline_parser_print_full_help(void);
229 * Print the detailed help (including hidden options and details)
231 void RNApdist_cmdline_parser_print_detailed_help(void);
235 void RNApdist_cmdline_parser_print_version(void);
238 * Initializes all the fields a RNApdist_cmdline_parser_params structure
239 * to their default values
240 * @param params the structure to initialize
242 void RNApdist_cmdline_parser_params_init(struct RNApdist_cmdline_parser_params *params);
245 * Allocates dynamically a RNApdist_cmdline_parser_params structure and initializes
246 * all its fields to their default values
247 * @return the created and initialized RNApdist_cmdline_parser_params structure
249 struct RNApdist_cmdline_parser_params *RNApdist_cmdline_parser_params_create(void);
252 * Initializes the passed RNApdist_args_info structure's fields
253 * (also set default values for options that have a default)
254 * @param args_info the structure to initialize
256 void RNApdist_cmdline_parser_init (struct RNApdist_args_info *args_info);
258 * Deallocates the string fields of the RNApdist_args_info structure
259 * (but does not deallocate the structure itself)
260 * @param args_info the structure to deallocate
262 void RNApdist_cmdline_parser_free (struct RNApdist_args_info *args_info);
265 * Checks that all the required options were specified
266 * @param args_info the structure to check
267 * @param prog_name the name of the program that will be used to print
271 int RNApdist_cmdline_parser_required (struct RNApdist_args_info *args_info,
272 const char *prog_name);
274 extern const char *RNApdist_cmdline_parser_dangles_values[]; /**< @brief Possible values for dangles. */
279 #endif /* __cplusplus */
280 #endif /* RNAPDIST_CMDL_H */