⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classparglist.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get if option present. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>option</em>&nbsp;</td><td>String letter code for the option </td></tr></table></dl>    </td>  </tr></table><a name="z9_3" doxytag="PArgList::HasOption"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PINLINE BOOL PArgList::HasOption </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">char&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>optionChar</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get if option present. Determines whether the option was specified on the command line.<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if the option was present. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>option</em>&nbsp;</td><td>Character letter code for the option </td></tr></table></dl>    </td>  </tr></table><a name="z11_0" doxytag="PArgList::IllegalArgumentIndex"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PArgList::IllegalArgumentIndex </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">PINDEX&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This function is called when access to illegal parameter index is made in the GetParameter function. The default behaviour is to output a message to the standard <a class="el" href="object_8h.html#a11">PError</a># stream. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>Number of the parameter that was accessed. </td></tr></table></dl>    </td>  </tr></table><a name="z11_2" doxytag="PArgList::MissingArgument"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PArgList::MissingArgument </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>option</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This function is called when an option that requires an associated string was specified on the command line but no associated string was provided. The default behaviour is to output a message to the standard <a class="el" href="object_8h.html#a11">PError</a># stream. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>option</em>&nbsp;</td><td>Option for which the associated string was missing. </td></tr></table></dl>    </td>  </tr></table><a name="z9_14" doxytag="PArgList::operator<<"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PINLINE PArgList &amp; PArgList::operator&lt;&lt; </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>sh</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Shift the parameters by the specified amount. This allows the parameters to be parsed at the same position in the argument list "array". <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sh</em>&nbsp;</td><td>Number of parameters to shift forward through list </td></tr></table></dl>    </td>  </tr></table><a name="z9_15" doxytag="PArgList::operator>>"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PINLINE PArgList &amp; PArgList::operator&gt;&gt; </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>sh</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Shift the parameters by the specified amount. This allows the parameters to be parsed at the same position in the argument list "array". <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sh</em>&nbsp;</td><td>Number of parameters to shift backward through list </td></tr></table></dl>    </td>  </tr></table><a name="z9_12" doxytag="PArgList::operator[]"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PINLINE <a class="el" href="classPString.html">PString</a> PArgList::operator[] </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">PINDEX&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>num</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the parameter that was parsed in the argument list. The argument list object can thus be treated as an "array" of parameters.<p><dl compact><dt><b>Returns: </b></dt><dd>parameter string at the specified index. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>num</em>&nbsp;</td><td>Number of the parameter to retrieve. </td></tr></table></dl>    </td>  </tr></table><a name="z7_4" doxytag="PArgList::Parse"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PINLINE BOOL PArgList::Parse </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>theArgumentStr</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>BOOL&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>optionsBeforeParams</em> = TRUE</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Parse the arguments. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>optionsBeforeParams</em>&nbsp;</td><td>The specification string for argument options. See description for details. Parse options only before parameters </td></tr></table></dl>    </td>  </tr></table><a name="z7_3" doxytag="PArgList::Parse"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual BOOL PArgList::Parse </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>theArgumentSpec</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>BOOL&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>optionsBeforeParams</em> = TRUE</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Parse the arguments. Parse the standard C program arguments into an argument of options and parameters. Consecutive calls with optionsBeforeParams# set to TRUE will parse out different options and parameters. If <a class="el" href="classPArgList.html#z7_0">SetArgs()</a> function is called then the <a class="el" href="classPArgList.html#z7_3">Parse()</a> function will restart from the beginning of the argument list.<p>The specification string consists of case significant letters for each option. If the letter is followed by a '-' character then a long name version of the option is present. This is terminated either by a '.' or a ':' character. If the single letter or long name is followed by the ':' character then the option has may have an associated string. This string must be within the argument or in the next argument. If a single letter option is followed by a ';' character, then the option may have an associated string but this MUST follow the letter immediately, if it is present at all.<p>For example, "ab:c" allows for "-a -b arg -barg -c" and "a-an-arg.b-option:c;" allows for "-a --an-arg --option arg -c -copt".<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if there is at least one parameter after parsing. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>optionsBeforeParams</em>&nbsp;</td><td>The specification string for argument options. See description for details. Parse options only before parameters </td></tr></table></dl>    </td>  </tr></table><a name="z5_0" doxytag="PArgList::PrintOn"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PArgList::PrintOn </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">ostream &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>strm</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Output the string to the specified stream. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>strm</em>&nbsp;</td><td>I/O stream to output to. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPObject.html#z201_0">PObject</a>.    </td>  </tr></table><a name="z5_1" doxytag="PArgList::ReadFrom"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PArgList::ReadFrom </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">istream &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>strm</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -