Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 3b996fe272685bfa229e6a8dcb542001 > files > 1003

glibmm2.4-doc-2.60.0-1.mga7.noarch.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.11"/>
<title>glibmm: Shell-related Utilities</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="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.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 id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">glibmm
   &#160;<span id="projectnumber">2.60.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" 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 class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Shell-related Utilities</div>  </div>
</div><!--header-->
<div class="contents">

<p>Shell-like command line handling.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1ShellError.html">Glib::ShellError</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception class for shell utility errors.  <a href="classGlib_1_1ShellError.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabc52fcb14cfc7a5ba37ca821cc837818"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>&lt; <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ShellUtils.html#gabc52fcb14cfc7a5ba37ca821cc837818">Glib::shell_parse_argv</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; command_line)</td></tr>
<tr class="memdesc:gabc52fcb14cfc7a5ba37ca821cc837818"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses a command line into an argument vector, in much the same way the shell would, but without many of the expansions the shell would perform (variable expansion, globs, operators, filename expansion, etc. are not supported).  <a href="group__ShellUtils.html#gabc52fcb14cfc7a5ba37ca821cc837818">More...</a><br /></td></tr>
<tr class="separator:gabc52fcb14cfc7a5ba37ca821cc837818"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55ebfb935f2131b2ae40d339568f568c"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ShellUtils.html#ga55ebfb935f2131b2ae40d339568f568c">Glib::shell_quote</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; unquoted_string)</td></tr>
<tr class="memdesc:ga55ebfb935f2131b2ae40d339568f568c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean <em>unquoted_string</em>.  <a href="group__ShellUtils.html#ga55ebfb935f2131b2ae40d339568f568c">More...</a><br /></td></tr>
<tr class="separator:ga55ebfb935f2131b2ae40d339568f568c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga449dc37c6ea7e7563740df86e31c263c"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ShellUtils.html#ga449dc37c6ea7e7563740df86e31c263c">Glib::shell_unquote</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; quoted_string)</td></tr>
<tr class="memdesc:ga449dc37c6ea7e7563740df86e31c263c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unquotes a string as the shell (/bin/sh) would.  <a href="group__ShellUtils.html#ga449dc37c6ea7e7563740df86e31c263c">More...</a><br /></td></tr>
<tr class="separator:ga449dc37c6ea7e7563740df86e31c263c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Shell-like command line handling. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gabc52fcb14cfc7a5ba37ca821cc837818"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>&lt;<a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&gt; Glib::shell_parse_argv </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>command_line</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parses a command line into an argument vector, in much the same way the shell would, but without many of the expansions the shell would perform (variable expansion, globs, operators, filename expansion, etc. are not supported). </p>
<p>The results are defined to be the same as those you would get from a UNIX98 /bin/sh, as long as the input contains none of the unsupported shell expansions. If the input does contain such expansions, they are passed through literally. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command_line</td><td>Command line to parse. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Array of args (The generic <a class="el" href="classGlib_1_1ArrayHandle.html" title="This is an intermediate type. ">ArrayHandle</a> will be implicitly converted to any STL compatible container type). </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classGlib_1_1ShellError.html" title="Exception class for shell utility errors. ">Glib::ShellError</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga55ebfb935f2131b2ae40d339568f568c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::shell_quote </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>unquoted_string</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean <em>unquoted_string</em>. </p>
<p>If you pass a filename to the shell, for example, you should first quote it with this function. The quoting style used is undefined (single or double quotes may be used). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">unquoted_string</td><td>A literal string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A quoted string. </dd></dl>

</div>
</div>
<a class="anchor" id="ga449dc37c6ea7e7563740df86e31c263c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::shell_unquote </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>quoted_string</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unquotes a string as the shell (/bin/sh) would. </p>
<p>Only handles quotes; if a string contains file globs, arithmetic operators, variables, backticks, redirections, or other special-to-the-shell features, the result will be different from the result a real shell would produce (the variables, backticks, etc. will be passed through literally instead of being expanded). This function is guaranteed to succeed if applied to the result of <a class="el" href="group__ShellUtils.html#ga55ebfb935f2131b2ae40d339568f568c" title="Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean unquoted_string...">shell_quote()</a>. If it fails, it throws a <a class="el" href="classGlib_1_1ShellError.html" title="Exception class for shell utility errors. ">Glib::ShellError</a> exception. The <em>quoted_string</em> need not actually contain quoted or escaped text; <a class="el" href="group__ShellUtils.html#ga449dc37c6ea7e7563740df86e31c263c" title="Unquotes a string as the shell (/bin/sh) would. ">shell_unquote()</a> simply goes through the string and unquotes/unescapes anything that the shell would. Both single and double quotes are handled, as are escapes including escaped newlines.</p>
<p>Shell quoting rules are a bit strange. Single quotes preserve the literal string exactly. Escape sequences are not allowed; not even <code>\'</code> &#8211; if you want a <code>'</code> in the quoted text, you have to do something like <code>'foo'\''bar'</code>. Double quotes allow <code>$</code>, <code>`</code>, <code>"</code>, <code>\</code>, and newline to be escaped with backslash. Otherwise double quotes preserve things literally.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">quoted_string</td><td>Shell-quoted string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An unquoted string. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classGlib_1_1ShellError.html" title="Exception class for shell utility errors. ">Glib::ShellError</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 19 2019 09:56:38 for glibmm by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>