Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 388a191dbad6b966fd8a7add43a4053b > files > 58

apiextractor-devel-0.10.0-1.fc14.x86_64.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.5. Solving compilation problems</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.6. Using Code Templates" href="typesystem_templates.html" />
    <link rel="prev" title="3.4. Modifying Arguments" href="typesystem_arguments.html" /> 
  </head>
  <body id="typesystem_solving_compilation">

<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_templates.html" title="3.6. Using Code Templates"
                accesskey="N">next</a></li>
            <li class="right">
            <a href="typesystem_arguments.html" title="3.4. Modifying Arguments"
                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.5. Solving compilation problems</a><ul>
<li><a class="reference internal" href="#suppress-warning">3.5.1. suppress-warning</a></li>
<li><a class="reference internal" href="#extra-includes">3.5.2. extra-includes</a></li>
<li><a class="reference internal" href="#include">3.5.3. include</a></li>
</ul>
</li>
</ul>

            <h3>Previous topic</h3>
            <p class="topless"><a href="typesystem_arguments.html"
                                  title="previous chapter">3.4. Modifying Arguments</a></p>
            <h3>Next topic</h3>
            <p class="topless"><a href="typesystem_templates.html"
                                  title="next chapter">3.6. Using Code Templates</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="solving-compilation-problems">
<h1>3.5. Solving compilation problems</h1>
<div class="section" id="suppress-warning">
<h2>3.5.1. suppress-warning</h2>
<blockquote>
<div><p>The generator will generate several warnings which may be irrelevant to the
user. The suppress-warning node suppresses the specified warning, and it is
a child of the typesystem node.</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;typesystem&gt;</span>
    <span class="nt">&lt;suppress-warning</span> <span class="na">text=</span><span class="s">&quot;...&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;/typesystem&gt;</span>
</pre></div>
</div>
<p>The <strong>text</strong> attribute is the warning text to suppress, and may contain the *
wildcard (use &#8220;&#8221; to escape regular expression matching if the warning contain
a regular &#8220;*&#8221;).</p>
</div></blockquote>
</div>
<div class="section" id="extra-includes">
<h2>3.5.2. extra-includes</h2>
<blockquote>
<div><p>The extra-includes node contains declarations of additional include files,
and it can be a child of the interface-type, namespace-type, value-type and
object-type nodes.</p>
<p>The generator automatically tries to read the global header for each type but
sometimes it is required to include extra files in the generated C++ code to
make sure that the code compiles. These files must be listed using include
nodes witin the extra-include node:</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;value-type&gt;</span>
    <span class="nt">&lt;extra-includes&gt;</span>
        <span class="nt">&lt;include</span> <span class="na">file-name=</span><span class="s">&quot;...&quot;</span> <span class="na">location=</span><span class="s">&quot;global | local&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;/extra-includes&gt;</span>
<span class="nt">&lt;/value-type&gt;</span>
</pre></div>
</div>
<p>The <strong>file-name</strong> attribute is the file to include, such as &#8220;QStringList&#8221;.
The <strong>location</strong> attribute is where the file is located: <em>global</em> means that
the file is located in $INCLUDEPATH and will be included using #include &lt;...&gt;,
<em>local</em> means that the file is in a local directory and will be included
using #include &#8221;...&#8221;.</p>
</div></blockquote>
</div>
<div class="section" id="include">
<h2>3.5.3. include</h2>
<blockquote>
<div><p>The include node specifies the name and location of a file that must be
included, and it is a child of the interface-type, namespace-type, value-type,
object-type or extra-includes nodes</p>
<p>The generator automatically tries to read the global header for each type. Use
the include node to override this behavior, providing an alternative file. The
include node can also be used to specify extra include files.</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;value-type&gt;</span>
    <span class="nt">&lt;include</span> <span class="na">file-name=</span><span class="s">&quot;...&quot;</span>
        <span class="na">location=</span><span class="s">&quot;global | local&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/value-type&gt;</span>
</pre></div>
</div>
<p>The <strong>file-name</strong> attribute is the file to include, such as &#8220;QStringList&#8221;.
The <strong>location</strong> attribute is where the file is located: <em>global</em> means that
the file is located in $INCLUDEPATH and will be included using #include &lt;...&gt;,
<em>local</em> means that the file is in a local directory and will be included
using #include &#8221;...&#8221;.</p>
</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>