![]() |
The ROme OpTimistic Simulator
3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
Command line option parser. More...
Go to the source code of this file.
Data Structures | |
struct | ap_option |
A single parsable command line option. More... | |
struct | ap_section |
A set of options organized and parsed together. More... | |
struct | ap_settings |
A complete command line option parsing setup. More... | |
Enumerations | |
enum | ap_event_key { AP_KEY_INIT = 1 << 14, AP_KEY_FINI, AP_KEY_INIT = 1 << 14, AP_KEY_FINI } |
The special events keys passed to command line parsing functions. More... | |
Functions | |
void | arg_parse_run (struct ap_settings *ap_s, char **argv) |
Parses the command line options. More... | |
const char * | arg_parse_program_name (void) |
Gets the program name. More... | |
void | arg_parse_error (const char *fmt,...) |
Prints a parsing related error message and exits with a bad exit code. More... | |
Command line option parser.
A command line option parser mimicking a subset of GNU argp features.
Definition in file arg_parse.h.
enum ap_event_key |
The special events keys passed to command line parsing functions.
Enumerator | |
---|---|
AP_KEY_INIT | Signals the start of the parsing process. |
AP_KEY_FINI | Signals the end of the parsing process. |
Definition at line 29 of file arg_parse.h.
void arg_parse_error | ( | const char * | fmt, |
... | |||
) |
Prints a parsing related error message and exits with a bad exit code.
fmt | the printf-style format string |
... | the arguments required to fill in the format string |
Definition at line 432 of file arg_parse.c.
const char* arg_parse_program_name | ( | void | ) |
Gets the program name.
Definition at line 422 of file arg_parse.c.
void arg_parse_run | ( | struct ap_settings * | ap_s, |
char ** | argv | ||
) |
Parses the command line options.
ap_s | the parsing settings (see struct ap_settings for more info) |
argv | the NULL terminated array of C strings from the command line |
Definition at line 382 of file arg_parse.c.