OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
icosahedralBuilderCmd.hpp
Go to the documentation of this file.
1/** @file icosahedralBuilderCmd.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 ICOSAHEDRALBUILDERCMD_H
9#define ICOSAHEDRALBUILDERCMD_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 "icosahedralBuilder"
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 "icosahedralBuilder"
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 int shells_arg; /**< @brief Nanoparticle shells. */
46 char * shells_orig; /**< @brief Nanoparticle shells original value given at command line. */
47 const char *shells_help; /**< @brief Nanoparticle shells help description. */
48 double latticeConstant_arg; /**< @brief Lattice spacing in Angstroms for cubic lattice.. */
49 char * latticeConstant_orig; /**< @brief Lattice spacing in Angstroms for cubic lattice. original value given at command line. */
50 const char *latticeConstant_help; /**< @brief Lattice spacing in Angstroms for cubic lattice. help description. */
51 char * lattice_arg; /**< @brief Lattice Type. */
52 char * lattice_orig; /**< @brief Lattice Type original value given at command line. */
53 const char *lattice_help; /**< @brief Lattice Type help description. */
54 int columnAtoms_arg; /**< @brief Number of atoms along central column (Decahedron only). */
55 char * columnAtoms_orig; /**< @brief Number of atoms along central column (Decahedron only) original value given at command line. */
56 const char *columnAtoms_help; /**< @brief Number of atoms along central column (Decahedron only) help description. */
57 int twinAtoms_arg; /**< @brief Number of atoms along twin boundary (Decahedron only). */
58 char * twinAtoms_orig; /**< @brief Number of atoms along twin boundary (Decahedron only) original value given at command line. */
59 const char *twinAtoms_help; /**< @brief Number of atoms along twin boundary (Decahedron only) help description. */
60 int truncatedPlanes_arg; /**< @brief Number of truncated planes (Curling-stone Decahedra and Truncated Cubes only). */
61 char * truncatedPlanes_orig; /**< @brief Number of truncated planes (Curling-stone Decahedra and Truncated Cubes only) original value given at command line. */
62 const char *truncatedPlanes_help; /**< @brief Number of truncated planes (Curling-stone Decahedra and Truncated Cubes only) help description. */
63 int unitCells_arg; /**< @brief Number of unit cell (Cuboctahedron and Truncated Cube only). */
64 char * unitCells_orig; /**< @brief Number of unit cell (Cuboctahedron and Truncated Cube only) original value given at command line. */
65 const char *unitCells_help; /**< @brief Number of unit cell (Cuboctahedron and Truncated Cube only) help description. */
66 const char *ico_help; /**< @brief Create an Icosahedral cluster help description. */
67 const char *deca_help; /**< @brief Create a regualar Decahedral cluster help description. */
68 const char *ino_help; /**< @brief Create an Ino Decahedral cluster help description. */
69 const char *marks_help; /**< @brief Create a Marks Decahedral cluster help description. */
70 const char *stone_help; /**< @brief Create a Curling-stone Decahedral cluster help description. */
71 const char *cuboctahedron_help; /**< @brief Create a regular Cuboctahedron (requires lattice) help description. */
72 const char *truncatedCube_help; /**< @brief Create a Truncated Cube (requires lattice) help description. */
73
74 unsigned int help_given ; /**< @brief Whether help was given. */
75 unsigned int version_given ; /**< @brief Whether version was given. */
76 unsigned int output_given ; /**< @brief Whether output was given. */
77 unsigned int shells_given ; /**< @brief Whether shells was given. */
78 unsigned int latticeConstant_given ; /**< @brief Whether latticeConstant was given. */
79 unsigned int lattice_given ; /**< @brief Whether lattice was given. */
80 unsigned int columnAtoms_given ; /**< @brief Whether columnAtoms was given. */
81 unsigned int twinAtoms_given ; /**< @brief Whether twinAtoms was given. */
82 unsigned int truncatedPlanes_given ; /**< @brief Whether truncatedPlanes was given. */
83 unsigned int unitCells_given ; /**< @brief Whether unitCells was given. */
84 unsigned int ico_given ; /**< @brief Whether ico was given. */
85 unsigned int deca_given ; /**< @brief Whether deca was given. */
86 unsigned int ino_given ; /**< @brief Whether ino was given. */
87 unsigned int marks_given ; /**< @brief Whether marks was given. */
88 unsigned int stone_given ; /**< @brief Whether stone was given. */
89 unsigned int cuboctahedron_given ; /**< @brief Whether cuboctahedron was given. */
90 unsigned int truncatedCube_given ; /**< @brief Whether truncatedCube was given. */
91
92 char **inputs ; /**< @brief unamed options (options without names) */
93 unsigned inputs_num ; /**< @brief unamed options number */
94 int clusterShape_group_counter; /**< @brief Counter for group clusterShape */
95} ;
96
97/** @brief The additional parameters to pass to parser functions */
99{
100 int override; /**< @brief whether to override possibly already present options (default 0) */
101 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
102 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
103 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
104 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
105} ;
106
107/** @brief the purpose string of the program */
108extern const char *gengetopt_args_info_purpose;
109/** @brief the usage string of the program */
110extern const char *gengetopt_args_info_usage;
111/** @brief the description string of the program */
112extern const char *gengetopt_args_info_description;
113/** @brief all the lines making the help output */
114extern const char *gengetopt_args_info_help[];
115
116/**
117 * The command line parser
118 * @param argc the number of command line options
119 * @param argv the command line options
120 * @param args_info the structure where option information will be stored
121 * @return 0 if everything went fine, NON 0 if an error took place
122 */
123int cmdline_parser (int argc, char **argv,
124 struct gengetopt_args_info *args_info);
125
126/**
127 * The command line parser (version with additional parameters - deprecated)
128 * @param argc the number of command line options
129 * @param argv the command line options
130 * @param args_info the structure where option information will be stored
131 * @param override whether to override possibly already present options
132 * @param initialize whether to initialize the option structure my_args_info
133 * @param check_required whether to check that all required options were provided
134 * @return 0 if everything went fine, NON 0 if an error took place
135 * @deprecated use cmdline_parser_ext() instead
136 */
137int cmdline_parser2 (int argc, char **argv,
138 struct gengetopt_args_info *args_info,
139 int override, int initialize, int check_required);
140
141/**
142 * The command line parser (version with additional parameters)
143 * @param argc the number of command line options
144 * @param argv the command line options
145 * @param args_info the structure where option information will be stored
146 * @param params additional parameters for the parser
147 * @return 0 if everything went fine, NON 0 if an error took place
148 */
149int cmdline_parser_ext (int argc, char **argv,
150 struct gengetopt_args_info *args_info,
151 struct cmdline_parser_params *params);
152
153/**
154 * Save the contents of the option struct into an already open FILE stream.
155 * @param outfile the stream where to dump options
156 * @param args_info the option struct to dump
157 * @return 0 if everything went fine, NON 0 if an error took place
158 */
159int cmdline_parser_dump(FILE *outfile,
160 struct gengetopt_args_info *args_info);
161
162/**
163 * Save the contents of the option struct into a (text) file.
164 * This file can be read by the config file parser (if generated by gengetopt)
165 * @param filename the file where to save
166 * @param args_info the option struct to save
167 * @return 0 if everything went fine, NON 0 if an error took place
168 */
169int cmdline_parser_file_save(const char *filename,
170 struct gengetopt_args_info *args_info);
171
172/**
173 * Print the help
174 */
176/**
177 * Print the version
178 */
180
181/**
182 * Initializes all the fields a cmdline_parser_params structure
183 * to their default values
184 * @param params the structure to initialize
185 */
187
188/**
189 * Allocates dynamically a cmdline_parser_params structure and initializes
190 * all its fields to their default values
191 * @return the created and initialized cmdline_parser_params structure
192 */
194
195/**
196 * Initializes the passed gengetopt_args_info structure's fields
197 * (also set default values for options that have a default)
198 * @param args_info the structure to initialize
199 */
200void cmdline_parser_init (struct gengetopt_args_info *args_info);
201/**
202 * Deallocates the string fields of the gengetopt_args_info structure
203 * (but does not deallocate the structure itself)
204 * @param args_info the structure to deallocate
205 */
206void cmdline_parser_free (struct gengetopt_args_info *args_info);
207
208/**
209 * Checks that all the required options were specified
210 * @param args_info the structure to check
211 * @param prog_name the name of the program that will be used to print
212 * possible errors
213 * @return
214 */
215int cmdline_parser_required (struct gengetopt_args_info *args_info,
216 const char *prog_name);
217
218extern const char *cmdline_parser_lattice_values[]; /**< @brief Possible values for lattice. */
219
220
221#ifdef __cplusplus
222}
223#endif /* __cplusplus */
224#endif /* ICOSAHEDRALBUILDERCMD_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 ico_given
Whether ico was given.
const char * ino_help
Create an Ino Decahedral cluster help description.
const char * stone_help
Create a Curling-stone Decahedral cluster help description.
unsigned int output_given
Whether output was given.
int clusterShape_group_counter
Counter for group clusterShape.
unsigned int latticeConstant_given
Whether latticeConstant was given.
char * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
int unitCells_arg
Number of unit cell (Cuboctahedron and Truncated Cube only).
char * twinAtoms_orig
Number of atoms along twin boundary (Decahedron only) original value given at command line.
int shells_arg
Nanoparticle shells.
unsigned int truncatedPlanes_given
Whether truncatedPlanes was given.
unsigned inputs_num
unamed options number
unsigned int marks_given
Whether marks was given.
unsigned int ino_given
Whether ino was given.
const char * columnAtoms_help
Number of atoms along central column (Decahedron only) help description.
const char * shells_help
Nanoparticle shells help description.
unsigned int cuboctahedron_given
Whether cuboctahedron was given.
unsigned int stone_given
Whether stone was given.
const char * latticeConstant_help
Lattice spacing in Angstroms for cubic lattice.
char * truncatedPlanes_orig
Number of truncated planes (Curling-stone Decahedra and Truncated Cubes only) original value given at...
unsigned int lattice_given
Whether lattice was given.
const char * truncatedPlanes_help
Number of truncated planes (Curling-stone Decahedra and Truncated Cubes only) help description.
const char * lattice_help
Lattice Type help description.
unsigned int shells_given
Whether shells was given.
const char * help_help
Print help and exit help description.
int columnAtoms_arg
Number of atoms along central column (Decahedron only).
char * output_arg
output file name.
char ** inputs
unamed options (options without names)
unsigned int deca_given
Whether deca was given.
const char * unitCells_help
Number of unit cell (Cuboctahedron and Truncated Cube only) help description.
int truncatedPlanes_arg
Number of truncated planes (Curling-stone Decahedra and Truncated Cubes only).
char * latticeConstant_orig
Lattice spacing in Angstroms for cubic lattice.
const char * twinAtoms_help
Number of atoms along twin boundary (Decahedron only) help description.
unsigned int twinAtoms_given
Whether twinAtoms was given.
const char * deca_help
Create a regualar Decahedral cluster help description.
const char * ico_help
Create an Icosahedral cluster help description.
int twinAtoms_arg
Number of atoms along twin boundary (Decahedron only).
unsigned int help_given
Whether help was given.
const char * marks_help
Create a Marks Decahedral cluster help description.
char * shells_orig
Nanoparticle shells original value given at command line.
char * lattice_orig
Lattice Type original value given at command line.
unsigned int version_given
Whether version was given.
unsigned int truncatedCube_given
Whether truncatedCube was given.
const char * version_help
Print version and exit help description.
const char * truncatedCube_help
Create a Truncated Cube (requires lattice) help description.
unsigned int columnAtoms_given
Whether columnAtoms was given.
double latticeConstant_arg
Lattice spacing in Angstroms for cubic lattice.
unsigned int unitCells_given
Whether unitCells was given.
char * lattice_arg
Lattice Type.
char * columnAtoms_orig
Number of atoms along central column (Decahedron only) original value given at command line.
const char * cuboctahedron_help
Create a regular Cuboctahedron (requires lattice) help description.
char * unitCells_orig
Number of unit cell (Cuboctahedron and Truncated Cube only) original value given at command line.