OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
equationofstateCmd.hpp
Go to the documentation of this file.
1/** @file equationofstateCmd.hpp
2 * @brief The header file for the command line option parser
3 * generated by GNU Gengetopt version 2.23
4 * http://www.gnu.org/software/gengetopt.
5 * DO NOT modify this file, since it can be overwritten
6 * @author GNU Gengetopt */
7
8#ifndef EQUATIONOFSTATECMD_H
9#define EQUATIONOFSTATECMD_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 "equationofstate"
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 "equationofstate"
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 use specified input (.omd) file. */
43 char * input_orig; /**< @brief use specified input (.omd) file original value given at command line. */
44 const char *input_help; /**< @brief use specified input (.omd) file help description. */
45 char * output_arg; /**< @brief use specified output file. */
46 char * output_orig; /**< @brief use specified output file original value given at command line. */
47 const char *output_help; /**< @brief use specified output file help description. */
48 double start_arg; /**< @brief starting affine scale (default='0.8'). */
49 char * start_orig; /**< @brief starting affine scale original value given at command line. */
50 const char *start_help; /**< @brief starting affine scale help description. */
51 double end_arg; /**< @brief ending affine scale (default='1.2'). */
52 char * end_orig; /**< @brief ending affine scale original value given at command line. */
53 const char *end_help; /**< @brief ending affine scale help description. */
54 int number_arg; /**< @brief number of data points (default='50'). */
55 char * number_orig; /**< @brief number of data points original value given at command line. */
56 const char *number_help; /**< @brief number of data points 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 start_given ; /**< @brief Whether start was given. */
63 unsigned int end_given ; /**< @brief Whether end was given. */
64 unsigned int number_given ; /**< @brief Whether number was given. */
65
66 char **inputs ; /**< @brief unnamed options (options without names) */
67 unsigned inputs_num ; /**< @brief unnamed options number */
68} ;
69
70/** @brief The additional parameters to pass to parser functions */
72{
73 int override; /**< @brief whether to override possibly already present options (default 0) */
74 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
75 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
76 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
77 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
78} ;
79
80/** @brief the purpose string of the program */
81extern const char *gengetopt_args_info_purpose;
82/** @brief the usage string of the program */
83extern const char *gengetopt_args_info_usage;
84/** @brief the description string of the program */
85extern const char *gengetopt_args_info_description;
86/** @brief all the lines making the help output */
87extern const char *gengetopt_args_info_help[];
88
89/**
90 * The command line parser
91 * @param argc the number of command line options
92 * @param argv the command line options
93 * @param args_info the structure where option information will be stored
94 * @return 0 if everything went fine, NON 0 if an error took place
95 */
96int cmdline_parser (int argc, char **argv,
97 struct gengetopt_args_info *args_info);
98
99/**
100 * The command line parser (version with additional parameters - deprecated)
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 * @param override whether to override possibly already present options
105 * @param initialize whether to initialize the option structure my_args_info
106 * @param check_required whether to check that all required options were provided
107 * @return 0 if everything went fine, NON 0 if an error took place
108 * @deprecated use cmdline_parser_ext() instead
109 */
110int cmdline_parser2 (int argc, char **argv,
111 struct gengetopt_args_info *args_info,
112 int override, int initialize, int check_required);
113
114/**
115 * The command line parser (version with additional parameters)
116 * @param argc the number of command line options
117 * @param argv the command line options
118 * @param args_info the structure where option information will be stored
119 * @param params additional parameters for the parser
120 * @return 0 if everything went fine, NON 0 if an error took place
121 */
122int cmdline_parser_ext (int argc, char **argv,
123 struct gengetopt_args_info *args_info,
124 struct cmdline_parser_params *params);
125
126/**
127 * Save the contents of the option struct into an already open FILE stream.
128 * @param outfile the stream where to dump options
129 * @param args_info the option struct to dump
130 * @return 0 if everything went fine, NON 0 if an error took place
131 */
132int cmdline_parser_dump(FILE *outfile,
133 struct gengetopt_args_info *args_info);
134
135/**
136 * Save the contents of the option struct into a (text) file.
137 * This file can be read by the config file parser (if generated by gengetopt)
138 * @param filename the file where to save
139 * @param args_info the option struct to save
140 * @return 0 if everything went fine, NON 0 if an error took place
141 */
142int cmdline_parser_file_save(const char *filename,
143 struct gengetopt_args_info *args_info);
144
145/**
146 * Print the help
147 */
149/**
150 * Print the version
151 */
153
154/**
155 * Initializes all the fields a cmdline_parser_params structure
156 * to their default values
157 * @param params the structure to initialize
158 */
160
161/**
162 * Allocates dynamically a cmdline_parser_params structure and initializes
163 * all its fields to their default values
164 * @return the created and initialized cmdline_parser_params structure
165 */
167
168/**
169 * Initializes the passed gengetopt_args_info structure's fields
170 * (also set default values for options that have a default)
171 * @param args_info the structure to initialize
172 */
173void cmdline_parser_init (struct gengetopt_args_info *args_info);
174/**
175 * Deallocates the string fields of the gengetopt_args_info structure
176 * (but does not deallocate the structure itself)
177 * @param args_info the structure to deallocate
178 */
179void cmdline_parser_free (struct gengetopt_args_info *args_info);
180
181/**
182 * Checks that all the required options were specified
183 * @param args_info the structure to check
184 * @param prog_name the name of the program that will be used to print
185 * possible errors
186 * @return
187 */
188int cmdline_parser_required (struct gengetopt_args_info *args_info,
189 const char *prog_name);
190
191
192#ifdef __cplusplus
193}
194#endif /* __cplusplus */
195#endif /* EQUATIONOFSTATECMD_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.
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 * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
const char * number_help
number of data points help description.
unsigned int end_given
Whether end was given.
char * start_orig
starting affine scale original value given at command line.
unsigned inputs_num
unamed options number
unsigned int number_given
Whether number was given.
const char * help_help
Print help and exit help description.
unsigned int start_given
Whether start was given.
char * output_arg
output file name.
char ** inputs
unamed options (options without names)
int number_arg
number of data points (default='50').
char * input_arg
input dump file.
double start_arg
starting affine scale (default='0.8').
const char * end_help
ending affine scale help description.
char * end_orig
ending affine scale original value given at command line.
unsigned int help_given
Whether help was given.
unsigned int input_given
Whether input was given.
unsigned int version_given
Whether version was given.
double end_arg
ending affine scale (default='1.2').
const char * version_help
Print version and exit help description.
const char * start_help
starting affine scale help description.
char * input_orig
input dump file original value given at command line.
char * number_orig
number of data points original value given at command line.
const char * input_help
input dump file help description.