Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > b9cdcaec5818676f9fc8d8a636e2f7ba > files > 57

apiextractor-devel-0.10.0-1.fc14.i686.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/html; charset=utf-8" />
    
    <title>API Extractor &mdash; 3.3. Modifying Functions</title>
    <link rel="stylesheet" href="_static/pysidedocs.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
    var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '#',
        VERSION:     '0.10.0',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
    };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <!--[if lt IE 7]>
    <style media="screen" type="text/css">
    #container {
        height:100%;
    }
    </style>
    <![endif]-->
    <link rel="top" title="API Extractor v0.10.0 documentation" href="index.html" />
    <link rel="up" title="3. The API Extractor Type System" href="typesystem.html" />
    <link rel="next" title="3.4. Modifying Arguments" href="typesystem_arguments.html" />
    <link rel="prev" title="3.2. Manipulating Object and Value Types" href="typesystem_manipulating_objects.html" /> 
  </head>
  <body id="typesystem_modify_function">

<div id="container">
<div id="header">
    <div id="header_container">
        <div id="logo"><a href="http://www.pyside.org"><img alt="PySide" src="_static/pysidelogo.png" width="199" height="102" /></a></div>
        <ul id="relbar">
            <li class="right">
            <a href="typesystem_arguments.html" title="3.4. Modifying Arguments"
                accesskey="N">next</a></li>
            <li class="right">
            <a href="typesystem_manipulating_objects.html" title="3.2. Manipulating Object and Value Types"
                accesskey="P">previous</a> |</li>
            <li><a href="contents.html">API Extractor v0.10.0 documentation</a> &raquo;</li>
            <li><a href="typesystem.html" accesskey="U">3. The API Extractor Type System</a> &raquo;</li> 
        </ul>
    </div>
</div>

<div id="body" >
    <div id="sidebar">
            <h3><a href="contents.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference internal" href="#">3.3. Modifying Functions</a><ul>
<li><a class="reference internal" href="#modify-argument">3.3.1. modify-argument</a></li>
<li><a class="reference internal" href="#remove">3.3.2. remove</a></li>
<li><a class="reference internal" href="#access">3.3.3. access</a></li>
<li><a class="reference internal" href="#rename">3.3.4. rename</a></li>
</ul>
</li>
</ul>

            <h3>Previous topic</h3>
            <p class="topless"><a href="typesystem_manipulating_objects.html"
                                  title="previous chapter">3.2. Manipulating Object and Value Types</a></p>
            <h3>Next topic</h3>
            <p class="topless"><a href="typesystem_arguments.html"
                                  title="next chapter">3.4. Modifying Arguments</a></p>

        <div id="search_box">
        <h3>Quick search</h3>
        <form action="search.html" method="get">
        <input type="text" name="q" id="q" />
        <input type="submit" value="Go" id="search_button" />
        <input type="hidden" name="check_keywords" value="yes" />
        <input type="hidden" name="area" value="default" />
        </form>
        </div>

    </div>
    
  <div class="section" id="modifying-functions">
<span id="id1"></span><h1>3.3. Modifying Functions</h1>
<div class="section" id="modify-argument">
<span id="id2"></span><h2>3.3.1. modify-argument</h2>
<blockquote>
<div><p>The modify-argument node specifies which of the given function&#8217;s arguments the
modification affects, and is a child of the modify-function node. Use the
remove-argument, replace-default-expression, remove-default-expression,
replace-type, reference-count and define-ownership nodes to specify the details
of the modification.</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;modify-function&gt;</span>
    <span class="nt">&lt;modify-argument</span> <span class="na">index=</span><span class="s">&quot;return | this | 1 ...&quot;</span> <span class="nt">&gt;</span>
        // modifications
    <span class="nt">&lt;/modify-argument&gt;</span>
<span class="nt">&lt;/modify-function&gt;</span>
</pre></div>
</div>
<p>Set the <tt class="docutils literal"><span class="pre">index</span></tt> attribute to &#8220;1&#8221; for the first argument, &#8220;2&#8221; for the second
one and so on. Alternatively, set it to &#8220;return&#8221; or &#8220;this&#8221; if you want to
modify the function&#8217;s return value or the object the function is called upon,
respectively.</p>
</div></blockquote>
</div>
<div class="section" id="remove">
<span id="id3"></span><h2>3.3.2. remove</h2>
<blockquote>
<div><p>The remove node removes the given method from the generated target language
API, and it is a child of the modify-function node.</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;modify-function&gt;</span>
    <span class="nt">&lt;remove</span> <span class="na">class=</span><span class="s">&quot;all&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;/modify-function&gt;</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This tag is deprecated, use the <tt class="docutils literal"><span class="pre">remove</span></tt> attribute from <a class="reference internal" href="typesystem_manipulating_objects.html#modify-function"><em>modify-function</em></a> tag instead.</p>
</div>
</div></blockquote>
</div>
<div class="section" id="access">
<span id="id4"></span><h2>3.3.3. access</h2>
<blockquote>
<div><p>The access node changes the access privileges of the given function in the
generated target language API, and it is a child of the modify-function node.</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;modify-function&gt;</span>
    <span class="nt">&lt;access</span> <span class="na">modifier=</span><span class="s">&quot;public | protected | private&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/modify-function&gt;</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This tag is deprecated, use the <tt class="docutils literal"><span class="pre">access</span></tt> attribute from <a class="reference internal" href="typesystem_manipulating_objects.html#modify-function"><em>modify-function</em></a> tag instead.</p>
</div>
</div></blockquote>
</div>
<div class="section" id="rename">
<span id="id5"></span><h2>3.3.4. rename</h2>
<blockquote>
<div><p>The rename node changes the name of the given function in the generated target
language API, and it is a child of the modify-function node.</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;modify-function&gt;</span>
    <span class="nt">&lt;rename</span> <span class="na">to=</span><span class="s">&quot;...&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;/modify-function&gt;</span>
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">to</span></tt> attribute is the new name of the function.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This tag is deprecated, use the <tt class="docutils literal"><span class="pre">rename</span></tt> attribute from <a class="reference internal" href="typesystem_manipulating_objects.html#modify-function"><em>modify-function</em></a> tag instead.</p>
</div>
</div></blockquote>
</div>
</div>


</div> <!-- container    -->
<div id="footer">
    <a href="http://www.indt.org.br"><img src="_static/logo_indt.jpg" alt="Indt" border="0" /></a>
    <a href="http://www.openbossa.org"><img src="_static/logo_openbossa.png" alt="Openbossa" border="0" /></a>
    <a href="http://qt.nokia.com/"><img src="_static/logo_qt.png" alt="Qt" border="0" /></a>
    <a href="http://www.python.org"><img src="_static/logo_python.jpg" alt="Python" border="0" /></a>
</div>
</div>
</body>
</html>