BASIS  version 1.2.3 (revision 2104)
Public Member Functions | Protected Member Functions | Protected Attributes
sbia::basis::StdOutput Class Reference

Prints help, version information, and command-line errors. More...

+ Inheritance diagram for sbia::basis::StdOutput:
+ Collaboration diagram for sbia::basis::StdOutput:

List of all members.

Public Member Functions

virtual void failure (TCLAP::CmdLineInterface &, TCLAP::ArgException &e)
 Prints an error message.
CmdLinegetCmdLine ()
 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.

Detailed Description

Prints help, version information, and command-line errors.

Definition at line 45 of file CmdLine.cxx.


Constructor & Destructor Documentation

sbia::basis::StdOutput::StdOutput ( CmdLine cmd)

Constructor.

Parameters:
[in]cmdThe command-line with additional attributes for which the output is generated.

Definition at line 186 of file CmdLine.cxx.


Member Function Documentation

void sbia::basis::StdOutput::failure ( TCLAP::CmdLineInterface ,
TCLAP::ArgException e 
) [virtual]

Prints an error message.

Parameters:
[in]eThe 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.

Parameters:
[in]argCommand-line argument.
[in]allWhether to include also optional short flags.
Returns:
Short argument description.

Definition at line 278 of file CmdLine.cxx.

CmdLine* sbia::basis::StdOutput::getCmdLine ( ) [inline]

Get corresponding command-line object.

Returns:
Command-line with additional attributes for which the output is generated.

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.

Parameters:
[in]argCommand-line argument.
Returns:
String describing type of argument value.

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.

Parameters:
[in]argCommand-line argument.
Returns:
Whether the given argument is a positional 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.

Parameters:
[in]osOutput stream.
[in]argCommand-line argument.
[in]indentFirstLineWhether 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.

Parameters:
[in]osOutput stream.
[in]allEnable/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.

Parameters:
[in]osOutput stream.

Definition at line 532 of file CmdLine.cxx.

void sbia::basis::StdOutput::printDescription ( ostream &  os) const [protected]

Prints program description.

Parameters:
[in]osOutput stream.

Definition at line 403 of file CmdLine.cxx.

void sbia::basis::StdOutput::printExample ( ostream &  os) const [protected]

Print example usage.

Parameters:
[in]osOutput stream.

Definition at line 510 of file CmdLine.cxx.

void sbia::basis::StdOutput::printUsage ( ostream &  os,
bool  heading = true 
) const [protected]

Prints usage information, i.e., synopsis.

Parameters:
[in]osOutput stream.
[in]headingEnable/disable output of section heading.

Definition at line 313 of file CmdLine.cxx.


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