All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines
Public Member Functions | Protected Member Functions
TCLAP::StdOutput Class Reference

#include <StdOutput.h>

Inheritance diagram for TCLAP::StdOutput:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void failure (CmdLineInterface &c, ArgException &e)
virtual void usage (CmdLineInterface &c)
virtual void version (CmdLineInterface &c)

Protected Member Functions

void _longUsage (CmdLineInterface &c, std::ostream &os) const
void _shortUsage (CmdLineInterface &c, std::ostream &os) const
void spacePrint (std::ostream &os, const std::string &s, int maxWidth, int indentSpaces, int secondLineOffset) const

Detailed Description

A class that isolates any output from the CmdLine object so that it may be easily modified.

Definition at line 43 of file StdOutput.h.


Member Function Documentation

void TCLAP::StdOutput::_longUsage ( CmdLineInterface c,
std::ostream &  os 
) const [inline, protected]

Writes a longer usage message with long and short args, provides descriptions and prints message.

Parameters:
c- The CmdLine object the output is generated for.
os- The stream to write the message to.

Definition at line 191 of file StdOutput.h.

void TCLAP::StdOutput::_shortUsage ( CmdLineInterface c,
std::ostream &  os 
) const [inline, protected]

Writes a brief usage message with short args.

Parameters:
c- The CmdLine object the output is generated for.
os- The stream to write the message to.

Definition at line 156 of file StdOutput.h.

void TCLAP::StdOutput::failure ( CmdLineInterface c,
ArgException e 
) [inline, virtual]

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 131 of file StdOutput.h.

void TCLAP::StdOutput::spacePrint ( std::ostream &  os,
const std::string &  s,
int  maxWidth,
int  indentSpaces,
int  secondLineOffset 
) const [inline, protected]

This function inserts line breaks and indents long strings according the params input. It will only break lines at spaces, commas and pipes.

Parameters:
os- The stream to be printed to.
s- The string to be printed.
maxWidth- The maxWidth allowed for the output line.
indentSpaces- The number of spaces to indent the first line.
secondLineOffset- The number of spaces to indent the second and all subsequent lines in addition to indentSpaces.

Definition at line 229 of file StdOutput.h.

void TCLAP::StdOutput::usage ( CmdLineInterface c) [inline, virtual]

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 117 of file StdOutput.h.

void TCLAP::StdOutput::version ( CmdLineInterface c) [inline, virtual]

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 108 of file StdOutput.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


mapstitch
Author(s): Philipp M. Scholl
autogenerated on Mon Jul 15 2013 16:57:34