Logo Search packages:      
Sourcecode: jellyfish version File versions  Download package

generate_sequence_cmdline.hpp

Go to the documentation of this file.
/** @file generate_sequence_cmdline.hpp
 *  @brief The header file for the command line option parser
 *  generated by GNU Gengetopt version 2.22.4
 *  http://www.gnu.org/software/gengetopt.
 *  DO NOT modify this file, since it can be overwritten
 *  @author GNU Gengetopt by Lorenzo Bettini */

#ifndef GENERATE_SEQUENCE_CMDLINE_H
#define GENERATE_SEQUENCE_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 GENERATE_SEQUENCE_CMDLINE_PACKAGE
/** @brief the program name (used for printing errors) */
00024 #define GENERATE_SEQUENCE_CMDLINE_PACKAGE "generate_sequence"
#endif

#ifndef GENERATE_SEQUENCE_CMDLINE_PACKAGE_NAME
/** @brief the complete program name (used for help and version) */
00029 #define GENERATE_SEQUENCE_CMDLINE_PACKAGE_NAME "generate_sequence"
#endif

#ifndef GENERATE_SEQUENCE_CMDLINE_VERSION
/** @brief the program version */
00034 #define GENERATE_SEQUENCE_CMDLINE_VERSION VERSION
#endif

/** @brief Where the command line options are stored */
00038 struct generate_sequence_args
{
00040   const char *help_help; /**< @brief Print help and exit help description.  */
00041   const char *version_help; /**< @brief Print version and exit help description.  */
00042   long seed_arg;  /**< @brief Seed.  */
00043   char * seed_orig;     /**< @brief Seed original value given at command line.  */
00044   const char *seed_help; /**< @brief Seed help description.  */
00045   int* mer_arg;   /**< @brief Mer length. Generate matrix of size 2*length.  */
00046   char ** mer_orig;     /**< @brief Mer length. Generate matrix of size 2*length original value given at command line.  */
00047   unsigned int mer_min; /**< @brief Mer length. Generate matrix of size 2*length's minimum occurreces */
00048   unsigned int mer_max; /**< @brief Mer length. Generate matrix of size 2*length's maximum occurreces */
00049   const char *mer_help; /**< @brief Mer length. Generate matrix of size 2*length help description.  */
00050   char * output_arg;    /**< @brief Output prefix (default='output').  */
00051   char * output_orig;   /**< @brief Output prefix original value given at command line.  */
00052   const char *output_help; /**< @brief Output prefix help description.  */
00053   int fastq_flag; /**< @brief Generate fastq file (default=off).  */
00054   const char *fastq_help; /**< @brief Generate fastq file help description.  */
00055   int read_length_arg;  /**< @brief Read length for fasta format (default=size of sequence).  */
00056   char * read_length_orig;    /**< @brief Read length for fasta format (default=size of sequence) original value given at command line.  */
00057   const char *read_length_help; /**< @brief Read length for fasta format (default=size of sequence) help description.  */
00058   int verbose_flag;     /**< @brief Be verbose (default=off).  */
00059   const char *verbose_help; /**< @brief Be verbose help description.  */
  
00061   unsigned int help_given ;   /**< @brief Whether help was given.  */
00062   unsigned int version_given ;      /**< @brief Whether version was given.  */
00063   unsigned int seed_given ;   /**< @brief Whether seed was given.  */
00064   unsigned int mer_given ;    /**< @brief Whether mer was given.  */
00065   unsigned int output_given ; /**< @brief Whether output was given.  */
00066   unsigned int fastq_given ;  /**< @brief Whether fastq was given.  */
00067   unsigned int read_length_given ;  /**< @brief Whether read-length was given.  */
00068   unsigned int verbose_given ;      /**< @brief Whether verbose was given.  */

00070   char **inputs ; /**< @brief unamed options (options without names) */
00071   unsigned inputs_num ; /**< @brief unamed options number */
} ;

/** @brief The additional parameters to pass to parser functions */
00075 struct generate_sequence_cmdline_params
{
00077   int override; /**< @brief whether to override possibly already present options (default 0) */
00078   int initialize; /**< @brief whether to initialize the option structure generate_sequence_args (default 1) */
00079   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
00080   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure generate_sequence_args (default 0) */
00081   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 *generate_sequence_args_purpose;
/** @brief the usage string of the program */
extern const char *generate_sequence_args_usage;
/** @brief all the lines making the help output */
extern const char *generate_sequence_args_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 generate_sequence_cmdline (int argc, char **argv,
  struct generate_sequence_args *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 generate_sequence_cmdline_ext() instead
 */
int generate_sequence_cmdline2 (int argc, char **argv,
  struct generate_sequence_args *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 generate_sequence_cmdline_ext (int argc, char **argv,
  struct generate_sequence_args *args_info,
  struct generate_sequence_cmdline_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 generate_sequence_cmdline_dump(FILE *outfile,
  struct generate_sequence_args *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 generate_sequence_cmdline_file_save(const char *filename,
  struct generate_sequence_args *args_info);

/**
 * Print the help
 */
void generate_sequence_cmdline_print_help(void);
/**
 * Print the version
 */
void generate_sequence_cmdline_print_version(void);

/**
 * Initializes all the fields a generate_sequence_cmdline_params structure 
 * to their default values
 * @param params the structure to initialize
 */
void generate_sequence_cmdline_params_init(struct generate_sequence_cmdline_params *params);

/**
 * Allocates dynamically a generate_sequence_cmdline_params structure and initializes
 * all its fields to their default values
 * @return the created and initialized generate_sequence_cmdline_params structure
 */
struct generate_sequence_cmdline_params *generate_sequence_cmdline_params_create(void);

/**
 * Initializes the passed generate_sequence_args structure's fields
 * (also set default values for options that have a default)
 * @param args_info the structure to initialize
 */
void generate_sequence_cmdline_init (struct generate_sequence_args *args_info);
/**
 * Deallocates the string fields of the generate_sequence_args structure
 * (but does not deallocate the structure itself)
 * @param args_info the structure to deallocate
 */
void generate_sequence_cmdline_free (struct generate_sequence_args *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 generate_sequence_cmdline_required (struct generate_sequence_args *args_info,
  const char *prog_name);


#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* GENERATE_SEQUENCE_CMDLINE_H */

Generated by  Doxygen 1.6.0   Back to index