Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 4f5f2dc0f55b453456458df885792b0b > files > 310

ucommon-doc-5.0.4-1mdv2010.2.i586.rpm

<!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/xhtml;charset=UTF-8"/>
<title>ucommon: ucommon::shell::Option 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.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00208.html">ucommon</a>::<a class="el" href="a00129.html">shell</a>::<a class="el" href="a00137.html">Option</a>
  </div>
</div>
<div class="contents">
<h1>ucommon::shell::Option Class Reference</h1><!-- doxytag: class="ucommon::shell::Option" --><!-- doxytag: inherits="ucommon::OrderedObject" -->
<p>A base class used to create parsable shell options.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00197_source.html">shell.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ucommon::shell::Option:</div>
<div class="dynsection">
<div class="center"><img src="a00521.png" border="0" usemap="#ucommon_1_1shell_1_1_option_inherit__map" alt="Inheritance graph"/></div>
<map name="ucommon_1_1shell_1_1_option_inherit__map" id="ucommon_1_1shell_1_1_option_inherit__map">
<area shape="rect" id="node9" href="a00130.html" title="Character option for shell parsing." alt="" coords="1184,5,1435,32"/><area shape="rect" id="node11" href="a00131.html" title="Counter option for shell parsing." alt="" coords="1168,56,1451,83"/><area shape="rect" id="node13" href="a00133.html" title="Flag option for shell parsing." alt="" coords="1184,107,1435,133"/><area shape="rect" id="node15" href="a00134.html" title="Grouping option." alt="" coords="1179,157,1440,184"/><area shape="rect" id="node17" href="a00136.html" title="Numeric option for shell parsing." alt="" coords="1168,208,1451,235"/><area shape="rect" id="node19" href="a00139.html" title="Text option for shell parsing." alt="" coords="1173,259,1445,285"/><area shape="rect" id="node2" href="a00101.html" title="A linked object base class for ordered objects." alt="" coords="587,132,829,159"/><area shape="rect" id="node4" href="a00067.html" title="Common base class for all objects that can be formed into a linked list." alt="" coords="307,132,539,159"/><area shape="rect" id="node6" href="a00095.html" title="A common base class for all managed objects." alt="" coords="7,132,257,159"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucommon::shell::Option:</div>
<div class="dynsection">
<div class="center"><img src="a00522.png" border="0" usemap="#ucommon_1_1shell_1_1_option_coll__map" alt="Collaboration graph"/></div>
<map name="ucommon_1_1shell_1_1_option_coll__map" id="ucommon_1_1shell_1_1_option_coll__map">
<area shape="rect" id="node2" href="a00101.html" title="A linked object base class for ordered objects." alt="" coords="9,176,252,203"/><area shape="rect" id="node4" href="a00067.html" title="Common base class for all objects that can be formed into a linked list." alt="" coords="15,91,247,117"/><area shape="rect" id="node6" href="a00095.html" title="A common base class for all managed objects." alt="" coords="5,5,256,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<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 char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#aa44b7ed754b92370aed1a686f54b478e">assign</a> (char *value)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to send option into derived receiver.  <a href="#aa44b7ed754b92370aed1a686f54b478e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#ab8d7665f86a2b95c82d2de5908094da8">disable</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disable a option.  <a href="#ab8d7665f86a2b95c82d2de5908094da8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#ab38e44a159a375493107622323438133">Option</a> (char short_option=0, char *long_option=((void *) 0), char *value_type=((void *) 0), char *help=((void *) 0))</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a shell parser option.  <a href="#ab38e44a159a375493107622323438133"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7dafef7978c94bb4b838213e89125074"></a><!-- doxytag: member="ucommon::shell::Option::first" ref="a7dafef7978c94bb4b838213e89125074" args="(void)" -->
static <a class="el" href="a00067.html">LinkedObject</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>first</b> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa92919fabdeb0ef5d66186acd573e540"></a><!-- doxytag: member="ucommon::shell::Option::reset" ref="aa92919fabdeb0ef5d66186acd573e540" args="(void)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><b>reset</b> (void)</td></tr>
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1cfc0f5e0c25248e5f0214040eea2bac"></a><!-- doxytag: member="ucommon::shell::Option::help_string" ref="a1cfc0f5e0c25248e5f0214040eea2bac" args="" -->
char *&nbsp;</td><td class="memItemRight" valign="bottom"><b>help_string</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b17252b484131131302fbaaad86b189"></a><!-- doxytag: member="ucommon::shell::Option::long_option" ref="a0b17252b484131131302fbaaad86b189" args="" -->
char *&nbsp;</td><td class="memItemRight" valign="bottom"><b>long_option</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a86efe34854a016f635a054f2db4fcf10"></a><!-- doxytag: member="ucommon::shell::Option::short_option" ref="a86efe34854a016f635a054f2db4fcf10" args="" -->
char&nbsp;</td><td class="memItemRight" valign="bottom"><b>short_option</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac790da1f125a9cc82eaee2ca9c007e5c"></a><!-- doxytag: member="ucommon::shell::Option::trigger_option" ref="ac790da1f125a9cc82eaee2ca9c007e5c" args="" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>trigger_option</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e753dd64687c3f078e4ff8159149fb4"></a><!-- doxytag: member="ucommon::shell::Option::uses_option" ref="a3e753dd64687c3f078e4ff8159149fb4" args="" -->
char *&nbsp;</td><td class="memItemRight" valign="bottom"><b>uses_option</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A base class used to create parsable shell options. </p>
<p>The virtual is invoked when the shell option is detected. Both short and long forms of argument parsing are supported. An instance of a derived class is created to perform the argument parsing. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="a00197_source.html#l00333">333</a> of file <a class="el" href="a00197_source.html">shell.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab38e44a159a375493107622323438133"></a><!-- doxytag: member="ucommon::shell::Option::Option" ref="ab38e44a159a375493107622323438133" args="(char short_option=0, char *long_option=((void *) 0), char *value_type=((void *) 0), char *help=((void *) 0))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucommon::shell::Option::Option </td>
          <td>(</td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>short_option</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>long_option</em> = <code>((void&nbsp;*)&nbsp;0)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>value_type</em> = <code>((void&nbsp;*)&nbsp;0)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>help</em> = <code>((void&nbsp;*)&nbsp;0)</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct a shell parser option. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>short_option</em>&nbsp;</td><td>for single character code. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>long_option</em>&nbsp;</td><td>for extended string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value_type</em>&nbsp;</td><td>if -x value or -long=yyy. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>help</em>&nbsp;</td><td>string, future use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa44b7ed754b92370aed1a686f54b478e"></a><!-- doxytag: member="ucommon::shell::Option::assign" ref="aa44b7ed754b92370aed1a686f54b478e" args="(char *value)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual char* ucommon::shell::Option::assign </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used to send option into derived receiver. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>option that was received. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NULL or error string to use. </dd></dl>

<p>Implemented in <a class="el" href="a00139.html#a7eabe1f8f43630eb0d8b3a604af7516f">ucommon::shell::stringopt</a>, <a class="el" href="a00130.html#a9ce8fec3453b8074c9d0d307af5702d0">ucommon::shell::charopt</a>, <a class="el" href="a00136.html#ad82b62e7d78a2e8c17172a51412dbbeb">ucommon::shell::numericopt</a>, and <a class="el" href="a00131.html#ae1fab65cdc21c519b62b29e266bc6f7d">ucommon::shell::counteropt</a>.</p>

</div>
</div>
<a class="anchor" id="ab8d7665f86a2b95c82d2de5908094da8"></a><!-- doxytag: member="ucommon::shell::Option::disable" ref="ab8d7665f86a2b95c82d2de5908094da8" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucommon::shell::Option::disable </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Disable a option. </p>
<p>Might happen if argv0 name suggests an option is no longer actively needed. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00197_source.html">shell.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:40:00 2011 for ucommon by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>