<!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: recSchema.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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>recSchema.cpp File Reference</h1><code>#include "<a class="el" href="recSchema_8cpp_source.html">recSchema.h</a>"</code><br/> <code>#include "<a class="el" href="schema_8h_source.html">schema.h</a>"</code><br/> <code>#include <iostream></code><br/> <code>#include <assert.h></code><br/> <div class="dynheader"> Include dependency graph for recSchema.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="recSchema_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"><a class="el" href="classschema.html">schema</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="recSchema_8cpp.html#a8c399e3657df2ea0cd980abe6aa9d63c">makeRecSchema</a> (<a class="el" href="classschema.html">schema</a> *s1, <a class="el" href="classschema.html">schema</a> *s2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new recursive schema (s1 ~ s2). <a href="#a8c399e3657df2ea0cd980abe6aa9d63c"></a><br/></td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a8c399e3657df2ea0cd980abe6aa9d63c"></a><!-- doxytag: member="recSchema.cpp::makeRecSchema" ref="a8c399e3657df2ea0cd980abe6aa9d63c" args="(schema *s1, schema *s2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classschema.html">schema</a>* makeRecSchema </td> <td>(</td> <td class="paramtype"><a class="el" href="classschema.html">schema</a> * </td> <td class="paramname"> <em>s1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classschema.html">schema</a> * </td> <td class="paramname"> <em>s2</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new recursive schema (s1 ~ s2). </p> <p>The smallest component is enlarged to the width of the other. The left and right horizontal margins are computed according to the number of internal connections. </p> <p>Definition at line <a class="el" href="recSchema_8cpp_source.html#l00034">34</a> of file <a class="el" href="recSchema_8cpp_source.html">recSchema.cpp</a>.</p> <p>References <a class="el" href="schema_8h_source.html#l00032">dWire</a>, <a class="el" href="enlargedSchema_8cpp_source.html#l00032">makeEnlargedSchema()</a>, <a class="el" href="interval_8hh_source.html#l00060">max()</a>, and <a class="el" href="schema_8h_source.html#l00085">schema::width()</a>.</p> <p>Referenced by <a class="el" href="drawschema_8cpp_source.html#l00358">generateInsideSchema()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00035"></a>00035 { <a name="l00036"></a>00036 <a class="code" href="classschema.html" title="An abstract block diagram schema.">schema</a>* a = <a class="code" href="enlargedSchema_8cpp.html#ad4c51900edaa024a3c81e55060902d2a" title="Returns an enlarged schema, but only if really needed that is if the requiered width...">makeEnlargedSchema</a>(s1, s2-><a class="code" href="classschema.html#aa598f06d50f5cee518892c572453cf67">width</a>()); <a name="l00037"></a>00037 <a class="code" href="classschema.html" title="An abstract block diagram schema.">schema</a>* b = <a class="code" href="enlargedSchema_8cpp.html#ad4c51900edaa024a3c81e55060902d2a" title="Returns an enlarged schema, but only if really needed that is if the requiered width...">makeEnlargedSchema</a>(s2, s1-><a class="code" href="classschema.html#aa598f06d50f5cee518892c572453cf67">width</a>()); <a name="l00038"></a>00038 <span class="keywordtype">double</span> m = <a class="code" href="schema_8h.html#a30d1c9623bb68689e23907427368ed1f" title="distance between two wires">dWire</a> * <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>(b->inputs(), b->outputs()); <a name="l00039"></a>00039 <span class="keywordtype">double</span> w = a-><a class="code" href="classschema.html#aa598f06d50f5cee518892c572453cf67">width</a>() + 2*m; <a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classrecSchema.html" title="place and connect two diagrams in recursive composition">recSchema</a>(a,b,w); <a name="l00042"></a>00042 } </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> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:10 2010 for FAUST compiler by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>