OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
randomBuilderCmd.hpp
Go to the documentation of this file.
1/** @file randomBuilderCmd.hpp
2 * @brief The header file for the command line option parser
3 * generated by GNU Gengetopt version 2.22.6
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 RANDOMBUILDERCMD_H
9#define RANDOMBUILDERCMD_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
19extern "C" {
20#endif /* __cplusplus */
21
22#ifndef CMDLINE_PARSER_PACKAGE
23/** @brief the program name (used for printing errors) */
24#define CMDLINE_PARSER_PACKAGE "randomBuilder"
25#endif
26
27#ifndef CMDLINE_PARSER_PACKAGE_NAME
28/** @brief the complete program name (used for help and version) */
29#define CMDLINE_PARSER_PACKAGE_NAME "randomBuilder"
30#endif
31
32#ifndef CMDLINE_PARSER_VERSION
33/** @brief the program version */
34#define CMDLINE_PARSER_VERSION ""
35#endif
36
37/** @brief Where the command line options are stored */
39{
40 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 density_arg; /**< @brief density (g/cm^3). */
46 char * density_orig; /**< @brief density (g/cm^3) original value given at command line. */
47 const char *density_help; /**< @brief density (g/cm^3) help description. */
48 int nx_arg; /**< @brief number of unit cells in x. */
49 char * nx_orig; /**< @brief number of unit cells in x original value given at command line. */
50 const char *nx_help; /**< @brief number of unit cells in x help description. */
51 int ny_arg; /**< @brief number of unit cells in y. */
52 char * ny_orig; /**< @brief number of unit cells in y original value given at command line. */
53 const char *ny_help; /**< @brief number of unit cells in y help description. */
54 int nz_arg; /**< @brief number of unit cells in z. */
55 char * nz_orig; /**< @brief number of unit cells in z original value given at command line. */
56 const char *nz_help; /**< @brief number of unit cells in z help description. */
57 double* molFraction_arg; /**< @brief (Default) Builds a multi-component random mixed nanoparticle. Mole Fraction must be specified for each componet > 1 in MD file.. */
58 char ** molFraction_orig; /**< @brief (Default) Builds a multi-component random mixed nanoparticle. Mole Fraction must be specified for each componet > 1 in MD file. original value given at command line. */
59 unsigned int molFraction_min; /**< @brief (Default) Builds a multi-component random mixed nanoparticle. Mole Fraction must be specified for each componet > 1 in MD file.'s minimum occurreces */
60 unsigned int molFraction_max; /**< @brief (Default) Builds a multi-component random mixed nanoparticle. Mole Fraction must be specified for each componet > 1 in MD file.'s maximum occurreces */
61 const char *molFraction_help; /**< @brief (Default) Builds a multi-component random mixed nanoparticle. Mole Fraction must be specified for each componet > 1 in MD file. help description. */
62 char * lattice_arg; /**< @brief Lattice Type. */
63 char * lattice_orig; /**< @brief Lattice Type original value given at command line. */
64 const char *lattice_help; /**< @brief Lattice Type help description. */
65
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 density_given ; /**< @brief Whether density was given. */
70 unsigned int nx_given ; /**< @brief Whether nx was given. */
71 unsigned int ny_given ; /**< @brief Whether ny was given. */
72 unsigned int nz_given ; /**< @brief Whether nz was given. */
73 unsigned int molFraction_given ; /**< @brief Whether molFraction was given. */
74 unsigned int lattice_given ; /**< @brief Whether lattice was given. */
75
76 char **inputs ; /**< @brief unamed options (options without names) */
77 unsigned inputs_num ; /**< @brief unamed options number */
78} ;
79
80/** @brief The additional parameters to pass to parser functions */
82{
83 int override; /**< @brief whether to override possibly already present options (default 0) */
84 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
85 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
86 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
87 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
88} ;
89
90/** @brief the purpose string of the program */
91extern const char *gengetopt_args_info_purpose;
92/** @brief the usage string of the program */
93extern const char *gengetopt_args_info_usage;
94/** @brief the description string of the program */
95extern const char *gengetopt_args_info_description;
96/** @brief all the lines making the help output */
97extern const char *gengetopt_args_info_help[];
98
99/**
100 * The command line parser
101 * @param argc the number of command line options
102 * @param argv the command line options
103 * @param args_info the structure where option information will be stored
104 * @return 0 if everything went fine, NON 0 if an error took place
105 */
106int cmdline_parser (int argc, char **argv,
107 struct gengetopt_args_info *args_info);
108
109/**
110 * The command line parser (version with additional parameters - deprecated)
111 * @param argc the number of command line options
112 * @param argv the command line options
113 * @param args_info the structure where option information will be stored
114 * @param override whether to override possibly already present options
115 * @param initialize whether to initialize the option structure my_args_info
116 * @param check_required whether to check that all required options were provided
117 * @return 0 if everything went fine, NON 0 if an error took place
118 * @deprecated use cmdline_parser_ext() instead
119 */
120int cmdline_parser2 (int argc, char **argv,
121 struct gengetopt_args_info *args_info,
122 int override, int initialize, int check_required);
123
124/**
125 * The command line parser (version with additional parameters)
126 * @param argc the number of command line options
127 * @param argv the command line options
128 * @param args_info the structure where option information will be stored
129 * @param params additional parameters for the parser
130 * @return 0 if everything went fine, NON 0 if an error took place
131 */
132int cmdline_parser_ext (int argc, char **argv,
133 struct gengetopt_args_info *args_info,
134 struct cmdline_parser_params *params);
135
136/**
137 * Save the contents of the option struct into an already open FILE stream.
138 * @param outfile the stream where to dump options
139 * @param args_info the option struct to dump
140 * @return 0 if everything went fine, NON 0 if an error took place
141 */
142int cmdline_parser_dump(FILE *outfile,
143 struct gengetopt_args_info *args_info);
144
145/**
146 * Save the contents of the option struct into a (text) file.
147 * This file can be read by the config file parser (if generated by gengetopt)
148 * @param filename the file where to save
149 * @param args_info the option struct to save
150 * @return 0 if everything went fine, NON 0 if an error took place
151 */
152int cmdline_parser_file_save(const char *filename,
153 struct gengetopt_args_info *args_info);
154
155/**
156 * Print the help
157 */
159/**
160 * Print the version
161 */
163
164/**
165 * Initializes all the fields a cmdline_parser_params structure
166 * to their default values
167 * @param params the structure to initialize
168 */
170
171/**
172 * Allocates dynamically a cmdline_parser_params structure and initializes
173 * all its fields to their default values
174 * @return the created and initialized cmdline_parser_params structure
175 */
177
178/**
179 * Initializes the passed gengetopt_args_info structure's fields
180 * (also set default values for options that have a default)
181 * @param args_info the structure to initialize
182 */
183void cmdline_parser_init (struct gengetopt_args_info *args_info);
184/**
185 * Deallocates the string fields of the gengetopt_args_info structure
186 * (but does not deallocate the structure itself)
187 * @param args_info the structure to deallocate
188 */
189void cmdline_parser_free (struct gengetopt_args_info *args_info);
190
191/**
192 * Checks that all the required options were specified
193 * @param args_info the structure to check
194 * @param prog_name the name of the program that will be used to print
195 * possible errors
196 * @return
197 */
198int cmdline_parser_required (struct gengetopt_args_info *args_info,
199 const char *prog_name);
200
201extern const char *cmdline_parser_lattice_values[]; /**< @brief Possible values for lattice. */
202
203
204#ifdef __cplusplus
205}
206#endif /* __cplusplus */
207#endif /* RANDOMBUILDERCMD_H */
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Save the contents of the option struct into an already open FILE stream.
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
The command line parser.
const char * cmdline_parser_lattice_values[]
Possible values for lattice.
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
Save the contents of the option struct into a (text) file.
const char * gengetopt_args_info_purpose
the purpose string of the program
const char * gengetopt_args_info_help[]
all the lines making the help output
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
The command line parser (version with additional parameters - deprecated)
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Checks that all the required options were specified.
void cmdline_parser_print_version(void)
Print the version.
struct cmdline_parser_params * cmdline_parser_params_create(void)
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their defau...
const char * gengetopt_args_info_usage
the usage string of the program
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
The command line parser (version with additional parameters)
void cmdline_parser_init(struct gengetopt_args_info *args_info)
Initializes the passed gengetopt_args_info structure's fields (also set default values for options th...
const char * gengetopt_args_info_description
the description string of the program
void cmdline_parser_print_help(void)
Print the help.
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the struc...
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Initializes all the fields a cmdline_parser_params structure to their default values.
The additional parameters to pass to parser functions.
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
int check_required
whether to check that all required options were provided (default 1)
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
Where the command line options are stored.
unsigned int output_given
Whether output was given.
char ** molFraction_orig
Builds a multi-component random alloy nanoparticle.
unsigned int density_given
Whether density was given.
char * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
unsigned int ny_given
Whether ny was given.
const char * molFraction_help
Builds a multi-component random alloy nanoparticle.
char * nx_orig
number of unit cells in x original value given at command line.
const char * ny_help
number of unit cells in y help description.
unsigned inputs_num
unamed options number
unsigned int nx_given
Whether nx was given.
unsigned int molFraction_given
Whether molFraction was given.
unsigned int nz_given
Whether nz was given.
unsigned int lattice_given
Whether lattice was given.
char * density_orig
density (g/cm^3) original value given at command line.
const char * lattice_help
Lattice Type help description.
const char * help_help
Print help and exit help description.
double * molFraction_arg
Builds a multi-component random alloy nanoparticle.
char * ny_orig
number of unit cells in y original value given at command line.
char * output_arg
output file name.
char ** inputs
unamed options (options without names)
unsigned int molFraction_min
Builds a multi-component random alloy nanoparticle.
const char * nx_help
number of unit cells in x help description.
int ny_arg
number of unit cells in y.
char * nz_orig
number of unit cells in z original value given at command line.
int nz_arg
number of unit cells in z.
unsigned int molFraction_max
Builds a multi-component random alloy nanoparticle.
const char * nz_help
number of unit cells in z help description.
double density_arg
density (g/cm^3).
unsigned int help_given
Whether help was given.
int nx_arg
number of unit cells in x.
char * lattice_orig
Lattice Type original value given at command line.
unsigned int version_given
Whether version was given.
const char * version_help
Print version and exit help description.
char * lattice_arg
Lattice Type.
const char * density_help
density (g/cm^3) help description.