|
mapgd
0.4
A program for the Maximum-likelihood analysis of population genomic data.
|
A class for handling options and automatically formating –help, -h, -u and -v. More...
#include <interface.h>
Public Member Functions | |
| void | set_name (const char *c) |
| void | set_version (const char *c) |
| void | set_author (const char *c) |
| void | set_description (const char *c) |
| void | optional_arg (char opt_, char *lopt_, void *parm_, int(*func_)(int, char **, void *), char *emsg_, char *umsg_) |
| adds an optional argument to the list of arguments accepted by the program. | |
| template<class Type > | |
| void | optional_arg (char opt_, char *lopt_, Type &parm_, char *emsg_, char *umsg_) |
| template<class Type > | |
| void | positional_arg (char opt_, char *lopt_, Type &parm_, char *emsg_, char *umsg_) |
| template<class Type > | |
| void | positional_arg (Type &parm_, char *emsg_, char *umsg_) |
| void | required_arg (char opt_, char *lopt_, void *parm_, int(*func_)(int, char **, void *), char *emsg_, char *umsg_) |
| adds an required argument to the list of arguments accepted by the program. More... | |
| template<class Type > | |
| void | required_arg (char opt_, char *lopt_, Type &parm_, char *emsg_, char *umsg_) |
| void | command (char opt_, char *lopt_, int(*func_)(int, char **), char *emsg_, char *umsg_) |
| adds a function to be executed that can accept argc and argv [] arguments. More... | |
| void | flag (char opt_, char *lopt_, void *parm_, int(*func_)(void *), char *emsg_, char *umsg_) |
| adds a flag to the list of flags that can be accepted by the environment. More... | |
| bool | required_set (void) |
| Checks to see if all required arguments are set. More... | |
| void | set_footer (const char *) |
| void | close (void) |
Data Fields | |
| const char * | name |
| the name of the command | |
| const char * | version |
| the version | |
| const char * | author |
| author(s) | |
| const char * | description |
| a brief description of the command being executed | |
| const char * | footer_ |
| The ending text of the help menu. | |
| std::list< Flag > | flags |
| A list of flags that can be set. | |
| std::list< Argument > | args |
| A list of options that can be passed from the command line. | |
| std::list< Command > | commands |
| A list of sub-commands that can be called from the command line. | |
| std::list< Argument * > | required_args |
| A list of options, all of which must be set. | |
| std::list< Argument * > | positional_args |
| A list of options that are called in order. | |
| std::list< Command * > | required_coms |
| A list of sub-commands, one of which must be run. | |
A class for handling options and automatically formating –help, -h, -u and -v.
|
inline |
adds a function to be executed that can accept argc and argv [] arguments.
If a command is set, then an error is raised if no command is provided. Commands execute in order in which they are passed by the user. Commands only return an exit status, so no further processing of the argc and argv variables can be done by the environment in which a command is called.
|
inline |
adds a flag to the list of flags that can be accepted by the environment.
Flags can be passed either separately, or in a concatenated list if their short form is used.
|
inline |
adds an required argument to the list of arguments accepted by the program.
-1 is returned by parsargs when required arguments are not provided.
|
inline |
Checks to see if all required arguments are set.
Returns 1 if all required arguments are set, 0 if they are not.
1.8.6