Sophie

Sophie

distrib > Mageia > 4 > i586 > media > core-release > by-pkgid > c44927308c1c3b2e6eb97a3e8e6f0c4d > files > 270

libyui5-3.0.10-0.git20131124.1.mga4.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>libyui: YCommandLine Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libyui
   &#160;<span id="projectnumber">3.0.10</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</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>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" 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><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classYCommandLine.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classYCommandLine-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">YCommandLine Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="YCommandLine_8h_source.html">YCommandLine.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9a3b792dda603180b65c3a76291bea08"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#a9a3b792dda603180b65c3a76291bea08">YCommandLine</a> ()</td></tr>
<tr class="separator:a9a3b792dda603180b65c3a76291bea08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a4684175626cf0b8d5e022a9b53f5e9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#a2a4684175626cf0b8d5e022a9b53f5e9">~YCommandLine</a> ()</td></tr>
<tr class="separator:a2a4684175626cf0b8d5e022a9b53f5e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a071b2ba54bc2fd89d35cc53b4731890e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#a071b2ba54bc2fd89d35cc53b4731890e">argc</a> () const </td></tr>
<tr class="separator:a071b2ba54bc2fd89d35cc53b4731890e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2dd1e935b0ea6d4e9a4c2d7dbcd65f4"><td class="memItemLeft" align="right" valign="top">char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#ad2dd1e935b0ea6d4e9a4c2d7dbcd65f4">argv</a> () const </td></tr>
<tr class="separator:ad2dd1e935b0ea6d4e9a4c2d7dbcd65f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64fa84aa194b933c823e1503c8aef60a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#a64fa84aa194b933c823e1503c8aef60a">size</a> () const </td></tr>
<tr class="separator:a64fa84aa194b933c823e1503c8aef60a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4441c0f3f6a057ddffbad85434c74a03"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#a4441c0f3f6a057ddffbad85434c74a03">arg</a> (int index) const </td></tr>
<tr class="separator:a4441c0f3f6a057ddffbad85434c74a03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeaeff7b763e23cdab0a6a9cb21648bef"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#aeaeff7b763e23cdab0a6a9cb21648bef">operator[]</a> (int index) const </td></tr>
<tr class="separator:aeaeff7b763e23cdab0a6a9cb21648bef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aace62729700a89126242cdd49cb46528"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#aace62729700a89126242cdd49cb46528">add</a> (const std::string &amp;<a class="el" href="classYCommandLine.html#a4441c0f3f6a057ddffbad85434c74a03">arg</a>)</td></tr>
<tr class="separator:aace62729700a89126242cdd49cb46528"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d633fec7fe0d81ef08b153dd2d28699"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#a0d633fec7fe0d81ef08b153dd2d28699">remove</a> (int index)</td></tr>
<tr class="separator:a0d633fec7fe0d81ef08b153dd2d28699"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3efe1947108530dcf6ffeabeb2455cf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#ab3efe1947108530dcf6ffeabeb2455cf">replace</a> (int index, const std::string &amp;<a class="el" href="classYCommandLine.html#a4441c0f3f6a057ddffbad85434c74a03">arg</a>)</td></tr>
<tr class="separator:ab3efe1947108530dcf6ffeabeb2455cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf97efcd9f9ec3c7e917eae041e061a0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYCommandLine.html#aaf97efcd9f9ec3c7e917eae041e061a0">find</a> (const std::string &amp;argName) const </td></tr>
<tr class="separator:aaf97efcd9f9ec3c7e917eae041e061a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Utility class to access /proc/&lt;pid&gt;/cmdline to retrieve argc and argv </p>

<p>Definition at line <a class="el" href="YCommandLine_8h_source.html#l00037">37</a> of file <a class="el" href="YCommandLine_8h_source.html">YCommandLine.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9a3b792dda603180b65c3a76291bea08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">YCommandLine::YCommandLine </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor. This will read /proc/&lt;pid&gt;/cmdline of this process. </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00048">48</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a2a4684175626cf0b8d5e022a9b53f5e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">YCommandLine::~YCommandLine </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor. </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00071">71</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aace62729700a89126242cdd49cb46528"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void YCommandLine::add </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>arg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a command line argument (at the end of the existing ones). </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00102">102</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a4441c0f3f6a057ddffbad85434c74a03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string YCommandLine::arg </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return command line argument no. 'index' (from 0 on).</p>
<p>This might throw an <a class="el" href="classYUIIndexOutOfRangeException.html">YUIIndexOutOfRangeException</a>. </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00109">109</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a071b2ba54bc2fd89d35cc53b4731890e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int YCommandLine::argc </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the number of arguments in the command line. Remember that the command itself (the binary of the process) is included, so a value of 1 (not 0!) means "no additional arguments". </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00078">78</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="ad2dd1e935b0ea6d4e9a4c2d7dbcd65f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char ** YCommandLine::argv </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the arguments in a C compatible fashion: An array of pointers to characters. The data are copied with strdup(), so they are valid beyond the life time of this object (but OTOH should be released with free() at some point). </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00085">85</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="aaf97efcd9f9ec3c7e917eae041e061a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int YCommandLine::find </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>argName</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Find a command line argument 'argName' ("-display" etc.). Notice that leading minus signs must be specified in 'argName'. Since argv[0] is the program name, the search starts from argv[1].</p>
<p>Return the position of 'argName' (from 0 on) or -1 if not found. </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00136">136</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="aeaeff7b763e23cdab0a6a9cb21648bef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string YCommandLine::operator[] </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return command line argument no. 'index' (from 0 on) as operator[]:</p>
<p>for ( int i=0; i &lt; cmdLine.argc(); i++ ) cout &lt;&lt; cmdLine[i] &lt;&lt; std::endl;</p>
<p>This might throw an <a class="el" href="classYUIIndexOutOfRangeException.html">YUIIndexOutOfRangeException</a>. </p>

<p>Definition at line <a class="el" href="YCommandLine_8h_source.html#l00085">85</a> of file <a class="el" href="YCommandLine_8h_source.html">YCommandLine.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0d633fec7fe0d81ef08b153dd2d28699"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void YCommandLine::remove </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove command line argument no. 'index' (from 0 on).</p>
<p>This might throw an <a class="el" href="classYUIIndexOutOfRangeException.html">YUIIndexOutOfRangeException</a>. </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00118">118</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="ab3efe1947108530dcf6ffeabeb2455cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void YCommandLine::replace </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Replace command line argument no. 'index' (from 0 on) with 'arg'.</p>
<p>This might throw an <a class="el" href="classYUIIndexOutOfRangeException.html">YUIIndexOutOfRangeException</a>. </p>

<p>Definition at line <a class="el" href="YCommandLine_8cc_source.html#l00127">127</a> of file <a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a64fa84aa194b933c823e1503c8aef60a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int YCommandLine::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Alias for <a class="el" href="classYCommandLine.html#a071b2ba54bc2fd89d35cc53b4731890e">argc()</a> for those who like a more C++ -like syntax. </p>

<p>Definition at line <a class="el" href="YCommandLine_8h_source.html#l00068">68</a> of file <a class="el" href="YCommandLine_8h_source.html">YCommandLine.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/iurt/rpmbuild/BUILD/libyui-3.0.10-b316a3f/src/<a class="el" href="YCommandLine_8h_source.html">YCommandLine.h</a></li>
<li>/home/iurt/rpmbuild/BUILD/libyui-3.0.10-b316a3f/src/<a class="el" href="YCommandLine_8cc_source.html">YCommandLine.cc</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classYCommandLine.html">YCommandLine</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
</body>
</html>