Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > aaf33964de706a538481c929c1da6a44 > files > 141

faust-doc-0.9.10-5mdv2010.1.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/xhtml;charset=UTF-8"/>
<title>FAUST compiler: blockSchema.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>blockSchema.cpp File Reference</h1><code>#include &quot;<a class="el" href="blockSchema_8cpp_source.html">blockSchema.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="device_8h_source.html">device.h</a>&quot;</code><br/>
<code>#include &lt;vector&gt;</code><br/>
<code>#include &lt;string&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<div class="dynheader">
Include dependency graph for blockSchema.cpp:</div>
<div class="dynsection">
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
</div>

<p><a href="blockSchema_8cpp_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="blockSchema_8cpp.html#a82783eb82012f45834402b08210d2634">quantize</a> (int n)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classschema.html">schema</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="blockSchema_8cpp.html#a4f795fe515331bbaed4f661d1fb2591a">makeBlockSchema</a> (unsigned int inputs, unsigned int outputs, const string &amp;text, const string &amp;color, const string &amp;link)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Build a simple colored <a class="el" href="classblockSchema.html" title="A simple rectangular box with a text and inputs and outputs.">blockSchema</a> with a certain number of inputs and outputs, a text to be displayed, and an optional link.  <a href="#a4f795fe515331bbaed4f661d1fb2591a"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a4f795fe515331bbaed4f661d1fb2591a"></a><!-- doxytag: member="blockSchema.cpp::makeBlockSchema" ref="a4f795fe515331bbaed4f661d1fb2591a" args="(unsigned int inputs, unsigned int outputs, const string &amp;text, const string &amp;color, const string &amp;link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classschema.html">schema</a>* makeBlockSchema </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>outputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>color</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>link</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Build a simple colored <a class="el" href="classblockSchema.html" title="A simple rectangular box with a text and inputs and outputs.">blockSchema</a> with a certain number of inputs and outputs, a text to be displayed, and an optional link. </p>
<p>Computes the size of the box according to the length of the text and the maximum number of ports. </p>

<p>Definition at line <a class="el" href="blockSchema_8cpp_source.html#l00040">40</a> of file <a class="el" href="blockSchema_8cpp_source.html">blockSchema.cpp</a>.</p>

<p>References <a class="el" href="schema_8h_source.html#l00035">dHorz</a>, <a class="el" href="schema_8h_source.html#l00036">dVert</a>, <a class="el" href="schema_8h_source.html#l00032">dWire</a>, <a class="el" href="interval_8hh_source.html#l00060">max()</a>, and <a class="el" href="blockSchema_8cpp_source.html#l00028">quantize()</a>.</p>

<p>Referenced by <a class="el" href="drawschema_8cpp_source.html#l00453">generateBargraphSchema()</a>, <a class="el" href="drawschema_8cpp_source.html#l00318">generateDiagramSchema()</a>, <a class="el" href="drawschema_8cpp_source.html#l00466">generateInputSlotSchema()</a>, <a class="el" href="drawschema_8cpp_source.html#l00358">generateInsideSchema()</a>, <a class="el" href="drawschema_8cpp_source.html#l00478">generateOutputSlotSchema()</a>, and <a class="el" href="drawschema_8cpp_source.html#l00440">generateUserInterfaceSchema()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00045"></a>00045 {
<a name="l00046"></a>00046     <span class="comment">// determine the optimal size of the box</span>
<a name="l00047"></a>00047     <span class="keywordtype">double</span> minimal = 3*<a class="code" href="schema_8h.html#a30d1c9623bb68689e23907427368ed1f" title="distance between two wires">dWire</a>;
<a name="l00048"></a>00048     <span class="keywordtype">double</span> w = 2*<a class="code" href="schema_8h.html#a9d883e2a1657d36b7ac2e2b18caa109f" title="marge horizontale">dHorz</a> + <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>( minimal, <a class="code" href="blockSchema_8cpp.html#a82783eb82012f45834402b08210d2634">quantize</a>(text.size()) );
<a name="l00049"></a>00049     <span class="keywordtype">double</span> h = 2*<a class="code" href="schema_8h.html#aa0adc663ea7e3401767e9b3e76c63a7b" title="marge verticale">dVert</a> + <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>( minimal, <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>(inputs, outputs) * <a class="code" href="schema_8h.html#a30d1c9623bb68689e23907427368ed1f" title="distance between two wires">dWire</a> );
<a name="l00050"></a>00050 
<a name="l00051"></a>00051     <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classblockSchema.html" title="A simple rectangular box with a text and inputs and outputs.">blockSchema</a>(inputs, outputs, w, h, text, color, link);
<a name="l00052"></a>00052 }
</pre></div></p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a82783eb82012f45834402b08210d2634"></a><!-- doxytag: member="blockSchema.cpp::quantize" ref="a82783eb82012f45834402b08210d2634" args="(int n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static double quantize </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="blockSchema_8cpp_source.html#l00028">28</a> of file <a class="el" href="blockSchema_8cpp_source.html">blockSchema.cpp</a>.</p>

<p>References <a class="el" href="schema_8h_source.html#l00034">dLetter</a>.</p>

<p>Referenced by <a class="el" href="blockSchema_8cpp_source.html#l00040">makeBlockSchema()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00029"></a>00029 {
<a name="l00030"></a>00030     <span class="keywordtype">int</span> q = 3;
<a name="l00031"></a>00031     <span class="keywordflow">return</span> <a class="code" href="schema_8h.html#ad3489d9399e3efa442157d00b08f900b" title="width of a letter">dLetter</a> * (q *((n+q-1)/q));
<a name="l00032"></a>00032 }
</pre></div></p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Wed Apr 28 23:59:59 2010 for FAUST compiler by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>