db2cppc_cmdline.h File Reference
The header file for the command line option parser generated by GNU Gengetopt version 2.22.2 http://www.gnu.org/software/gengetopt.
More...
#include <stdio.h>
Go to the source code of this file.
Classes |
struct | db2cppc_args |
| Where the command line options are stored. More...
|
struct | cmdline_parser_params |
| The additional parameters to pass to parser functions. More...
|
Defines |
#define | CMDLINE_PARSER_PACKAGE "db2cppc" |
| the program name (used for printing errors)
|
#define | CMDLINE_PARSER_PACKAGE_NAME "db2cppc" |
| the complete program name (used for help and version)
|
#define | CMDLINE_PARSER_VERSION "1.0.2" |
| the program version
|
Functions |
int | cmdline_parser (int argc, char *const *argv, struct db2cppc_args *args_info) |
| The command line parser.
|
int | cmdline_parser2 (int argc, char *const *argv, struct db2cppc_args *args_info, int override, int initialize, int check_required) |
| The command line parser (version with additional parameters - deprecated).
|
int | cmdline_parser_ext (int argc, char *const *argv, struct db2cppc_args *args_info, struct cmdline_parser_params *params) |
| The command line parser (version with additional parameters).
|
int | cmdline_parser_dump (FILE *outfile, struct db2cppc_args *args_info) |
| Save the contents of the option struct into an already open FILE stream.
|
int | cmdline_parser_file_save (const char *filename, struct db2cppc_args *args_info) |
| Save the contents of the option struct into a (text) file.
|
void | cmdline_parser_print_help (void) |
| Print the help.
|
void | cmdline_parser_print_version (void) |
| Print the version.
|
void | cmdline_parser_params_init (struct cmdline_parser_params *params) |
| Initializes all the fields a cmdline_parser_params structure to their default values.
|
struct cmdline_parser_params * | cmdline_parser_params_create (void) |
| Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their default values.
|
void | cmdline_parser_init (struct db2cppc_args *args_info) |
| Initializes the passed db2cppc_args structure's fields (also set default values for options that have a default).
|
void | cmdline_parser_free (struct db2cppc_args *args_info) |
| Deallocates the string fields of the db2cppc_args structure (but does not deallocate the structure itself).
|
int | cmdline_parser_required (struct db2cppc_args *args_info, const char *prog_name) |
| Checks that all the required options were specified.
|
Variables |
const char * | db2cppc_args_purpose |
| the purpose string of the program
|
const char * | db2cppc_args_usage |
| the usage string of the program
|
const char * | db2cppc_args_help [] |
| all the lines making the help output
|
Detailed Description
The header file for the command line option parser generated by GNU Gengetopt version 2.22.2 http://www.gnu.org/software/gengetopt.
DO NOT modify this file, since it can be overwritten
- Author:
- GNU Gengetopt by Lorenzo Bettini
Definition in file db2cppc_cmdline.h.
Define Documentation
#define CMDLINE_PARSER_PACKAGE "db2cppc" |
#define CMDLINE_PARSER_PACKAGE_NAME "db2cppc" |
the complete program name (used for help and version)
Definition at line 29 of file db2cppc_cmdline.h.
#define CMDLINE_PARSER_VERSION "1.0.2" |
Function Documentation
int cmdline_parser |
( |
int |
argc, |
|
|
char *const * |
argv, |
|
|
struct db2cppc_args * |
args_info | |
|
) |
| | |
The command line parser.
- Parameters:
-
| argc | the number of command line options |
| argv | the command line options |
| args_info | the structure where option information will be stored |
- Returns:
- 0 if everything went fine, NON 0 if an error took place
int cmdline_parser2 |
( |
int |
argc, |
|
|
char *const * |
argv, |
|
|
struct db2cppc_args * |
args_info, |
|
|
int |
override, |
|
|
int |
initialize, |
|
|
int |
check_required | |
|
) |
| | |
The command line parser (version with additional parameters - deprecated).
- Parameters:
-
| argc | the number of command line options |
| argv | the command line options |
| args_info | the structure where option information will be stored |
| override | whether to override possibly already present options |
| initialize | whether to initialize the option structure my_args_info |
| check_required | whether to check that all required options were provided |
- Returns:
- 0 if everything went fine, NON 0 if an error took place
- Deprecated:
- use cmdline_parser_ext() instead
The command line parser (version with additional parameters).
- Parameters:
-
| argc | the number of command line options |
| argv | the command line options |
| args_info | the structure where option information will be stored |
| params | additional parameters for the parser |
- Returns:
- 0 if everything went fine, NON 0 if an error took place
int cmdline_parser_dump |
( |
FILE * |
outfile, |
|
|
struct db2cppc_args * |
args_info | |
|
) |
| | |
Save the contents of the option struct into an already open FILE stream.
- Parameters:
-
| outfile | the stream where to dump options |
| args_info | the option struct to dump |
- Returns:
- 0 if everything went fine, NON 0 if an error took place
int cmdline_parser_file_save |
( |
const char * |
filename, |
|
|
struct db2cppc_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)
- Parameters:
-
| filename | the file where to save |
| args_info | the option struct to save |
- Returns:
- 0 if everything went fine, NON 0 if an error took place
void cmdline_parser_print_help |
( |
void |
|
) |
|
void cmdline_parser_print_version |
( |
void |
|
) |
|
Initializes all the fields a cmdline_parser_params structure to their default values.
- Parameters:
-
| params | the structure to initialize |
void cmdline_parser_init |
( |
struct db2cppc_args * |
args_info |
) |
|
Initializes the passed db2cppc_args structure's fields (also set default values for options that have a default).
- Parameters:
-
| args_info | the structure to initialize |
void cmdline_parser_free |
( |
struct db2cppc_args * |
args_info |
) |
|
Deallocates the string fields of the db2cppc_args structure (but does not deallocate the structure itself).
- Parameters:
-
| args_info | the structure to deallocate |
int cmdline_parser_required |
( |
struct db2cppc_args * |
args_info, |
|
|
const char * |
prog_name | |
|
) |
| | |
Checks that all the required options were specified.
- Parameters:
-
| args_info | the structure to check |
| prog_name | the name of the program that will be used to print possible errors |
- Returns:
Variable Documentation
the purpose string of the program
the usage string of the program
all the lines making the help output