MPD
0.20.18
|
Command line option parser. More...
#include <OptionParser.hxx>
Public Member Functions | |
OptionParser (int _argc, char **_argv) | |
Constructs OptionParser. More... | |
bool | HasEntries () const |
Checks if there are command line entries to process. More... | |
char * | GetOption () |
Gets the last parsed option. More... | |
bool | CheckOption (const OptionDef &opt) |
Checks if current option is a specified option. More... | |
bool | CheckOption (const OptionDef &opt, const OptionDef &alt_opt) |
Checks if current option is a specified option or specified alternative option. More... | |
bool | ParseNext () |
Parses current command line entry. More... | |
Static Public Member Functions | |
static bool | IsOption (const char *s) |
Checks if specified string is a command line option. More... | |
Command line option parser.
Definition at line 30 of file OptionParser.hxx.
|
inline |
Constructs OptionParser.
Definition at line 41 of file OptionParser.hxx.
bool OptionParser::CheckOption | ( | const OptionDef & | opt | ) |
Checks if current option is a specified option.
Checks if current option is a specified option or specified alternative option.
Definition at line 67 of file OptionParser.hxx.
|
inline |
Gets the last parsed option.
Definition at line 53 of file OptionParser.hxx.
|
inline |
Checks if there are command line entries to process.
Definition at line 48 of file OptionParser.hxx.
|
inlinestatic |
Checks if specified string is a command line option.
Definition at line 82 of file OptionParser.hxx.
bool OptionParser::ParseNext | ( | ) |
Parses current command line entry.
Returns true on success, false otherwise. Regardless of result, advances current position to the next command line entry.