1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>tclap: TCLAP::StdOutput Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.0 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceTCLAP.html">TCLAP</a>::<a class="el" href="classTCLAP_1_1StdOutput.html">StdOutput</a>
</div>
</div>
<div class="contents">
<h1>TCLAP::StdOutput Class Reference</h1><!-- doxytag: class="TCLAP::StdOutput" --><!-- doxytag: inherits="TCLAP::CmdLineOutput" -->
<p>A class that isolates any output from the <a class="el" href="classTCLAP_1_1CmdLine.html" title="The base class that manages the command line definition and passes along the parsing...">CmdLine</a> object so that it may be easily modified.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for TCLAP::StdOutput:</div>
<div class="dynsection">
<div class="center">
<img src="classTCLAP_1_1StdOutput.gif" usemap="#TCLAP::StdOutput_map" alt=""/>
<map id="TCLAP::StdOutput_map" name="TCLAP::StdOutput_map">
<area href="classTCLAP_1_1CmdLineOutput.html" alt="TCLAP::CmdLineOutput" shape="rect" coords="0,0,144,24"/>
</map>
</div>
</div>
<p><a href="classTCLAP_1_1StdOutput-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTCLAP_1_1StdOutput.html#aeb10eb400e0ee45f2cde689bef606b49">usage</a> (<a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> &c)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Prints the usage to stdout. <a href="#aeb10eb400e0ee45f2cde689bef606b49"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTCLAP_1_1StdOutput.html#a768111a59af4753ac6e5ace3ec99482e">version</a> (<a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> &c)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Prints the version to stdout. <a href="#a768111a59af4753ac6e5ace3ec99482e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTCLAP_1_1StdOutput.html#a9afc267e012c3ac42c8b1afe01f98556">failure</a> (<a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> &c, <a class="el" href="classTCLAP_1_1ArgException.html">ArgException</a> &e)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Prints (to stderr) an error message, short usage Can be overridden to produce alternative behavior. <a href="#a9afc267e012c3ac42c8b1afe01f98556"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTCLAP_1_1StdOutput.html#a60fa57587838d506d907f08800f2631c">_shortUsage</a> (<a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> &c, std::ostream &os) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Writes a brief usage message with short args. <a href="#a60fa57587838d506d907f08800f2631c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTCLAP_1_1StdOutput.html#ace725aebd685c16f464d697e85e0327d">_longUsage</a> (<a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> &c, std::ostream &os) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Writes a longer usage message with long and short args, provides descriptions and prints message. <a href="#ace725aebd685c16f464d697e85e0327d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTCLAP_1_1StdOutput.html#a38661be8895e07c442c2c3138b7444a2">spacePrint</a> (std::ostream &os, const std::string &s, int maxWidth, int indentSpaces, int secondLineOffset) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This function inserts line breaks and indents long strings according the params input. <a href="#a38661be8895e07c442c2c3138b7444a2"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A class that isolates any output from the <a class="el" href="classTCLAP_1_1CmdLine.html" title="The base class that manages the command line definition and passes along the parsing...">CmdLine</a> object so that it may be easily modified. </p>
<p>Definition at line <a class="el" href="StdOutput_8h_source.html#l00043">43</a> of file <a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ace725aebd685c16f464d697e85e0327d"></a><!-- doxytag: member="TCLAP::StdOutput::_longUsage" ref="ace725aebd685c16f464d697e85e0327d" args="(CmdLineInterface &c, std::ostream &os) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TCLAP::StdOutput::_longUsage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> & </td>
<td class="paramname"> <em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::ostream & </td>
<td class="paramname"> <em>os</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes a longer usage message with long and short args, provides descriptions and prints message. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>- The <a class="el" href="classTCLAP_1_1CmdLine.html" title="The base class that manages the command line definition and passes along the parsing...">CmdLine</a> object the output is generated for. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>os</em> </td><td>- The stream to write the message to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="StdOutput_8h_source.html#l00191">191</a> of file <a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>.</p>
<p>References <a class="el" href="XorHandler_8h_source.html#l00141">TCLAP::XorHandler::contains()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a4de8d988f5a6f3007c4dfb0fc9dad476">TCLAP::CmdLineInterface::getArgList()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a30175a2567f7ab78a2c6bbea9269a2fa">TCLAP::CmdLineInterface::getMessage()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a11ce9c77a1111960741f05e343849e4e">TCLAP::CmdLineInterface::getXorHandler()</a>, <a class="el" href="XorHandler_8h_source.html#l00153">TCLAP::XorHandler::getXorList()</a>, and <a class="el" href="StdOutput_8h_source.html#l00229">spacePrint()</a>.</p>
<p>Referenced by <a class="el" href="StdOutput_8h_source.html#l00117">usage()</a>.</p>
</div>
</div>
<a class="anchor" id="a60fa57587838d506d907f08800f2631c"></a><!-- doxytag: member="TCLAP::StdOutput::_shortUsage" ref="a60fa57587838d506d907f08800f2631c" args="(CmdLineInterface &c, std::ostream &os) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TCLAP::StdOutput::_shortUsage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> & </td>
<td class="paramname"> <em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::ostream & </td>
<td class="paramname"> <em>os</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes a brief usage message with short args. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>- The <a class="el" href="classTCLAP_1_1CmdLine.html" title="The base class that manages the command line definition and passes along the parsing...">CmdLine</a> object the output is generated for. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>os</em> </td><td>- The stream to write the message to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="StdOutput_8h_source.html#l00156">156</a> of file <a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>.</p>
<p>References <a class="el" href="XorHandler_8h_source.html#l00141">TCLAP::XorHandler::contains()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a4de8d988f5a6f3007c4dfb0fc9dad476">TCLAP::CmdLineInterface::getArgList()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a1a5672df72a6b5021cd70b37c4dbd0a7">TCLAP::CmdLineInterface::getProgramName()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a11ce9c77a1111960741f05e343849e4e">TCLAP::CmdLineInterface::getXorHandler()</a>, <a class="el" href="XorHandler_8h_source.html#l00153">TCLAP::XorHandler::getXorList()</a>, and <a class="el" href="StdOutput_8h_source.html#l00229">spacePrint()</a>.</p>
<p>Referenced by <a class="el" href="StdOutput_8h_source.html#l00131">failure()</a>, and <a class="el" href="StdOutput_8h_source.html#l00117">usage()</a>.</p>
</div>
</div>
<a class="anchor" id="a9afc267e012c3ac42c8b1afe01f98556"></a><!-- doxytag: member="TCLAP::StdOutput::failure" ref="a9afc267e012c3ac42c8b1afe01f98556" args="(CmdLineInterface &c, ArgException &e)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TCLAP::StdOutput::failure </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> & </td>
<td class="paramname"> <em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classTCLAP_1_1ArgException.html">ArgException</a> & </td>
<td class="paramname"> <em>e</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Prints (to stderr) an error message, short usage Can be overridden to produce alternative behavior. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>- The <a class="el" href="classTCLAP_1_1CmdLine.html" title="The base class that manages the command line definition and passes along the parsing...">CmdLine</a> object the output is generated for. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>- The <a class="el" href="classTCLAP_1_1ArgException.html" title="A simple class that defines and argument exception.">ArgException</a> that caused the failure. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classTCLAP_1_1CmdLineOutput.html#ad23a57ac3d8d957a4328fc78aec94e16">TCLAP::CmdLineOutput</a>.</p>
<p>Definition at line <a class="el" href="StdOutput_8h_source.html#l00131">131</a> of file <a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>.</p>
<p>References <a class="el" href="StdOutput_8h_source.html#l00156">_shortUsage()</a>, <a class="el" href="ArgException_8h_source.html#l00069">TCLAP::ArgException::argId()</a>, <a class="el" href="ArgException_8h_source.html#l00064">TCLAP::ArgException::error()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a1a5672df72a6b5021cd70b37c4dbd0a7">TCLAP::CmdLineInterface::getProgramName()</a>, <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a441b06b764836a62083b163508210905">TCLAP::CmdLineInterface::hasHelpAndVersion()</a>, and <a class="el" href="StdOutput_8h_source.html#l00117">usage()</a>.</p>
</div>
</div>
<a class="anchor" id="a38661be8895e07c442c2c3138b7444a2"></a><!-- doxytag: member="TCLAP::StdOutput::spacePrint" ref="a38661be8895e07c442c2c3138b7444a2" args="(std::ostream &os, const std::string &s, int maxWidth, int indentSpaces, int secondLineOffset) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TCLAP::StdOutput::spacePrint </td>
<td>(</td>
<td class="paramtype">std::ostream & </td>
<td class="paramname"> <em>os</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"> <em>s</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>maxWidth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>indentSpaces</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>secondLineOffset</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This function inserts line breaks and indents long strings according the params input. </p>
<p>It will only break lines at spaces, commas and pipes. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>os</em> </td><td>- The stream to be printed to. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>- The string to be printed. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>maxWidth</em> </td><td>- The maxWidth allowed for the output line. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>indentSpaces</em> </td><td>- The number of spaces to indent the first line. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>secondLineOffset</em> </td><td>- The number of spaces to indent the second and all subsequent lines in addition to indentSpaces. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="StdOutput_8h_source.html#l00229">229</a> of file <a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>.</p>
<p>Referenced by <a class="el" href="StdOutput_8h_source.html#l00191">_longUsage()</a>, and <a class="el" href="StdOutput_8h_source.html#l00156">_shortUsage()</a>.</p>
</div>
</div>
<a class="anchor" id="aeb10eb400e0ee45f2cde689bef606b49"></a><!-- doxytag: member="TCLAP::StdOutput::usage" ref="aeb10eb400e0ee45f2cde689bef606b49" args="(CmdLineInterface &c)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TCLAP::StdOutput::usage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> & </td>
<td class="paramname"> <em>c</em></td>
<td> ) </td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Prints the usage to stdout. </p>
<p>Can be overridden to produce alternative behavior. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>- The <a class="el" href="classTCLAP_1_1CmdLine.html" title="The base class that manages the command line definition and passes along the parsing...">CmdLine</a> object the output is generated for. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classTCLAP_1_1CmdLineOutput.html#a685b13db5bf6bbe5159e49169cd96bbe">TCLAP::CmdLineOutput</a>.</p>
<p>Definition at line <a class="el" href="StdOutput_8h_source.html#l00117">117</a> of file <a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>.</p>
<p>References <a class="el" href="StdOutput_8h_source.html#l00191">_longUsage()</a>, and <a class="el" href="StdOutput_8h_source.html#l00156">_shortUsage()</a>.</p>
<p>Referenced by <a class="el" href="StdOutput_8h_source.html#l00131">failure()</a>.</p>
</div>
</div>
<a class="anchor" id="a768111a59af4753ac6e5ace3ec99482e"></a><!-- doxytag: member="TCLAP::StdOutput::version" ref="a768111a59af4753ac6e5ace3ec99482e" args="(CmdLineInterface &c)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TCLAP::StdOutput::version </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classTCLAP_1_1CmdLineInterface.html">CmdLineInterface</a> & </td>
<td class="paramname"> <em>c</em></td>
<td> ) </td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Prints the version to stdout. </p>
<p>Can be overridden to produce alternative behavior. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>- The <a class="el" href="classTCLAP_1_1CmdLine.html" title="The base class that manages the command line definition and passes along the parsing...">CmdLine</a> object the output is generated for. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classTCLAP_1_1CmdLineOutput.html#ae052fea473132482296de55edb3dd480">TCLAP::CmdLineOutput</a>.</p>
<p>Definition at line <a class="el" href="StdOutput_8h_source.html#l00108">108</a> of file <a class="el" href="StdOutput_8h_source.html">StdOutput.h</a>.</p>
<p>References <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a1a5672df72a6b5021cd70b37c4dbd0a7">TCLAP::CmdLineInterface::getProgramName()</a>, and <a class="el" href="classTCLAP_1_1CmdLineInterface.html#a0a552fa57212800dfb8aec84fb07b8bb">TCLAP::CmdLineInterface::getVersion()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="StdOutput_8h_source.html">StdOutput.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Sat Apr 16 15:34:25 2011 for tclap by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.0 </small></address>
</body>
</html>
|