Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2f6559b7006594cad03af173263c219e > files > 3031

mrpt-doc-0.9.4-0.1.20110110svn2383.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>The MRPT project: TCLAP::MultiSwitchArg Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.2 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</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>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
          <span class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </span><span class="right"></span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><a class="el" href="namespace_t_c_l_a_p.html">TCLAP</a>      </li>
      <li><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html">MultiSwitchArg</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<h1>TCLAP::MultiSwitchArg Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="TCLAP::MultiSwitchArg" --><!-- doxytag: inherits="TCLAP::SwitchArg" --><hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A multiple switch argument. </p>
<p>If the switch is set on the command line, then the getValue method will return the number of times the switch appears. </p>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00039">39</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

<p><code>#include &lt;<a class="el" href="_multi_switch_arg_8h_source.html">mrpt/otherlibs/tclap/MultiSwitchArg.h</a>&gt;</code></p>
<!-- startSectionHeader --><div class="dynheader">
Inheritance diagram for TCLAP::MultiSwitchArg:<!-- endSectionHeader --></div>
<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
<div class="center"><img src="class_t_c_l_a_p_1_1_multi_switch_arg__inherit__graph.png" border="0" usemap="#_t_c_l_a_p_1_1_multi_switch_arg_inherit__map" alt="Inheritance graph"/></div>
<map name="_t_c_l_a_p_1_1_multi_switch_arg_inherit__map" id="_t_c_l_a_p_1_1_multi_switch_arg_inherit__map">
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>

