ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.h
(Generate patch)

Comparing trunk/src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.h (file contents):
Revision 1389 by gezelter, Wed Oct 18 19:35:07 2006 UTC vs.
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines