DUNE: Uniform Navigational Environment
2019.02.0
|
Public Member Functions | |
OptionParser (void) | |
~OptionParser (void) | |
bool | parse (int argc, char **argv) |
OptionParser & | program (const char *prog) |
OptionParser & | executable (const char *exe) |
OptionParser & | arch (const char *arc) |
OptionParser & | copyright (const char *cright) |
OptionParser & | date (const char *build_time) |
OptionParser & | version (const char *vers) |
OptionParser & | email (const char *contact) |
OptionParser & | description (const char *desc) |
OptionParser & | add (const char *short_opt, const char *long_opt, const char *description, const char *argument=0) |
void | usage (void) |
bool | bad (void) |
const char * | error (void) |
const std::string & | value (std::string option) |
DUNE::Utils::OptionParser::OptionParser | ( | void | ) |
References add().
DUNE::Utils::OptionParser::~OptionParser | ( | void | ) |
Destructor.
OptionParser & DUNE::Utils::OptionParser::add | ( | const char * | short_opt, |
const char * | long_opt, | ||
const char * | description, | ||
const char * | argument = 0 |
||
) |
Add a new option to the parser.
short_opt | short option, usually one hiffen and a character (eg. -x). |
long_opt | long option, usually two hiffens and a string (eg. –xxxx). |
description | option description. |
argument | a label for describing the option argument. |
References description(), and DUNE::Utils::String::str().
Referenced by OptionParser().
|
inline |
Set program's architecture.
arc | program's architecture. |
|
inline |
|
inline |
Set program's copyright.
cright | programs copyright. |
|
inline |
Set program's build time/date.
build_time | program's build time/date. |
|
inline |
Set program's description.
desc | program's description. |
Referenced by add().
|
inline |
Set program's email contact.
contact | program's email contact. |
|
inline |
|
inline |
Set program's executable file name.
exe | program's executable file name. |
|
inline |
Set program's name.
prog | program's name. |
void DUNE::Utils::OptionParser::usage | ( | void | ) |
Referenced by parse().
|
inline |
Referenced by parse().
|
inline |
Set program's version.
vers | program's version. |