tclap 1.2.6
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
TCLAP::DocBookOutput Class Reference

A class that generates DocBook output for usage() method for the given CmdLine and its Args. More...

#include <DocBookOutput.h>

Inheritance diagram for TCLAP::DocBookOutput:
Inheritance graph
[legend]
Collaboration diagram for TCLAP::DocBookOutput:
Collaboration graph
[legend]

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.
 
 DocBookOutput ()
 
- Public Member Functions inherited from TCLAP::CmdLineOutput
virtual ~CmdLineOutput ()
 Virtual destructor.
 

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 basename (std::string &s)
 
void printShortArg (Arg *it)
 
void printLongArg (Arg *it)
 

Static Protected Member Functions

static std::string escapeXml (const std::string &text)
 
static std::string valueLabel (const Arg &arg)
 

Protected Attributes

char theDelimiter
 

Detailed Description

A class that generates DocBook output for usage() method for the given CmdLine and its Args.

Definition at line 44 of file DocBookOutput.h.

Constructor & Destructor Documentation

◆ DocBookOutput()

TCLAP::DocBookOutput::DocBookOutput ( )
inline

Definition at line 72 of file DocBookOutput.h.

Member Function Documentation

◆ basename()

void TCLAP::DocBookOutput::basename ( std::string &  s)
inlineprotected

Definition at line 254 of file DocBookOutput.h.

Referenced by usage().

◆ escapeXml()

static std::string TCLAP::DocBookOutput::escapeXml ( const std::string &  text)
inlinestaticprotected

Definition at line 75 of file DocBookOutput.h.

Referenced by printLongArg(), printShortArg(), and usage().

◆ failure()

void TCLAP::DocBookOutput::failure ( CmdLineInterface &  c,
ArgException &  e 
)
inlinevirtual

Prints (to stderr) an error message, short usage Can be overridden to produce alternative behavior.

Parameters
c- The CmdLine object the output is generated for.
e- The ArgException that caused the failure.

Implements TCLAP::CmdLineOutput.

Definition at line 225 of file DocBookOutput.h.

References TCLAP::ArgException::what().

Here is the call graph for this function:

◆ printLongArg()

void TCLAP::DocBookOutput::printLongArg ( Arg *  it)
inlineprotected

◆ printShortArg()

void TCLAP::DocBookOutput::printShortArg ( Arg *  it)
inlineprotected

◆ removeChar()

void TCLAP::DocBookOutput::removeChar ( std::string &  s,
char  r 
)
inlineprotected

Definition at line 245 of file DocBookOutput.h.

◆ substituteSpecialChars()

void TCLAP::DocBookOutput::substituteSpecialChars ( std::string &  s,
char  r,
std::string &  x 
)
inlineprotected

Substitutes the char r for string x in string s.

Parameters
s- The string to operate on.
r- The char to replace.
x- What to replace r with.

Definition at line 233 of file DocBookOutput.h.

◆ usage()

void TCLAP::DocBookOutput::usage ( CmdLineInterface &  c)
inlinevirtual

◆ valueLabel()

static std::string TCLAP::DocBookOutput::valueLabel ( const Arg &  arg)
inlinestaticprotected

Definition at line 90 of file DocBookOutput.h.

References TCLAP::Arg::flagStartString(), TCLAP::Arg::getFlag(), TCLAP::Arg::getName(), TCLAP::Arg::nameStartString(), and TCLAP::Arg::shortID().

Referenced by printLongArg(), and printShortArg().

Here is the call graph for this function:

◆ version()

void TCLAP::DocBookOutput::version ( CmdLineInterface &  c)
inlinevirtual

Prints the version to stdout.

Can be overridden to produce alternative behavior.

Parameters
c- The CmdLine object the output is generated for.

Implements TCLAP::CmdLineOutput.

Definition at line 124 of file DocBookOutput.h.

References TCLAP::CmdLineInterface::getVersion().

Here is the call graph for this function:

Member Data Documentation

◆ theDelimiter

char TCLAP::DocBookOutput::theDelimiter
protected

Definition at line 120 of file DocBookOutput.h.

Referenced by printLongArg(), printShortArg(), and usage().


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