qpms/apps/transop-ewald/transop_ewald_cmdline.h

271 lines
16 KiB
C
Raw Permalink Normal View History

/** @file transop_ewald_cmdline.h
* @brief The header file for the command line option parser
* generated by GNU Gengetopt version 2.22.6
* http://www.gnu.org/software/gengetopt.
* DO NOT modify this file, since it can be overwritten
* @author GNU Gengetopt by Lorenzo Bettini */
#ifndef TRANSOP_EWALD_CMDLINE_H
#define TRANSOP_EWALD_CMDLINE_H
/* If we use autoconf. */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h> /* for FILE */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef CMDLINE_PARSER_PACKAGE
/** @brief the program name (used for printing errors) */
#define CMDLINE_PARSER_PACKAGE "qpms-translations-ewald32"
#endif
#ifndef CMDLINE_PARSER_PACKAGE_NAME
/** @brief the complete program name (used for help and version) */
#define CMDLINE_PARSER_PACKAGE_NAME "qpms-translations-ewald32"
#endif
#ifndef CMDLINE_PARSER_VERSION
/** @brief the program version */
#define CMDLINE_PARSER_VERSION "dev"
#endif
enum enum_normalisation { normalisation__NULL = -1, normalisation_arg_Power = 0, normalisation_arg_None, normalisation_arg_SH };
enum enum_frequency_unit { frequency_unit__NULL = -1, frequency_unit_arg_eV = 0, frequency_unit_arg_scuff };
/** @brief Where the command line options are stored */
struct gengetopt_args_info
{
const char *help_help; /**< @brief Print help and exit help description. */
const char *detailed_help_help; /**< @brief Print help, including all details and hidden options, and exit help description. */
const char *version_help; /**< @brief Print version and exit help description. */
char * output_arg; /**< @brief Output file (default=''). */
char * output_orig; /**< @brief Output file original value given at command line. */
const char *output_help; /**< @brief Output file help description. */
char ** base_vector_arg; /**< @brief Base vector. */
char ** base_vector_orig; /**< @brief Base vector original value given at command line. */
unsigned int base_vector_min; /**< @brief Base vector's minimum occurreces */
unsigned int base_vector_max; /**< @brief Base vector's maximum occurreces */
const char *base_vector_help; /**< @brief Base vector help description. */
char * error_estimate_output_arg; /**< @brief Path to the output with error estimates. */
char * error_estimate_output_orig; /**< @brief Path to the output with error estimates original value given at command line. */
const char *error_estimate_output_help; /**< @brief Path to the output with error estimates help description. */
enum enum_normalisation normalisation_arg; /**< @brief VSWF normalisation convention (default='Power'). */
char * normalisation_orig; /**< @brief VSWF normalisation convention original value given at command line. */
const char *normalisation_help; /**< @brief VSWF normalisation convention help description. */
int csphase_arg; /**< @brief Whether the Condon-Shortley phase is included in VSWF definition (-1) or not (+1) (default='-1'). */
char * csphase_orig; /**< @brief Whether the Condon-Shortley phase is included in VSWF definition (-1) or not (+1) original value given at command line. */
const char *csphase_help; /**< @brief Whether the Condon-Shortley phase is included in VSWF definition (-1) or not (+1) help description. */
double Ewald_parameter_arg; /**< @brief The value of Ewald parameter η. */
char * Ewald_parameter_orig; /**< @brief The value of Ewald parameter η original value given at command line. */
const char *Ewald_parameter_help; /**< @brief The value of Ewald parameter η help description. */
enum enum_frequency_unit frequency_unit_arg; /**< @brief Specifies the frequency unit is used for inputs. (default='scuff'). */
char * frequency_unit_orig; /**< @brief Specifies the frequency unit is used for inputs. original value given at command line. */
const char *frequency_unit_help; /**< @brief Specifies the frequency unit is used for inputs. help description. */
int lMax_arg; /**< @brief Maximum spherical multipole order to which the translation operator elements are calculated. */
char * lMax_orig; /**< @brief Maximum spherical multipole order to which the translation operator elements are calculated original value given at command line. */
const char *lMax_help; /**< @brief Maximum spherical multipole order to which the translation operator elements are calculated help description. */
double refractive_index_arg; /**< @brief Medium refractive index. */
char * refractive_index_orig; /**< @brief Medium refractive index original value given at command line. */
const char *refractive_index_help; /**< @brief Medium refractive index help description. */
char ** particle_arg; /**< @brief Specify the x and y coordinates of a single particle; If not specified, one particle per unit cell is assumed.. */
char ** particle_orig; /**< @brief Specify the x and y coordinates of a single particle; If not specified, one particle per unit cell is assumed. original value given at command line. */
unsigned int particle_min; /**< @brief Specify the x and y coordinates of a single particle; If not specified, one particle per unit cell is assumed.'s minimum occurreces */
unsigned int particle_max; /**< @brief Specify the x and y coordinates of a single particle; If not specified, one particle per unit cell is assumed.'s maximum occurreces */
const char *particle_help; /**< @brief Specify the x and y coordinates of a single particle; If not specified, one particle per unit cell is assumed. help description. */
char ** pointfile_arg; /**< @brief Path to a file containing frequency, k_x, k_y triples(separated by white spaces). If not specified, read them from stdin. (default='-'). */
char ** pointfile_orig; /**< @brief Path to a file containing frequency, k_x, k_y triples(separated by white spaces). If not specified, read them from stdin. original value given at command line. */
unsigned int pointfile_min; /**< @brief Path to a file containing frequency, k_x, k_y triples(separated by white spaces). If not specified, read them from stdin.'s minimum occurreces */
unsigned int pointfile_max; /**< @brief Path to a file containing frequency, k_x, k_y triples(separated by white spaces). If not specified, read them from stdin.'s maximum occurreces */
const char *pointfile_help; /**< @brief Path to a file containing frequency, k_x, k_y triples(separated by white spaces). If not specified, read them from stdin. help description. */
char ** point_arg; /**< @brief Specifies a frequency, k_x, k_y triple, separated by commas.. */
char ** point_orig; /**< @brief Specifies a frequency, k_x, k_y triple, separated by commas. original value given at command line. */
unsigned int point_min; /**< @brief Specifies a frequency, k_x, k_y triple, separated by commas.'s minimum occurreces */
unsigned int point_max; /**< @brief Specifies a frequency, k_x, k_y triple, separated by commas.'s maximum occurreces */
const char *point_help; /**< @brief Specifies a frequency, k_x, k_y triple, separated by commas. help description. */
char ** omegafile_arg; /**< @brief Path to a file containing a list of frequenciesseparated by whitespaces.. */
char ** omegafile_orig; /**< @brief Path to a file containing a list of frequenciesseparated by whitespaces. original value given at command line. */
unsigned int omegafile_min; /**< @brief Path to a file containing a list of frequenciesseparated by whitespaces.'s minimum occurreces */
unsigned int omegafile_max; /**< @brief Path to a file containing a list of frequenciesseparated by whitespaces.'s maximum occurreces */
const char *omegafile_help; /**< @brief Path to a file containing a list of frequenciesseparated by whitespaces. help description. */
char ** omega_arg; /**< @brief Specifies frequency (or multiple frequencies separated by commas) on the command line.. */
char ** omega_orig; /**< @brief Specifies frequency (or multiple frequencies separated by commas) on the command line. original value given at command line. */
unsigned int omega_min; /**< @brief Specifies frequency (or multiple frequencies separated by commas) on the command line.'s minimum occurreces */
unsigned int omega_max; /**< @brief Specifies frequency (or multiple frequencies separated by commas) on the command line.'s maximum occurreces */
const char *omega_help; /**< @brief Specifies frequency (or multiple frequencies separated by commas) on the command line. help description. */
char ** kfile_arg; /**< @brief Path to a file containing a list of k_x, k_y pairs. (default='-'). */
char ** kfile_orig; /**< @brief Path to a file containing a list of k_x, k_y pairs. original value given at command line. */
unsigned int kfile_min; /**< @brief Path to a file containing a list of k_x, k_y pairs.'s minimum occurreces */
unsigned int kfile_max; /**< @brief Path to a file containing a list of k_x, k_y pairs.'s maximum occurreces */
const char *kfile_help; /**< @brief Path to a file containing a list of k_x, k_y pairs. help description. */
char ** k_arg; /**< @brief Specifies pair(s) of k_x, k_y values. */
char ** k_orig; /**< @brief Specifies pair(s) of k_x, k_y values original value given at command line. */
unsigned int k_min; /**< @brief Specifies pair(s) of k_x, k_y values's minimum occurreces */
unsigned int k_max; /**< @brief Specifies pair(s) of k_x, k_y values's maximum occurreces */
const char *k_help; /**< @brief Specifies pair(s) of k_x, k_y values help description. */
unsigned int help_given ; /**< @brief Whether help was given. */
unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
unsigned int version_given ; /**< @brief Whether version was given. */
unsigned int output_given ; /**< @brief Whether output was given. */
unsigned int base_vector_given ; /**< @brief Whether base-vector was given. */
unsigned int error_estimate_output_given ; /**< @brief Whether error-estimate-output was given. */
unsigned int normalisation_given ; /**< @brief Whether normalisation was given. */
unsigned int csphase_given ; /**< @brief Whether csphase was given. */
unsigned int Ewald_parameter_given ; /**< @brief Whether Ewald-parameter was given. */
unsigned int frequency_unit_given ; /**< @brief Whether frequency-unit was given. */
unsigned int lMax_given ; /**< @brief Whether lMax was given. */
unsigned int refractive_index_given ; /**< @brief Whether refractive-index was given. */
unsigned int particle_given ; /**< @brief Whether particle was given. */
unsigned int pointfile_given ; /**< @brief Whether pointfile was given. */
unsigned int point_given ; /**< @brief Whether point was given. */
unsigned int omegafile_given ; /**< @brief Whether omegafile was given. */
unsigned int omega_given ; /**< @brief Whether omega was given. */
unsigned int kfile_given ; /**< @brief Whether kfile was given. */
unsigned int k_given ; /**< @brief Whether k was given. */
int k_omega_meshgrid_mode_counter; /**< @brief Counter for mode k_omega_meshgrid */
int k_omega_points_mode_counter; /**< @brief Counter for mode k_omega_points */
} ;
/** @brief The additional parameters to pass to parser functions */
struct cmdline_parser_params
{
int override; /**< @brief whether to override possibly already present options (default 0) */
int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
int check_required; /**< @brief whether to check that all required options were provided (default 1) */
int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
} ;
/** @brief the purpose string of the program */
extern const char *gengetopt_args_info_purpose;
/** @brief the usage string of the program */
extern const char *gengetopt_args_info_usage;
/** @brief the description string of the program */
extern const char *gengetopt_args_info_description;
/** @brief all the lines making the help output */
extern const char *gengetopt_args_info_help[];
/** @brief all the lines making the detailed help output (including hidden options and details) */
extern const char *gengetopt_args_info_detailed_help[];
/**
* The command line parser
* @param argc the number of command line options
* @param argv the command line options
* @param args_info the structure where option information will be stored
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser (int argc, char **argv,
struct gengetopt_args_info *args_info);
/**
* The command line parser (version with additional parameters - deprecated)
* @param argc the number of command line options
* @param argv the command line options
* @param args_info the structure where option information will be stored
* @param override whether to override possibly already present options
* @param initialize whether to initialize the option structure my_args_info
* @param check_required whether to check that all required options were provided
* @return 0 if everything went fine, NON 0 if an error took place
* @deprecated use cmdline_parser_ext() instead
*/
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)
* @param argc the number of command line options
* @param argv the command line options
* @param args_info the structure where option information will be stored
* @param params additional parameters for the parser
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser_ext (int argc, char **argv,
struct gengetopt_args_info *args_info,
struct cmdline_parser_params *params);
/**
* Save the contents of the option struct into an already open FILE stream.
* @param outfile the stream where to dump options
* @param args_info the option struct to dump
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser_dump(FILE *outfile,
struct gengetopt_args_info *args_info);
/**
* Save the contents of the option struct into a (text) file.
* This file can be read by the config file parser (if generated by gengetopt)
* @param filename the file where to save
* @param args_info the option struct to save
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser_file_save(const char *filename,
struct gengetopt_args_info *args_info);
/**
* Print the help
*/
void cmdline_parser_print_help(void);
/**
* Print the detailed help (including hidden options and details)
*/
void cmdline_parser_print_detailed_help(void);
/**
* Print the version
*/
void cmdline_parser_print_version(void);
/**
* Initializes all the fields a cmdline_parser_params structure
* to their default values
* @param params the structure to initialize
*/
void cmdline_parser_params_init(struct cmdline_parser_params *params);
/**
* Allocates dynamically a cmdline_parser_params structure and initializes
* all its fields to their default values
* @return the created and initialized cmdline_parser_params structure
*/
struct cmdline_parser_params *cmdline_parser_params_create(void);
/**
* Initializes the passed gengetopt_args_info structure's fields
* (also set default values for options that have a default)
* @param args_info the structure to initialize
*/
void cmdline_parser_init (struct gengetopt_args_info *args_info);
/**
* Deallocates the string fields of the gengetopt_args_info structure
* (but does not deallocate the structure itself)
* @param args_info the structure to deallocate
*/
void cmdline_parser_free (struct gengetopt_args_info *args_info);
/**
* Checks that all the required options were specified
* @param args_info the structure to check
* @param prog_name the name of the program that will be used to print
* possible errors
* @return
*/
int cmdline_parser_required (struct gengetopt_args_info *args_info,
const char *prog_name);
extern const char *cmdline_parser_normalisation_values[]; /**< @brief Possible values for normalisation. */
extern const char *cmdline_parser_csphase_values[]; /**< @brief Possible values for csphase. */
extern const char *cmdline_parser_frequency_unit_values[]; /**< @brief Possible values for frequency-unit. */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* TRANSOP_EWALD_CMDLINE_H */