Prints help, version information, and command-line errors. More...
Public Member Functions | |
virtual void | failure (TCLAP::CmdLineInterface &, TCLAP::ArgException &e) |
Prints an error message. | |
CmdLine * | getCmdLine () |
Get corresponding command-line object. | |
virtual void | help (TCLAP::CmdLineInterface &) |
Prints the full help. | |
StdOutput (CmdLine *cmd) | |
Constructor. | |
virtual void | usage (TCLAP::CmdLineInterface &) |
Prints a short help, i.e., usage information. | |
virtual void | version (TCLAP::CmdLineInterface &) |
Prints the version information. | |
Protected Member Functions | |
string | getArgumentID (TCLAP::Arg *arg, bool all=false) const |
Get argument usage string. | |
string | getTypeDescription (TCLAP::Arg *arg) const |
Get string describing type of argument value. | |
bool | isUnlabeledArg (TCLAP::Arg *arg) const |
Determine whether an argument has a label or not. | |
void | printArgumentHelp (ostream &os, TCLAP::Arg *arg, bool indentFirstLine=true) const |
Prints help of command-line argument. | |
void | printArguments (ostream &os, bool all) const |
Prints command-line arguments. | |
void | printContact (ostream &os) const |
Print contact information. | |
void | printDescription (ostream &os) const |
Prints program description. | |
void | printExample (ostream &os) const |
Print example usage. | |
void | printUsage (ostream &os, bool heading=true) const |
Protected Attributes | |
CmdLine * | _cmd |
The command-line with additional attributes. | |
set< string > | _stdargs |
Names of standard arguments. |
Prints help, version information, and command-line errors.
Definition at line 45 of file CmdLine.cxx.
sbia::basis::StdOutput::StdOutput | ( | CmdLine * | cmd | ) |
Constructor.
[in] | cmd | The command-line with additional attributes for which the output is generated. |
Definition at line 186 of file CmdLine.cxx.
void sbia::basis::StdOutput::failure | ( | TCLAP::CmdLineInterface & | , |
TCLAP::ArgException & | e | ||
) | [virtual] |
Prints an error message.
[in] | e | The exception that caused the failure. |
Reimplemented from TCLAP::StdOutput.
Definition at line 244 of file CmdLine.cxx.
string sbia::basis::StdOutput::getArgumentID | ( | TCLAP::Arg * | arg, |
bool | all = false |
||
) | const [inline, protected] |
Get argument usage string.
[in] | arg | Command-line argument. |
[in] | all | Whether to include also optional short flags. |
Definition at line 278 of file CmdLine.cxx.
CmdLine* sbia::basis::StdOutput::getCmdLine | ( | ) | [inline] |
Get corresponding command-line object.
Definition at line 91 of file CmdLine.cxx.
string sbia::basis::StdOutput::getTypeDescription | ( | TCLAP::Arg * | arg | ) | const [inline, protected] |
Get string describing type of argument value.
[in] | arg | Command-line argument. |
Definition at line 265 of file CmdLine.cxx.
bool sbia::basis::StdOutput::isUnlabeledArg | ( | TCLAP::Arg * | arg | ) | const [inline, protected] |
Determine whether an argument has a label or not.
[in] | arg | Command-line argument. |
Definition at line 257 of file CmdLine.cxx.
void sbia::basis::StdOutput::printArgumentHelp | ( | ostream & | os, |
TCLAP::Arg * | arg, | ||
bool | indentFirstLine = true |
||
) | const [inline, protected] |
Prints help of command-line argument.
[in] | os | Output stream. |
[in] | arg | Command-line argument. |
[in] | indentFirstLine | Whether first line should be indented. |
Definition at line 299 of file CmdLine.cxx.
void sbia::basis::StdOutput::printArguments | ( | ostream & | os, |
bool | all | ||
) | const [protected] |
Prints command-line arguments.
[in] | os | Output stream. |
[in] | all | Enable/disable help output of all arguments or only the more important arguments. |
Definition at line 413 of file CmdLine.cxx.
void sbia::basis::StdOutput::printContact | ( | ostream & | os | ) | const [protected] |
Print contact information.
[in] | os | Output stream. |
Definition at line 532 of file CmdLine.cxx.
void sbia::basis::StdOutput::printDescription | ( | ostream & | os | ) | const [protected] |
Prints program description.
[in] | os | Output stream. |
Definition at line 403 of file CmdLine.cxx.
void sbia::basis::StdOutput::printExample | ( | ostream & | os | ) | const [protected] |
void sbia::basis::StdOutput::printUsage | ( | ostream & | os, |
bool | heading = true |
||
) | const [protected] |
Prints usage information, i.e., synopsis.
[in] | os | Output stream. |
[in] | heading | Enable/disable output of section heading. |
Definition at line 313 of file CmdLine.cxx.