Command line parser. More...
#include <cmdline_parameters.h>
Public Types | |
|
typedef std::vector < cmdline_parameter > | params |
| Command line parameters. | |
Public Member Functions | |
| cmdline_parameters () | |
| Constructor. | |
| void | add (const cmdline_parameter ¶m) |
| Register known command line parameter. | |
| bool | parse (int argc, char *argv[], cmdline_parameter ¶m) |
| Parse command line. | |
| params::const_iterator | begin () const |
| Registered command line parameters iterator. | |
| params::const_iterator | end () const |
| Registered command line parameters iterator. | |
Command line parser.
This class represents application command line parameter list and parser.
| params::const_iterator dbp::cmdline_parameters::begin | ( | ) | const |
Registered command line parameters iterator.
Returns the iterator for the beginning of registered command line parameters collection.
| params::const_iterator dbp::cmdline_parameters::end | ( | ) | const |
Registered command line parameters iterator.
Returns the iterator for the ending of registered command line parameters collection.
| bool dbp::cmdline_parameters::parse | ( | int | argc, | |
| char * | argv[], | |||
| cmdline_parameter & | param | |||
| ) |
Parse command line.
Parses given command line. After sequential calls iterates throw all command line parameters found.
| argc | the command line parameters count. | |
| argv[] | pointer to the command line. | |
| param | (out) the next command line parameter found. |