MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Static Public Member Functions
OptionParser Class Reference

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...

## Detailed Description

Command line option parser.

Definition at line 30 of file OptionParser.hxx.

## Constructor & Destructor Documentation

OptionParser::OptionParser | ( | int | _argc,
|  | char ** | _argv
| ) |  |
| inline

Constructs OptionParser.

Definition at line 41 of file OptionParser.hxx.

## Member Function Documentation

bool OptionParser::CheckOption | ( | const OptionDef & | opt | ) |

Checks if current option is a specified option.

bool OptionParser::CheckOption | ( | const OptionDef & | opt,
|  | const OptionDef & | alt_opt
| ) |  |
| inline

Checks if current option is a specified option or specified alternative option.

Definition at line 67 of file OptionParser.hxx.

char* OptionParser::GetOption | ( |  | ) |
| inline

Gets the last parsed option.

Definition at line 53 of file OptionParser.hxx.

bool OptionParser::HasEntries | ( |  | ) | const
| inline

Checks if there are command line entries to process.

Definition at line 48 of file OptionParser.hxx.

static bool OptionParser::IsOption | ( | const char * | s | ) |
| inline static

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.

The documentation for this class was generated from the following file:

- util/OptionParser.hxx