A class that generates DocBook output for usage() method for the given CmdLine and its Args.
Definition at line 42 of file DocBookOutput.h.
#include <mrpt/otherlibs/tclap/DocBookOutput.h>
Public Member Functions | |
virtual void | usage (CmdLineInterface &c) |
Prints the usage to stdout. | |
virtual void | version (CmdLineInterface &c) |
Prints the version to stdout. | |
virtual void | failure (CmdLineInterface &c, ArgException &e) |
Prints (to stderr) an error message, short usage Can be overridden to produce alternative behavior. | |
Protected Member Functions | |
void | substituteSpecialChars (std::string &s, char r, std::string &x) |
Substitutes the char r for string x in string s. | |
void | removeChar (std::string &s, char r) |
void | printShortArg (Arg *it) |
void | printLongArg (Arg *it) |
void TCLAP::DocBookOutput::failure | ( | CmdLineInterface & | c, |
ArgException & | e | ||
) | [inline, virtual] |
Prints (to stderr) an error message, short usage Can be overridden to produce alternative behavior.
c | - The CmdLine object the output is generated for. |
e | - The ArgException that caused the failure. |
Implements TCLAP::CmdLineOutput.
Definition at line 191 of file DocBookOutput.h.
References TCLAP::ArgException::what().
void TCLAP::DocBookOutput::printLongArg | ( | Arg * | it ) | [inline, protected] |
Definition at line 245 of file DocBookOutput.h.
References TCLAP::Arg::getDescription(), TCLAP::Arg::longID(), removeChar(), and substituteSpecialChars().
Referenced by usage().
void TCLAP::DocBookOutput::printShortArg | ( | Arg * | it ) | [inline, protected] |
Definition at line 218 of file DocBookOutput.h.
References TCLAP::Arg::acceptsMultipleValues(), TCLAP::Arg::isRequired(), removeChar(), TCLAP::Arg::shortID(), and substituteSpecialChars().
Referenced by usage().
void TCLAP::DocBookOutput::removeChar | ( | std::string & | s, |
char | r | ||
) | [inline, protected] |
Definition at line 209 of file DocBookOutput.h.
Referenced by printLongArg(), and printShortArg().
void TCLAP::DocBookOutput::substituteSpecialChars | ( | std::string & | s, |
char | r, | ||
std::string & | x | ||
) | [inline, protected] |
Substitutes the char r for string x in string s.
s | - The string to operate on. |
r | - The char to replace. |
x | - What to replace r with. |
Definition at line 197 of file DocBookOutput.h.
Referenced by printLongArg(), and printShortArg().
void TCLAP::DocBookOutput::usage | ( | CmdLineInterface & | c ) | [inline, virtual] |
Prints the usage to stdout.
Can be overridden to produce alternative behavior.
c | - The CmdLine object the output is generated for. |
Implements TCLAP::CmdLineOutput.
Definition at line 91 of file DocBookOutput.h.
References begin(), TCLAP::XorHandler::contains(), TCLAP::CmdLineInterface::getArgList(), TCLAP::CmdLineInterface::getMessage(), TCLAP::CmdLineInterface::getProgramName(), TCLAP::CmdLineInterface::getVersion(), TCLAP::CmdLineInterface::getXorHandler(), TCLAP::XorHandler::getXorList(), printLongArg(), printShortArg(), and version().
void TCLAP::DocBookOutput::version | ( | CmdLineInterface & | c ) | [inline, virtual] |
Prints the version to stdout.
Can be overridden to produce alternative behavior.
c | - The CmdLine object the output is generated for. |
Implements TCLAP::CmdLineOutput.
Definition at line 86 of file DocBookOutput.h.
References TCLAP::CmdLineInterface::getVersion().
Referenced by usage().
Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |