tclap  1.2.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TCLAP::ZshCompletionOutput Class Reference

A class that generates a Zsh completion function as output from the usage() method for the given CmdLine and its Args. More...

#include <ZshCompletionOutput.h>

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

Public Member Functions

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

Protected Member Functions

void basename (std::string &s)
 
void quoteSpecialChars (std::string &s)
 
std::string getMutexList (CmdLineInterface &_cmd, Arg *a)
 
void printOption (Arg *it, std::string mutex)
 
void printArg (Arg *it)
 

Protected Attributes

std::map< std::string, std::string > common
 
char theDelimiter
 

Detailed Description

A class that generates a Zsh completion function as output from the usage() method for the given CmdLine and its Args.

Definition at line 49 of file ZshCompletionOutput.h.

Constructor & Destructor Documentation

◆ ZshCompletionOutput()

TCLAP::ZshCompletionOutput::ZshCompletionOutput ( )

Definition at line 92 of file ZshCompletionOutput.h.

References common.

Member Function Documentation

◆ basename()

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

Definition at line 161 of file ZshCompletionOutput.h.

Referenced by usage().

◆ failure()

void TCLAP::ZshCompletionOutput::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 135 of file ZshCompletionOutput.h.

References TCLAP::ArgException::what().

Here is the call graph for this function:

◆ getMutexList()

std::string TCLAP::ZshCompletionOutput::getMutexList ( CmdLineInterface _cmd,
Arg a 
)
inlineprotected

◆ printArg()

void TCLAP::ZshCompletionOutput::printArg ( Arg it)
inlineprotected

Definition at line 170 of file ZshCompletionOutput.h.

References TCLAP::Arg::acceptsMultipleValues(), common, TCLAP::Arg::getName(), and TCLAP::Arg::isRequired().

Referenced by usage().

Here is the call graph for this function:

◆ printOption()

void TCLAP::ZshCompletionOutput::printOption ( Arg it,
std::string  mutex 
)
inlineprotected

◆ quoteSpecialChars()

void TCLAP::ZshCompletionOutput::quoteSpecialChars ( std::string &  s)
inlineprotected

Definition at line 142 of file ZshCompletionOutput.h.

Referenced by printOption().

◆ usage()

void TCLAP::ZshCompletionOutput::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 112 of file ZshCompletionOutput.h.

References basename(), TCLAP::CmdLineInterface::getArgList(), TCLAP::CmdLineInterface::getDelimiter(), getMutexList(), TCLAP::CmdLineInterface::getProgramName(), TCLAP::CmdLineInterface::getVersion(), printArg(), printOption(), and theDelimiter.

Here is the call graph for this function:

◆ version()

void TCLAP::ZshCompletionOutput::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 107 of file ZshCompletionOutput.h.

References TCLAP::CmdLineInterface::getVersion().

Here is the call graph for this function:

Member Data Documentation

◆ common

std::map<std::string, std::string> TCLAP::ZshCompletionOutput::common
protected

Definition at line 88 of file ZshCompletionOutput.h.

Referenced by printArg(), printOption(), and ZshCompletionOutput().

◆ theDelimiter

char TCLAP::ZshCompletionOutput::theDelimiter
protected

Definition at line 89 of file ZshCompletionOutput.h.

Referenced by printOption(), and usage().


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