ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.h
Revision: 1630
Committed: Wed Sep 14 21:40:12 2011 UTC (13 years, 8 months ago) by gezelter
Content type: text/plain
File size: 10848 byte(s)
Log Message:
updating gengetopt runs

File Contents

# User Rev Content
1 gezelter 1390 /** @file nanoparticleBuilderCmd.h
2     * @brief The header file for the command line option parser
3 gezelter 1630 * generated by GNU Gengetopt version 2.22.4
4 gezelter 1390 * 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 chuckv 653
8     #ifndef NANOPARTICLEBUILDERCMD_H
9     #define NANOPARTICLEBUILDERCMD_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 chuckv 653 #ifdef __cplusplus
19     extern "C" {
20     #endif /* __cplusplus */
21    
22     #ifndef CMDLINE_PARSER_PACKAGE
23 gezelter 1630 /** @brief the program name (used for printing errors) */
24 chuckv 653 #define CMDLINE_PARSER_PACKAGE "nanoparticleBuilder"
25     #endif
26    
27 gezelter 1630 #ifndef CMDLINE_PARSER_PACKAGE_NAME
28     /** @brief the complete program name (used for help and version) */
29     #define CMDLINE_PARSER_PACKAGE_NAME "nanoparticleBuilder"
30     #endif
31    
32 chuckv 653 #ifndef CMDLINE_PARSER_VERSION
33 gezelter 1390 /** @brief the program version */
34 chuckv 653 #define CMDLINE_PARSER_VERSION "1.0"
35     #endif
36    
37 gezelter 1390 /** @brief Where the command line options are stored */
38 chuckv 653 struct gengetopt_args_info
39     {
40 gezelter 1390 const char *help_help; /**< @brief Print help and exit help description. */
41     const char *version_help; /**< @brief Print version and exit help description. */
42     char * output_arg; /**< @brief Output file name. */
43     char * output_orig; /**< @brief Output file name original value given at command line. */
44     const char *output_help; /**< @brief Output file name help description. */
45     double latticeConstant_arg; /**< @brief Lattice spacing in Angstroms for cubic lattice.. */
46     char * latticeConstant_orig; /**< @brief Lattice spacing in Angstroms for cubic lattice. original value given at command line. */
47     const char *latticeConstant_help; /**< @brief Lattice spacing in Angstroms for cubic lattice. help description. */
48     double radius_arg; /**< @brief Nanoparticle radius in Angstroms. */
49     char * radius_orig; /**< @brief Nanoparticle radius in Angstroms original value given at command line. */
50     const char *radius_help; /**< @brief Nanoparticle radius in Angstroms help description. */
51     double* shellRadius_arg; /**< @brief Radius containing within it only molecules of a specific component. Specified for each component > 1 in the template file.. */
52     char ** shellRadius_orig; /**< @brief Radius containing within it only molecules of a specific component. Specified for each component > 1 in the template file. original value given at command line. */
53 gezelter 1630 unsigned int shellRadius_min; /**< @brief Radius containing within it only molecules of a specific component. Specified for each component > 1 in the template file.'s minimum occurreces */
54     unsigned int shellRadius_max; /**< @brief Radius containing within it only molecules of a specific component. Specified for each component > 1 in the template file.'s maximum occurreces */
55 gezelter 1390 const char *shellRadius_help; /**< @brief Radius containing within it only molecules of a specific component. Specified for each component > 1 in the template file. help description. */
56     double* molFraction_arg; /**< @brief Builds a multi-component random alloy nanoparticle. A mole Fraction must be specified for each component > 1 in the template file.. */
57     char ** molFraction_orig; /**< @brief Builds a multi-component random alloy nanoparticle. A mole Fraction must be specified for each component > 1 in the template file. original value given at command line. */
58 gezelter 1630 unsigned int molFraction_min; /**< @brief Builds a multi-component random alloy nanoparticle. A mole Fraction must be specified for each component > 1 in the template file.'s minimum occurreces */
59     unsigned int molFraction_max; /**< @brief Builds a multi-component random alloy nanoparticle. A mole Fraction must be specified for each component > 1 in the template file.'s maximum occurreces */
60 gezelter 1390 const char *molFraction_help; /**< @brief Builds a multi-component random alloy nanoparticle. A mole Fraction must be specified for each component > 1 in the template file. help description. */
61     double vacancyPercent_arg; /**< @brief Percentage of atoms to remove from within vacancy range. */
62     char * vacancyPercent_orig; /**< @brief Percentage of atoms to remove from within vacancy range original value given at command line. */
63     const char *vacancyPercent_help; /**< @brief Percentage of atoms to remove from within vacancy range help description. */
64     double vacancyInnerRadius_arg; /**< @brief Radius arround core-shell where vacancies should be located.. */
65     char * vacancyInnerRadius_orig; /**< @brief Radius arround core-shell where vacancies should be located. original value given at command line. */
66     const char *vacancyInnerRadius_help; /**< @brief Radius arround core-shell where vacancies should be located. help description. */
67     double vacancyOuterRadius_arg; /**< @brief Radius arround core-shell where vacancies should be located.. */
68     char * vacancyOuterRadius_orig; /**< @brief Radius arround core-shell where vacancies should be located. original value given at command line. */
69     const char *vacancyOuterRadius_help; /**< @brief Radius arround core-shell where vacancies should be located. help description. */
70 chuckv 653
71 gezelter 1390 unsigned int help_given ; /**< @brief Whether help was given. */
72     unsigned int version_given ; /**< @brief Whether version was given. */
73     unsigned int output_given ; /**< @brief Whether output was given. */
74     unsigned int latticeConstant_given ; /**< @brief Whether latticeConstant was given. */
75     unsigned int radius_given ; /**< @brief Whether radius was given. */
76     unsigned int shellRadius_given ; /**< @brief Whether shellRadius was given. */
77     unsigned int molFraction_given ; /**< @brief Whether molFraction was given. */
78     unsigned int vacancyPercent_given ; /**< @brief Whether vacancyPercent was given. */
79     unsigned int vacancyInnerRadius_given ; /**< @brief Whether vacancyInnerRadius was given. */
80     unsigned int vacancyOuterRadius_given ; /**< @brief Whether vacancyOuterRadius was given. */
81 chuckv 653
82 gezelter 1390 char **inputs ; /**< @brief unamed options (options without names) */
83     unsigned inputs_num ; /**< @brief unamed options number */
84 chuckv 653 } ;
85    
86 gezelter 1390 /** @brief The additional parameters to pass to parser functions */
87     struct cmdline_parser_params
88     {
89     int override; /**< @brief whether to override possibly already present options (default 0) */
90     int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
91     int check_required; /**< @brief whether to check that all required options were provided (default 1) */
92     int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
93     int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
94     } ;
95 chuckv 653
96 gezelter 1390 /** @brief the purpose string of the program */
97     extern const char *gengetopt_args_info_purpose;
98     /** @brief the usage string of the program */
99     extern const char *gengetopt_args_info_usage;
100     /** @brief all the lines making the help output */
101     extern const char *gengetopt_args_info_help[];
102    
103     /**
104     * The command line parser
105     * @param argc the number of command line options
106     * @param argv the command line options
107     * @param args_info the structure where option information will be stored
108     * @return 0 if everything went fine, NON 0 if an error took place
109     */
110 gezelter 1630 int cmdline_parser (int argc, char **argv,
111 gezelter 1390 struct gengetopt_args_info *args_info);
112    
113     /**
114     * The command line parser (version with additional parameters - deprecated)
115     * @param argc the number of command line options
116     * @param argv the command line options
117     * @param args_info the structure where option information will be stored
118     * @param override whether to override possibly already present options
119     * @param initialize whether to initialize the option structure my_args_info
120     * @param check_required whether to check that all required options were provided
121     * @return 0 if everything went fine, NON 0 if an error took place
122     * @deprecated use cmdline_parser_ext() instead
123     */
124 gezelter 1630 int cmdline_parser2 (int argc, char **argv,
125 gezelter 1390 struct gengetopt_args_info *args_info,
126     int override, int initialize, int check_required);
127    
128     /**
129     * The command line parser (version with additional parameters)
130     * @param argc the number of command line options
131     * @param argv the command line options
132     * @param args_info the structure where option information will be stored
133     * @param params additional parameters for the parser
134     * @return 0 if everything went fine, NON 0 if an error took place
135     */
136 gezelter 1630 int cmdline_parser_ext (int argc, char **argv,
137 gezelter 1390 struct gengetopt_args_info *args_info,
138     struct cmdline_parser_params *params);
139    
140     /**
141     * Save the contents of the option struct into an already open FILE stream.
142     * @param outfile the stream where to dump options
143     * @param args_info the option struct to dump
144     * @return 0 if everything went fine, NON 0 if an error took place
145     */
146     int cmdline_parser_dump(FILE *outfile,
147     struct gengetopt_args_info *args_info);
148    
149     /**
150     * Save the contents of the option struct into a (text) file.
151     * This file can be read by the config file parser (if generated by gengetopt)
152     * @param filename the file where to save
153     * @param args_info the option struct to save
154     * @return 0 if everything went fine, NON 0 if an error took place
155     */
156     int cmdline_parser_file_save(const char *filename,
157     struct gengetopt_args_info *args_info);
158    
159     /**
160     * Print the help
161     */
162 chuckv 653 void cmdline_parser_print_help(void);
163 gezelter 1390 /**
164     * Print the version
165     */
166 chuckv 653 void cmdline_parser_print_version(void);
167    
168 gezelter 1390 /**
169     * Initializes all the fields a cmdline_parser_params structure
170     * to their default values
171     * @param params the structure to initialize
172     */
173     void cmdline_parser_params_init(struct cmdline_parser_params *params);
174    
175     /**
176     * Allocates dynamically a cmdline_parser_params structure and initializes
177     * all its fields to their default values
178     * @return the created and initialized cmdline_parser_params structure
179     */
180     struct cmdline_parser_params *cmdline_parser_params_create(void);
181    
182     /**
183     * Initializes the passed gengetopt_args_info structure's fields
184     * (also set default values for options that have a default)
185     * @param args_info the structure to initialize
186     */
187 chuckv 653 void cmdline_parser_init (struct gengetopt_args_info *args_info);
188 gezelter 1390 /**
189     * Deallocates the string fields of the gengetopt_args_info structure
190     * (but does not deallocate the structure itself)
191     * @param args_info the structure to deallocate
192     */
193 chuckv 653 void cmdline_parser_free (struct gengetopt_args_info *args_info);
194    
195 gezelter 1390 /**
196     * Checks that all the required options were specified
197     * @param args_info the structure to check
198     * @param prog_name the name of the program that will be used to print
199     * possible errors
200     * @return
201     */
202     int cmdline_parser_required (struct gengetopt_args_info *args_info,
203     const char *prog_name);
204 chuckv 653
205    
206     #ifdef __cplusplus
207     }
208     #endif /* __cplusplus */
209     #endif /* NANOPARTICLEBUILDERCMD_H */

Properties

Name Value
svn:keywords Author Id Revision Date