<p><a href="class_t_c_l_a_p_1_1_multi_switch_arg-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#a37db9658517f206fd69936e1458d59b0">MultiSwitchArg</a> (const std::string &amp;flag, const std::string &amp;name, const std::string &amp;desc, int init=0, <a class="el" href="class_t_c_l_a_p_1_1_visitor.html">Visitor</a> *v=NULL)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html" title="A multiple switch argument.">MultiSwitchArg</a> constructor.  <a href="#a37db9658517f206fd69936e1458d59b0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#a0443d4a222630ac45aa67e40f2de3541">MultiSwitchArg</a> (const std::string &amp;flag, const std::string &amp;name, const std::string &amp;desc, <a class="el" href="class_t_c_l_a_p_1_1_cmd_line_interface.html">CmdLineInterface</a> &amp;parser, int init=0, <a class="el" href="class_t_c_l_a_p_1_1_visitor.html">Visitor</a> *v=NULL)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html" title="A multiple switch argument.">MultiSwitchArg</a> constructor.  <a href="#a0443d4a222630ac45aa67e40f2de3541"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#a91c3d349570f21d8af6dc90767d747a2">processArg</a> (int *i, std::vector&lt; std::string &gt; &amp;args)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles the processing of the argument.  <a href="#a91c3d349570f21d8af6dc90767d747a2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#a0389e414c11ebbab4a88dfbbf3af18bd">getValue</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns int, the number of times the switch has been set.  <a href="#a0389e414c11ebbab4a88dfbbf3af18bd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#a083c07003f948691e94ce94d0b6376ed">shortID</a> (const std::string &amp;val) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the shortID for this <a class="el" href="class_t_c_l_a_p_1_1_arg.html" title="A virtual base class that defines the essential data for all arguments.">Arg</a>.  <a href="#a083c07003f948691e94ce94d0b6376ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#a0b0aacc09c93462bab4347f86db0fccd">longID</a> (const std::string &amp;val) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the longID for this <a class="el" href="class_t_c_l_a_p_1_1_arg.html" title="A virtual base class that defines the essential data for all arguments.">Arg</a>.  <a href="#a0b0aacc09c93462bab4347f86db0fccd"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#ab488d4bcdde96fc9edea87ee9b6f5839">_value</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The value of the switch.  <a href="#ab488d4bcdde96fc9edea87ee9b6f5839"></a><br/></td></tr>
</table>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a37db9658517f206fd69936e1458d59b0"></a><!-- doxytag: member="TCLAP::MultiSwitchArg::MultiSwitchArg" ref="a37db9658517f206fd69936e1458d59b0" args="(const std::string &amp;flag, const std::string &amp;name, const std::string &amp;desc, int init=0, Visitor *v=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TCLAP::MultiSwitchArg::MultiSwitchArg </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>flag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>desc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>init</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_c_l_a_p_1_1_visitor.html">Visitor</a> *&#160;</td>
          <td class="paramname"> <em>v</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html" title="A multiple switch argument.">MultiSwitchArg</a> constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">flag</td><td>- The one character flag that identifies this argument on the command line. </td></tr>
    <tr><td class="paramname">name</td><td>- A one word name for the argument. Can be used as a long flag on the command line. </td></tr>
    <tr><td class="paramname">desc</td><td>- A description of what the argument is for or does. </td></tr>
    <tr><td class="paramname">init</td><td>- Optional. The initial/default value of this <a class="el" href="class_t_c_l_a_p_1_1_arg.html" title="A virtual base class that defines the essential data for all arguments.">Arg</a>. Defaults to 0. </td></tr>
    <tr><td class="paramname">v</td><td>- An optional visitor. You probably should not use this unless you have a very good reason. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00122">122</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0443d4a222630ac45aa67e40f2de3541"></a><!-- doxytag: member="TCLAP::MultiSwitchArg::MultiSwitchArg" ref="a0443d4a222630ac45aa67e40f2de3541" args="(const std::string &amp;flag, const std::string &amp;name, const std::string &amp;desc, CmdLineInterface &amp;parser, int init=0, Visitor *v=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TCLAP::MultiSwitchArg::MultiSwitchArg </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>flag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>desc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_c_l_a_p_1_1_cmd_line_interface.html">CmdLineInterface</a> &amp;&#160;</td>
          <td class="paramname"> <em>parser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>init</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_c_l_a_p_1_1_visitor.html">Visitor</a> *&#160;</td>
          <td class="paramname"> <em>v</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html" title="A multiple switch argument.">MultiSwitchArg</a> constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">flag</td><td>- The one character flag that identifies this argument on the command line. </td></tr>
    <tr><td class="paramname">name</td><td>- A one word name for the argument. Can be used as a long flag on the command line. </td></tr>
    <tr><td class="paramname">desc</td><td>- A description of what the argument is for or does. </td></tr>
    <tr><td class="paramname">parser</td><td>- A <a class="el" href="class_t_c_l_a_p_1_1_cmd_line.html" title="The base class that manages the command line definition and passes along the parsing to the appropria...">CmdLine</a> parser object to add this <a class="el" href="class_t_c_l_a_p_1_1_arg.html" title="A virtual base class that defines the essential data for all arguments.">Arg</a> to </td></tr>
    <tr><td class="paramname">init</td><td>- Optional. The initial/default value of this <a class="el" href="class_t_c_l_a_p_1_1_arg.html" title="A virtual base class that defines the essential data for all arguments.">Arg</a>. Defaults to 0. </td></tr>
    <tr><td class="paramname">v</td><td>- An optional visitor. You probably should not use this unless you have a very good reason. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00131">131</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

<p>References <a class="el" href="class_t_c_l_a_p_1_1_cmd_line_interface.html#a13b29ab754c030185e58f779dc355631">TCLAP::CmdLineInterface::add()</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0389e414c11ebbab4a88dfbbf3af18bd"></a><!-- doxytag: member="TCLAP::MultiSwitchArg::getValue" ref="a0389e414c11ebbab4a88dfbbf3af18bd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int TCLAP::MultiSwitchArg::getValue </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns int, the number of times the switch has been set. </p>

<p>Reimplemented from <a class="el" href="class_t_c_l_a_p_1_1_switch_arg.html#aed1bc8a81a9bda4013cfcf407ccc7716">TCLAP::SwitchArg</a>.</p>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00143">143</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

<p>References <a class="el" href="_multi_switch_arg_8h_source.html#l00046">_value</a>.</p>

</div>
</div>
<a class="anchor" id="a0b0aacc09c93462bab4347f86db0fccd"></a><!-- doxytag: member="TCLAP::MultiSwitchArg::longID" ref="a0b0aacc09c93462bab4347f86db0fccd" args="(const std::string &amp;val) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string TCLAP::MultiSwitchArg::longID </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>val</em>&#160;)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the longID for this <a class="el" href="class_t_c_l_a_p_1_1_arg.html" title="A virtual base class that defines the essential data for all arguments.">Arg</a>. </p>

<p>Reimplemented from <a class="el" href="class_t_c_l_a_p_1_1_arg.html#aad93aff46e1fc67e3853765f565bfa96">TCLAP::Arg</a>.</p>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00189">189</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

</div>
</div>
<a class="anchor" id="a91c3d349570f21d8af6dc90767d747a2"></a><!-- doxytag: member="TCLAP::MultiSwitchArg::processArg" ref="a91c3d349570f21d8af6dc90767d747a2" args="(int *i, std::vector&lt; std::string &gt; &amp;args)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TCLAP::MultiSwitchArg::processArg </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"> <em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"> <em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handles the processing of the argument. </p>
<p>This re-implements the <a class="el" href="class_t_c_l_a_p_1_1_switch_arg.html" title="A simple switch argument.">SwitchArg</a> version of this method to set the _value of the argument appropriately. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td>- Pointer the the current argument in the list. </td></tr>
    <tr><td class="paramname">args</td><td>- Mutable list of strings. Passed in from main(). </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="class_t_c_l_a_p_1_1_switch_arg.html#a624f98df6c4907efec95ffc353e9d08c">TCLAP::SwitchArg</a>.</p>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00145">145</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

<p>References <a class="el" href="_arg_8h_source.html#l00098">TCLAP::Arg::_alreadySet</a>, <a class="el" href="_arg_8h_source.html#l00510">TCLAP::Arg::_checkWithVisitor()</a>, <a class="el" href="_arg_8h_source.html#l00111">TCLAP::Arg::_ignoreable</a>, <a class="el" href="_multi_switch_arg_8h_source.html#l00046">_value</a>, <a class="el" href="_arg_8h_source.html#l00489">TCLAP::Arg::argMatches()</a>, <a class="el" href="_switch_arg_8h_source.html#l00139">TCLAP::SwitchArg::combinedSwitchesMatch()</a>, and <a class="el" href="_arg_8h_source.html#l00166">TCLAP::Arg::ignoreRest()</a>.</p>

</div>
</div>
<a class="anchor" id="a083c07003f948691e94ce94d0b6376ed"></a><!-- doxytag: member="TCLAP::MultiSwitchArg::shortID" ref="a083c07003f948691e94ce94d0b6376ed" args="(const std::string &amp;val) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string TCLAP::MultiSwitchArg::shortID </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"> <em>val</em>&#160;)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the shortID for this <a class="el" href="class_t_c_l_a_p_1_1_arg.html" title="A virtual base class that defines the essential data for all arguments.">Arg</a>. </p>

<p>Reimplemented from <a class="el" href="class_t_c_l_a_p_1_1_arg.html#aef8efaf3811162b2b2b2a84c6db280fa">TCLAP::Arg</a>.</p>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00182">182</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ab488d4bcdde96fc9edea87ee9b6f5839"></a><!-- doxytag: member="TCLAP::MultiSwitchArg::_value" ref="ab488d4bcdde96fc9edea87ee9b6f5839" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_t_c_l_a_p_1_1_multi_switch_arg.html#ab488d4bcdde96fc9edea87ee9b6f5839">TCLAP::MultiSwitchArg::_value</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The value of the switch. </p>

<p>Reimplemented from <a class="el" href="class_t_c_l_a_p_1_1_switch_arg.html#a0389ecebecc504d9756703d46e8cf3ca">TCLAP::SwitchArg</a>.</p>

<p>Definition at line <a class="el" href="_multi_switch_arg_8h_source.html#l00046">46</a> of file <a class="el" href="_multi_switch_arg_8h_source.html">MultiSwitchArg.h</a>.</p>

<p>Referenced by <a class="el" href="_multi_switch_arg_8h_source.html#l00143">getValue()</a>, and <a class="el" href="_multi_switch_arg_8h_source.html#l00145">processArg()</a>.</p>

</div>
</div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.2</a> for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table> </body></html>