23#ifndef TCLAP_STDCMDLINEOUTPUT_H
24#define TCLAP_STDCMDLINEOUTPUT_H
100 const std::string&
s,
113 std::cout << std::endl <<
progName <<
" version: "
114 <<
xversion << std::endl << std::endl;
119 std::cout << std::endl <<
"USAGE: " << std::endl << std::endl;
123 std::cout << std::endl << std::endl <<
"Where: " << std::endl << std::endl;
127 std::cout << std::endl;
136 std::cerr <<
"PARSE ERROR: " <<
e.argId() << std::endl
137 <<
" " <<
e.error() << std::endl << std::endl;
141 std::cerr <<
"Brief USAGE: " << std::endl;
145 std::cerr << std::endl <<
"For complete USAGE and HELP type: "
146 << std::endl <<
" " <<
progName <<
" "
148 << std::endl << std::endl;
158 std::ostream&
os )
const
168 for (
int i = 0;
static_cast<unsigned int>(
i) <
xorList.size();
i++ )
173 s += (*it)->shortID() +
"|";
175 s[
s.length()-1] =
'}';
181 s +=
" " + (*it)->shortID();
193 std::ostream&
os )
const
201 for (
int i = 0;
static_cast<unsigned int>(
i) <
xorList.size();
i++ )
213 os << std::endl << std::endl;
231 const std::string&
s,
236 int len =
static_cast<int>(
s.length());
294 os <<
s << std::endl;
A simple class that defines and argument exception.
static const std::string nameStartString()
The base class that manages the command line definition and passes along the parsing to the appropria...
virtual XorHandler & getXorHandler()=0
Returns the XorHandler.
virtual bool hasHelpAndVersion()=0
Indicates whether or not the help and version switches were created automatically.
virtual std::list< Arg * > & getArgList()=0
Returns the argList.
virtual std::string & getProgramName()=0
Returns the program name string.
virtual std::string & getVersion()=0
Returns the version string.
virtual std::string & getMessage()=0
Returns the message string.
The interface that any output object must implement.
A class that isolates any output from the CmdLine object so that it may be easily modified.
void spacePrint(std::ostream &os, const std::string &s, int maxWidth, int indentSpaces, int secondLineOffset) const
This function inserts line breaks and indents long strings according the params input.
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.
void _shortUsage(CmdLineInterface &c, std::ostream &os) const
Writes a brief usage message with short args.
void _longUsage(CmdLineInterface &c, std::ostream &os) const
Writes a longer usage message with long and short args, provides descriptions and prints message.
virtual void usage(CmdLineInterface &c)
Prints the usage to stdout.
This class handles lists of Arg's that are to be XOR'd on the command line.
std::vector< std::vector< Arg * > > & getXorList()
std::vector< Arg * >::iterator ArgVectorIterator
Typedef of an Arg vector iterator.
std::list< Arg * >::iterator ArgListIterator
Typedef of an Arg list iterator.