OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
thermalizerCmd.hpp
Go to the documentation of this file.
1/** @file thermalizerCmd.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 THERMALIZERCMD_H
9#define THERMALIZERCMD_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 "thermalizer"
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 "thermalizer"
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 * input_arg; /**< @brief Input file name. */
43 char * input_orig; /**< @brief Input file name original value given at command line. */
44 const char *input_help; /**< @brief Input file name help description. */
45 char * output_arg; /**< @brief Output file name. */
46 char * output_orig; /**< @brief Output file name original value given at command line. */
47 const char *output_help; /**< @brief Output file name help description. */
48 double temperature_arg; /**< @brief temperature (K). */
49 char * temperature_orig; /**< @brief temperature (K) original value given at command line. */
50 const char *temperature_help; /**< @brief temperature (K) help description. */
51 double energy_arg; /**< @brief energy (kcal/mol). */
52 char * energy_orig; /**< @brief energy (kcal/mol) original value given at command line. */
53 const char *energy_help; /**< @brief energy (kcal/mol) help description. */
54 double chargetemperature_arg; /**< @brief charge temperature (K). */
55 char * chargetemperature_orig; /**< @brief charge temperature (K) original value given at command line. */
56 const char *chargetemperature_help; /**< @brief charge temperature (K) help description. */
57
58 unsigned int help_given ; /**< @brief Whether help was given. */
59 unsigned int version_given ; /**< @brief Whether version was given. */
60 unsigned int input_given ; /**< @brief Whether input was given. */
61 unsigned int output_given ; /**< @brief Whether output was given. */
62 unsigned int temperature_given ; /**< @brief Whether temperature was given. */
63 unsigned int energy_given ; /**< @brief Whether energy was given. */
64 unsigned int chargetemperature_given ; /**< @brief Whether chargetemperature was given. */
65
66 char **inputs ; /**< @brief unamed options (options without names) */
67 unsigned inputs_num ; /**< @brief unamed options number */
68 int thermalizer_group_counter; /**< @brief Counter for group thermalizer */
69} ;
70
71/** @brief The additional parameters to pass to parser functions */
73{
74 int override; /**< @brief whether to override possibly already present options (default 0) */
75 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
76 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
77 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
78 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
79} ;
80
81/** @brief the purpose string of the program */
82extern const char *gengetopt_args_info_purpose;
83/** @brief the usage string of the program */
84extern const char *gengetopt_args_info_usage;
85/** @brief the description string of the program */
86extern const char *gengetopt_args_info_description;
87/** @brief all the lines making the help output */
88extern const char *gengetopt_args_info_help[];
89
90/**
91 * The command line parser
92 * @param argc the number of command line options
93 * @param argv the command line options
94 * @param args_info the structure where option information will be stored
95 * @return 0 if everything went fine, NON 0 if an error took place
96 */
97int cmdline_parser (int argc, char **argv,
98 struct gengetopt_args_info *args_info);
99
100/**
101 * The command line parser (version with additional parameters - deprecated)
102 * @param argc the number of command line options
103 * @param argv the command line options
104 * @param args_info the structure where option information will be stored
105 * @param override whether to override possibly already present options
106 * @param initialize whether to initialize the option structure my_args_info
107 * @param check_required whether to check that all required options were provided
108 * @return 0 if everything went fine, NON 0 if an error took place
109 * @deprecated use cmdline_parser_ext() instead
110 */
111int cmdline_parser2 (int argc, char **argv,
112 struct gengetopt_args_info *args_info,
113 int override, int initialize, int check_required);
114
115/**
116 * The command line parser (version with additional parameters)
117 * @param argc the number of command line options
118 * @param argv the command line options
119 * @param args_info the structure where option information will be stored
120 * @param params additional parameters for the parser
121 * @return 0 if everything went fine, NON 0 if an error took place
122 */
123int cmdline_parser_ext (int argc, char **argv,
124 struct gengetopt_args_info *args_info,
125 struct cmdline_parser_params *params);
126
127/**
128 * Save the contents of the option struct into an already open FILE stream.
129 * @param outfile the stream where to dump options
130 * @param args_info the option struct to dump
131 * @return 0 if everything went fine, NON 0 if an error took place
132 */
133int cmdline_parser_dump(FILE *outfile,
134 struct gengetopt_args_info *args_info);
135
136/**
137 * Save the contents of the option struct into a (text) file.
138 * This file can be read by the config file parser (if generated by gengetopt)
139 * @param filename the file where to save
140 * @param args_info the option struct to save
141 * @return 0 if everything went fine, NON 0 if an error took place
142 */
143int cmdline_parser_file_save(const char *filename,
144 struct gengetopt_args_info *args_info);
145
146/**
147 * Print the help
148 */
150/**
151 * Print the version
152 */
154
155/**
156 * Initializes all the fields a cmdline_parser_params structure
157 * to their default values
158 * @param params the structure to initialize
159 */
161
162/**
163 * Allocates dynamically a cmdline_parser_params structure and initializes
164 * all its fields to their default values
165 * @return the created and initialized cmdline_parser_params structure
166 */
168
169/**
170 * Initializes the passed gengetopt_args_info structure's fields
171 * (also set default values for options that have a default)
172 * @param args_info the structure to initialize
173 */
174void cmdline_parser_init (struct gengetopt_args_info *args_info);
175/**
176 * Deallocates the string fields of the gengetopt_args_info structure
177 * (but does not deallocate the structure itself)
178 * @param args_info the structure to deallocate
179 */
180void cmdline_parser_free (struct gengetopt_args_info *args_info);
181
182/**
183 * Checks that all the required options were specified
184 * @param args_info the structure to check
185 * @param prog_name the name of the program that will be used to print
186 * possible errors
187 * @return
188 */
189int cmdline_parser_required (struct gengetopt_args_info *args_info,
190 const char *prog_name);
191
192
193#ifdef __cplusplus
194}
195#endif /* __cplusplus */
196#endif /* THERMALIZERCMD_H */
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 * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
char * temperature_orig
temperature (in Kelvin original value given at command line.
Definition HydroCmd.hpp:71
double chargetemperature_arg
charge temperature (K).
unsigned int chargetemperature_given
Whether chargetemperature was given.
unsigned inputs_num
unamed options number
char * chargetemperature_orig
charge temperature (K) original value given at command line.
const char * chargetemperature_help
charge temperature (K) help description.
unsigned int energy_given
Whether energy was given.
const char * help_help
Print help and exit help description.
char * output_arg
output file name.
char ** inputs
unamed options (options without names)
const char * temperature_help
temperature (in Kelvin help description.
Definition HydroCmd.hpp:72
char * input_arg
input dump file.
char * energy_orig
energy (kcal/mol) original value given at command line.
double temperature_arg
temperature (in Kelvin (default='300').
Definition HydroCmd.hpp:70
double energy_arg
energy (kcal/mol).
unsigned int temperature_given
Whether temperature was given.
Definition HydroCmd.hpp:85
unsigned int help_given
Whether help was given.
const char * energy_help
energy (kcal/mol) help description.
unsigned int input_given
Whether input was given.
unsigned int version_given
Whether version was given.
int thermalizer_group_counter
Counter for group thermalizer.
const char * version_help
Print version and exit help description.
char * input_orig
input dump file original value given at command line.
const char * input_help
input dump file help description.
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.
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.