WSTester updated to work plus hopefully all the other changes that need to go into...
[jabaws.git] / binaries / src / ViennaRNA / Progs / RNApdist_cmdl.h
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 */
7
8 #ifndef RNAPDIST_CMDL_H
9 #define RNAPDIST_CMDL_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 RNAPDIST_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPDIST_CMDLINE_PARSER_PACKAGE "RNApdist"
25 #endif
26
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"
30 #endif
31
32 #ifndef RNAPDIST_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPDIST_CMDLINE_PARSER_VERSION VERSION
35 #endif
36
37 /** @brief Where the command line options are stored */
38 struct RNApdist_args_info
39 {
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\"
45   
46  (default=off).  */
47   const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
48   
49  help description.  */
50   char * compare_arg;   /**< @brief Specify the comparison directive.
51  (default='p').  */
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.
55  help description.  */
56   char * backtrack_arg; /**< @brief Print an \"alignment\" with gaps of the profiles. The aligned structures are written to <filename>, if specified.
57  (default='none').  */
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.
61  help description.  */
62   double temp_arg;      /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
63   
64 .  */
65   char * temp_orig;     /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
66   
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.
69   
70  help description.  */
71   int noTetra_flag;     /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
72   
73  (default=off).  */
74   const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
75   
76  help description.  */
77   int dangles_arg;      /**< @brief set energy model for treatment of dangling bases
78   
79  (default='2').  */
80   char * dangles_orig;  /**< @brief set energy model for treatment of dangling bases
81   
82  original value given at command line.  */
83   const char *dangles_help; /**< @brief set energy model for treatment of dangling bases
84   
85  help description.  */
86   int noLP_flag;        /**< @brief Produce structures without lonely pairs (helices of length 1).
87  (default=off).  */
88   const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
89  help description.  */
90   int noGU_flag;        /**< @brief Do not allow GU pairs
91   
92  (default=off).  */
93   const char *noGU_help; /**< @brief Do not allow GU pairs
94   
95  help description.  */
96   int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
97   
98  (default=off).  */
99   const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
100   
101  help description.  */
102   char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
103 .  */
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.
107  help description.  */
108   char * nsp_arg;       /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
109 .  */
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.
113  help description.  */
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.
115   
116 .  */
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.
118   
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.
121   
122  help description.  */
123   
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.  */
140
141 } ;
142
143 /** @brief The additional parameters to pass to parser functions */
144 struct RNApdist_cmdline_parser_params
145 {
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) */
151 } ;
152
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[];
163
164 /**
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
170  */
171 int RNApdist_cmdline_parser (int argc, char **argv,
172   struct RNApdist_args_info *args_info);
173
174 /**
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
184  */
185 int RNApdist_cmdline_parser2 (int argc, char **argv,
186   struct RNApdist_args_info *args_info,
187   int override, int initialize, int check_required);
188
189 /**
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
196  */
197 int RNApdist_cmdline_parser_ext (int argc, char **argv,
198   struct RNApdist_args_info *args_info,
199   struct RNApdist_cmdline_parser_params *params);
200
201 /**
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
206  */
207 int RNApdist_cmdline_parser_dump(FILE *outfile,
208   struct RNApdist_args_info *args_info);
209
210 /**
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
216  */
217 int RNApdist_cmdline_parser_file_save(const char *filename,
218   struct RNApdist_args_info *args_info);
219
220 /**
221  * Print the help
222  */
223 void RNApdist_cmdline_parser_print_help(void);
224 /**
225  * Print the full help (including hidden options)
226  */
227 void RNApdist_cmdline_parser_print_full_help(void);
228 /**
229  * Print the detailed help (including hidden options and details)
230  */
231 void RNApdist_cmdline_parser_print_detailed_help(void);
232 /**
233  * Print the version
234  */
235 void RNApdist_cmdline_parser_print_version(void);
236
237 /**
238  * Initializes all the fields a RNApdist_cmdline_parser_params structure 
239  * to their default values
240  * @param params the structure to initialize
241  */
242 void RNApdist_cmdline_parser_params_init(struct RNApdist_cmdline_parser_params *params);
243
244 /**
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
248  */
249 struct RNApdist_cmdline_parser_params *RNApdist_cmdline_parser_params_create(void);
250
251 /**
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
255  */
256 void RNApdist_cmdline_parser_init (struct RNApdist_args_info *args_info);
257 /**
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
261  */
262 void RNApdist_cmdline_parser_free (struct RNApdist_args_info *args_info);
263
264 /**
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
268  *   possible errors
269  * @return
270  */
271 int RNApdist_cmdline_parser_required (struct RNApdist_args_info *args_info,
272   const char *prog_name);
273
274 extern const char *RNApdist_cmdline_parser_dangles_values[];  /**< @brief Possible values for dangles. */
275
276
277 #ifdef __cplusplus
278 }
279 #endif /* __cplusplus */
280 #endif /* RNAPDIST_CMDL_H */