2019-06-18 13:36:57 +03:00
/** @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 } ;
2019-06-18 14:48:39 +03:00
enum enum_frequency_unit { frequency_unit__NULL = - 1 , frequency_unit_arg_eV = 0 , frequency_unit_arg_scuff } ;
2019-06-18 13:36:57 +03:00
/** @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. */
2019-06-18 15:52:28 +03:00
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. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 14:48:39 +03:00
enum enum_frequency_unit frequency_unit_arg ; /**< @brief Specifies the frequency unit is used for inputs. (default='scuff'). */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 15:52:28 +03:00
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. */
2019-06-18 14:48:39 +03:00
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. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 14:48:39 +03:00
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. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 14:48:39 +03:00
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. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 14:48:39 +03:00
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. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 15:52:28 +03:00
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. */
2019-06-18 14:48:39 +03:00
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. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 14:48:39 +03:00
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. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 15:52:28 +03:00
unsigned int base_vector_given ; /**< @brief Whether base-vector was given. */
2019-06-18 13:36:57 +03:00
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. */
2019-06-18 15:52:28 +03:00
unsigned int refractive_index_given ; /**< @brief Whether refractive-index was given. */
2019-06-18 13:36:57 +03:00
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 */