tclap  1.4.0
Public Member Functions | 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. More...
 
virtual void version (CmdLineInterface &c)
 Prints the version to stdout. More...
 
virtual void failure (CmdLineInterface &c, ArgException &e)
 Prints (to stderr) an error message, short usage Can be overridden to produce alternative behavior. More...
 
 DocBookOutput ()
 
- Public Member Functions inherited from TCLAP::CmdLineOutput
virtual ~CmdLineOutput ()
 Virtual destructor. More...
 

Protected Member Functions

void substituteSpecialChars (std::string &s, char r, const std::string &x) const
 Substitutes the char r for string x in string s. More...
 
void removeChar (std::string &s, char r) const
 
void printShortArg (Arg *it, bool required)
 
void printLongArg (const ArgGroup &it) const
 

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 43 of file DocBookOutput.h.

Constructor & Destructor Documentation

◆ DocBookOutput()

TCLAP::DocBookOutput::DocBookOutput ( )
inline

Definition at line 67 of file DocBookOutput.h.

References printLongArg(), printShortArg(), removeChar(), and substituteSpecialChars().

Here is the call graph for this function:

Member Function Documentation

◆ 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 187 of file DocBookOutput.h.

References TCLAP::ArgException::what().

Here is the call graph for this function:

◆ printLongArg()

void TCLAP::DocBookOutput::printLongArg ( const ArgGroup it) const
inlineprotected

Definition at line 246 of file DocBookOutput.h.

Referenced by DocBookOutput(), and usage().

◆ printShortArg()

void TCLAP::DocBookOutput::printShortArg ( Arg it,
bool  required 
)
inlineprotected

Definition at line 209 of file DocBookOutput.h.

References TCLAP::Arg::acceptsMultipleValues(), removeChar(), TCLAP::Arg::shortID(), and substituteSpecialChars().

Referenced by DocBookOutput(), and usage().

Here is the call graph for this function:

◆ removeChar()

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

Definition at line 202 of file DocBookOutput.h.

Referenced by DocBookOutput(), and printShortArg().

◆ substituteSpecialChars()

void TCLAP::DocBookOutput::substituteSpecialChars ( std::string &  s,
char  r,
const std::string &  x 
) const
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 193 of file DocBookOutput.h.

Referenced by DocBookOutput(), and printShortArg().

◆ usage()

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

Prints the usage 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 104 of file DocBookOutput.h.

References TCLAP::CountVisibleArgs(), TCLAP::CmdLineInterface::getArgGroups(), TCLAP::CmdLineInterface::getDelimiter(), TCLAP::CmdLineInterface::getMessage(), TCLAP::CmdLineInterface::getProgramName(), TCLAP::CmdLineInterface::getVersion(), TCLAP::internal::GroupChoice(), printLongArg(), printShortArg(), and theDelimiter.

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 86 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 83 of file DocBookOutput.h.

Referenced by usage().


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