ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/staticProps/StaticPropsCmd.h
Revision: 1442
Committed: Mon May 10 17:28:26 2010 UTC (14 years, 11 months ago) by gezelter
Content type: text/plain
File size: 16009 byte(s)
Log Message:
Adding property set to svn entries

File Contents

# User Rev Content
1 gezelter 1390 /** @file StaticPropsCmd.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 tim 310
8     #ifndef STATICPROPSCMD_H
9     #define STATICPROPSCMD_H
10    
11     /* If we use autoconf. */
12     #ifdef HAVE_CONFIG_H
13     #include "config.h"
14     #endif
15    
16 gezelter 1390 #include <stdio.h> /* for FILE */
17    
18 tim 310 #ifdef __cplusplus
19     extern "C" {
20     #endif /* __cplusplus */
21    
22     #ifndef CMDLINE_PARSER_PACKAGE
23 gezelter 1390 /** @brief the program name */
24 tim 311 #define CMDLINE_PARSER_PACKAGE "StaticProps"
25 tim 310 #endif
26    
27     #ifndef CMDLINE_PARSER_VERSION
28 gezelter 1390 /** @brief the program version */
29 tim 310 #define CMDLINE_PARSER_VERSION "1.00"
30     #endif
31    
32 gezelter 1390 /** @brief Where the command line options are stored */
33 tim 543 struct gengetopt_args_info
34     {
35 gezelter 1390 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 * input_arg; /**< @brief input dump file. */
38     char * input_orig; /**< @brief input dump file original value given at command line. */
39     const char *input_help; /**< @brief input dump file help description. */
40     char * output_arg; /**< @brief output file name. */
41     char * output_orig; /**< @brief output file name original value given at command line. */
42     const char *output_help; /**< @brief output file name help description. */
43     int step_arg; /**< @brief process every n frame (default='1'). */
44     char * step_orig; /**< @brief process every n frame original value given at command line. */
45     const char *step_help; /**< @brief process every n frame help description. */
46     int nbins_arg; /**< @brief number of bins (general purpose) (default='100'). */
47     char * nbins_orig; /**< @brief number of bins (general purpose) original value given at command line. */
48     const char *nbins_help; /**< @brief number of bins (general purpose) help description. */
49     int nbins_x_arg; /**< @brief number of bins in x axis (default='100'). */
50     char * nbins_x_orig; /**< @brief number of bins in x axis original value given at command line. */
51     const char *nbins_x_help; /**< @brief number of bins in x axis help description. */
52     int nbins_y_arg; /**< @brief number of bins in y axis (default='100'). */
53     char * nbins_y_orig; /**< @brief number of bins in y axis original value given at command line. */
54     const char *nbins_y_help; /**< @brief number of bins in y axis help description. */
55 gezelter 1440 int nbins_z_arg; /**< @brief number of bins in z axis (default='100'). */
56     char * nbins_z_orig; /**< @brief number of bins in z axis original value given at command line. */
57     const char *nbins_z_help; /**< @brief number of bins in z axis help description. */
58 gezelter 1390 int nanglebins_arg; /**< @brief number of bins for cos(angle) (default='50'). */
59     char * nanglebins_orig; /**< @brief number of bins for cos(angle) original value given at command line. */
60     const char *nanglebins_help; /**< @brief number of bins for cos(angle) help description. */
61     double length_arg; /**< @brief maximum length (Defaults to 1/2 smallest length of first frame). */
62     char * length_orig; /**< @brief maximum length (Defaults to 1/2 smallest length of first frame) original value given at command line. */
63     const char *length_help; /**< @brief maximum length (Defaults to 1/2 smallest length of first frame) help description. */
64     double rcut_arg; /**< @brief cutoff radius (rcut). */
65     char * rcut_orig; /**< @brief cutoff radius (rcut) original value given at command line. */
66     const char *rcut_help; /**< @brief cutoff radius (rcut) help description. */
67     double zoffset_arg; /**< @brief Where to set the zero for the slab_density calculation (default='0'). */
68     char * zoffset_orig; /**< @brief Where to set the zero for the slab_density calculation original value given at command line. */
69     const char *zoffset_help; /**< @brief Where to set the zero for the slab_density calculation help description. */
70     char * sele1_arg; /**< @brief select the first stuntdouble set. */
71     char * sele1_orig; /**< @brief select the first stuntdouble set original value given at command line. */
72     const char *sele1_help; /**< @brief select the first stuntdouble set help description. */
73     char * sele2_arg; /**< @brief select the second stuntdouble set. */
74     char * sele2_orig; /**< @brief select the second stuntdouble set original value given at command line. */
75     const char *sele2_help; /**< @brief select the second stuntdouble set help description. */
76     char * sele3_arg; /**< @brief select the third stuntdouble set. */
77     char * sele3_orig; /**< @brief select the third stuntdouble set original value given at command line. */
78     const char *sele3_help; /**< @brief select the third stuntdouble set help description. */
79     char * refsele_arg; /**< @brief select reference (use and only use with --gxyz). */
80     char * refsele_orig; /**< @brief select reference (use and only use with --gxyz) original value given at command line. */
81     const char *refsele_help; /**< @brief select reference (use and only use with --gxyz) help description. */
82     char * comsele_arg; /**< @brief select stunt doubles for center-of-mass reference point. */
83     char * comsele_orig; /**< @brief select stunt doubles for center-of-mass reference point original value given at command line. */
84     const char *comsele_help; /**< @brief select stunt doubles for center-of-mass reference point help description. */
85     char * molname_arg; /**< @brief molecule name. */
86     char * molname_orig; /**< @brief molecule name original value given at command line. */
87     const char *molname_help; /**< @brief molecule name help description. */
88     int begin_arg; /**< @brief begin internal index. */
89     char * begin_orig; /**< @brief begin internal index original value given at command line. */
90     const char *begin_help; /**< @brief begin internal index help description. */
91     int end_arg; /**< @brief end internal index. */
92     char * end_orig; /**< @brief end internal index original value given at command line. */
93     const char *end_help; /**< @brief end internal index help description. */
94     double radius_arg; /**< @brief nanoparticle radius. */
95     char * radius_orig; /**< @brief nanoparticle radius original value given at command line. */
96     const char *radius_help; /**< @brief nanoparticle radius help description. */
97     const char *bo_help; /**< @brief bond order parameter (--rcut must be specified) help description. */
98     const char *bor_help; /**< @brief bond order parameter as a function of radius (--rcut must be specified) help description. */
99     const char *bad_help; /**< @brief N(theta) bond angle density within (--rcut must be specified) help description. */
100     const char *gofr_help; /**< @brief g(r) help description. */
101     const char *gofz_help; /**< @brief g(z) help description. */
102     const char *r_theta_help; /**< @brief g(r, cos(theta)) help description. */
103     const char *r_omega_help; /**< @brief g(r, cos(omega)) help description. */
104 gezelter 1440 const char *r_z_help; /**< @brief g(r, z) help description. */
105 gezelter 1390 const char *theta_omega_help; /**< @brief g(cos(theta), cos(omega)) help description. */
106     const char *gxyz_help; /**< @brief g(x, y, z) help description. */
107     const char *p2_help; /**< @brief p2 order parameter (--sele1 and --sele2 must be specified) help description. */
108     const char *rp2_help; /**< @brief rp2 order parameter (--sele1 and --sele2 must be specified) help description. */
109     const char *scd_help; /**< @brief scd order parameter (either --sele1, --sele2, --sele3 are specified or --molname, --begin, --end are specified) help description. */
110     const char *density_help; /**< @brief density plot help description. */
111     const char *slab_density_help; /**< @brief slab density help description. */
112 gezelter 1413 const char *p_angle_help; /**< @brief p(cos(theta)) help description. */
113 gezelter 1390 const char *hxy_help; /**< @brief hxy help description. */
114     const char *rho_r_help; /**< @brief rho of R help description. */
115     const char *hullvol_help; /**< @brief hull volume of nanoparticle help description. */
116 gezelter 929
117 gezelter 1390 unsigned int help_given ; /**< @brief Whether help was given. */
118     unsigned int version_given ; /**< @brief Whether version was given. */
119     unsigned int input_given ; /**< @brief Whether input was given. */
120     unsigned int output_given ; /**< @brief Whether output was given. */
121     unsigned int step_given ; /**< @brief Whether step was given. */
122     unsigned int nbins_given ; /**< @brief Whether nbins was given. */
123     unsigned int nbins_x_given ; /**< @brief Whether nbins_x was given. */
124     unsigned int nbins_y_given ; /**< @brief Whether nbins_y was given. */
125 gezelter 1440 unsigned int nbins_z_given ; /**< @brief Whether nbins_z was given. */
126 gezelter 1390 unsigned int nanglebins_given ; /**< @brief Whether nanglebins was given. */
127     unsigned int length_given ; /**< @brief Whether length was given. */
128     unsigned int rcut_given ; /**< @brief Whether rcut was given. */
129     unsigned int zoffset_given ; /**< @brief Whether zoffset was given. */
130     unsigned int sele1_given ; /**< @brief Whether sele1 was given. */
131     unsigned int sele2_given ; /**< @brief Whether sele2 was given. */
132     unsigned int sele3_given ; /**< @brief Whether sele3 was given. */
133     unsigned int refsele_given ; /**< @brief Whether refsele was given. */
134     unsigned int comsele_given ; /**< @brief Whether comsele was given. */
135     unsigned int molname_given ; /**< @brief Whether molname was given. */
136     unsigned int begin_given ; /**< @brief Whether begin was given. */
137     unsigned int end_given ; /**< @brief Whether end was given. */
138     unsigned int radius_given ; /**< @brief Whether radius was given. */
139     unsigned int bo_given ; /**< @brief Whether bo was given. */
140     unsigned int bor_given ; /**< @brief Whether bor was given. */
141     unsigned int bad_given ; /**< @brief Whether bad was given. */
142     unsigned int gofr_given ; /**< @brief Whether gofr was given. */
143     unsigned int gofz_given ; /**< @brief Whether gofz was given. */
144     unsigned int r_theta_given ; /**< @brief Whether r_theta was given. */
145     unsigned int r_omega_given ; /**< @brief Whether r_omega was given. */
146 gezelter 1440 unsigned int r_z_given ; /**< @brief Whether r_z was given. */
147 gezelter 1390 unsigned int theta_omega_given ; /**< @brief Whether theta_omega was given. */
148     unsigned int gxyz_given ; /**< @brief Whether gxyz was given. */
149     unsigned int p2_given ; /**< @brief Whether p2 was given. */
150     unsigned int rp2_given ; /**< @brief Whether rp2 was given. */
151     unsigned int scd_given ; /**< @brief Whether scd was given. */
152     unsigned int density_given ; /**< @brief Whether density was given. */
153     unsigned int slab_density_given ; /**< @brief Whether slab_density was given. */
154 gezelter 1413 unsigned int p_angle_given ; /**< @brief Whether p_angle was given. */
155 gezelter 1390 unsigned int hxy_given ; /**< @brief Whether hxy was given. */
156     unsigned int rho_r_given ; /**< @brief Whether rho_r was given. */
157     unsigned int hullvol_given ; /**< @brief Whether hullvol was given. */
158 tim 310
159 gezelter 1413 char **inputs ; /**< @brief unamed options (options without names) */
160     unsigned inputs_num ; /**< @brief unamed options number */
161 gezelter 1390 int staticProps_group_counter; /**< @brief Counter for group staticProps */
162 tim 543 } ;
163 tim 310
164 gezelter 1390 /** @brief The additional parameters to pass to parser functions */
165     struct cmdline_parser_params
166     {
167     int override; /**< @brief whether to override possibly already present options (default 0) */
168     int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
169     int check_required; /**< @brief whether to check that all required options were provided (default 1) */
170     int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
171     int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
172     } ;
173    
174     /** @brief the purpose string of the program */
175 chuckv 1128 extern const char *gengetopt_args_info_purpose;
176 gezelter 1390 /** @brief the usage string of the program */
177 chuckv 1128 extern const char *gengetopt_args_info_usage;
178 gezelter 1390 /** @brief all the lines making the help output */
179 chuckv 1128 extern const char *gengetopt_args_info_help[];
180 tim 310
181 gezelter 1390 /**
182     * The command line parser
183     * @param argc the number of command line options
184     * @param argv the command line options
185     * @param args_info the structure where option information will be stored
186     * @return 0 if everything went fine, NON 0 if an error took place
187     */
188 chuckv 1128 int cmdline_parser (int argc, char * const *argv,
189     struct gengetopt_args_info *args_info);
190 gezelter 1390
191     /**
192     * The command line parser (version with additional parameters - deprecated)
193     * @param argc the number of command line options
194     * @param argv the command line options
195     * @param args_info the structure where option information will be stored
196     * @param override whether to override possibly already present options
197     * @param initialize whether to initialize the option structure my_args_info
198     * @param check_required whether to check that all required options were provided
199     * @return 0 if everything went fine, NON 0 if an error took place
200     * @deprecated use cmdline_parser_ext() instead
201     */
202 chuckv 1128 int cmdline_parser2 (int argc, char * const *argv,
203     struct gengetopt_args_info *args_info,
204     int override, int initialize, int check_required);
205 gezelter 1390
206     /**
207     * The command line parser (version with additional parameters)
208     * @param argc the number of command line options
209     * @param argv the command line options
210     * @param args_info the structure where option information will be stored
211     * @param params additional parameters for the parser
212     * @return 0 if everything went fine, NON 0 if an error took place
213     */
214     int cmdline_parser_ext (int argc, char * const *argv,
215     struct gengetopt_args_info *args_info,
216     struct cmdline_parser_params *params);
217    
218     /**
219     * Save the contents of the option struct into an already open FILE stream.
220     * @param outfile the stream where to dump options
221     * @param args_info the option struct to dump
222     * @return 0 if everything went fine, NON 0 if an error took place
223     */
224     int cmdline_parser_dump(FILE *outfile,
225     struct gengetopt_args_info *args_info);
226    
227     /**
228     * Save the contents of the option struct into a (text) file.
229     * This file can be read by the config file parser (if generated by gengetopt)
230     * @param filename the file where to save
231     * @param args_info the option struct to save
232     * @return 0 if everything went fine, NON 0 if an error took place
233     */
234 chuckv 1128 int cmdline_parser_file_save(const char *filename,
235     struct gengetopt_args_info *args_info);
236    
237 gezelter 1390 /**
238     * Print the help
239     */
240 tim 543 void cmdline_parser_print_help(void);
241 gezelter 1390 /**
242     * Print the version
243     */
244 tim 543 void cmdline_parser_print_version(void);
245 tim 310
246 gezelter 1390 /**
247     * Initializes all the fields a cmdline_parser_params structure
248     * to their default values
249     * @param params the structure to initialize
250     */
251     void cmdline_parser_params_init(struct cmdline_parser_params *params);
252    
253     /**
254     * Allocates dynamically a cmdline_parser_params structure and initializes
255     * all its fields to their default values
256     * @return the created and initialized cmdline_parser_params structure
257     */
258     struct cmdline_parser_params *cmdline_parser_params_create(void);
259    
260     /**
261     * Initializes the passed gengetopt_args_info structure's fields
262     * (also set default values for options that have a default)
263     * @param args_info the structure to initialize
264     */
265 gezelter 929 void cmdline_parser_init (struct gengetopt_args_info *args_info);
266 gezelter 1390 /**
267     * Deallocates the string fields of the gengetopt_args_info structure
268     * (but does not deallocate the structure itself)
269     * @param args_info the structure to deallocate
270     */
271 gezelter 929 void cmdline_parser_free (struct gengetopt_args_info *args_info);
272    
273 gezelter 1390 /**
274     * Checks that all the required options were specified
275     * @param args_info the structure to check
276     * @param prog_name the name of the program that will be used to print
277     * possible errors
278     * @return
279     */
280 chuckv 1128 int cmdline_parser_required (struct gengetopt_args_info *args_info,
281     const char *prog_name);
282 gezelter 929
283    
284 tim 310 #ifdef __cplusplus
285     }
286     #endif /* __cplusplus */
287     #endif /* STATICPROPSCMD_H */

Properties

Name Value
svn:keywords Author Id Revision Date