<!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: boxcomplexity.h 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>boxcomplexity.h File Reference</h1><code>#include "<a class="el" href="boxes_8hh_source.html">boxes.hh</a>"</code><br/> <div class="dynheader"> Include dependency graph for boxcomplexity.h:</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="boxcomplexity_8h_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">int </td><td class="memItemRight" valign="bottom"><a class="el" href="boxcomplexity_8h.html#af02bacfa671f9f6d8bea6f5f9c22e0af">boxComplexity</a> (<a class="el" href="classCTree.html">Tree</a> box)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the complexity propety of a box expression tree. <a href="#af02bacfa671f9f6d8bea6f5f9c22e0af"></a><br/></td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="af02bacfa671f9f6d8bea6f5f9c22e0af"></a><!-- doxytag: member="boxcomplexity.h::boxComplexity" ref="af02bacfa671f9f6d8bea6f5f9c22e0af" args="(Tree box)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int boxComplexity </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>box</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Return the complexity propety of a box expression tree. </p> <p>Return the complexity propety of a box expression tree. If no complexity property exist, it is created an computeBoxComplexity is called do to the job.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>box</em> </td><td>an evaluated box expression tree </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the complexity of box</dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="boxcomplexity_8cpp.html#a2c77c263069b8d198f2c90c49667a34d" title="Compute the complexity of a box expression.">computeBoxComplexity</a> </dd></dl> <p>Definition at line <a class="el" href="boxcomplexity_8cpp_source.html#l00056">56</a> of file <a class="el" href="boxcomplexity_8cpp_source.html">boxcomplexity.cpp</a>.</p> <p>References <a class="el" href="boxcomplexity_8cpp_source.html#l00087">computeBoxComplexity()</a>, <a class="el" href="tree_8hh_source.html#l00160">CTree::getProperty()</a>, <a class="el" href="tree_8hh_source.html#l00158">CTree::setProperty()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, and <a class="el" href="tree_8cpp_source.html#l00244">tree2int()</a>.</p> <p>Referenced by <a class="el" href="drawschema_8cpp_source.html#l00158">drawSchema()</a>, and <a class="el" href="drawschema_8cpp_source.html#l00318">generateDiagramSchema()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00057"></a>00057 { <a name="l00058"></a>00058 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> prop = box-><a class="code" href="classCTree.html#a902b48b83db587f14dbd31999c0f715f">getProperty</a>(<a class="code" href="boxcomplexity_8cpp.html#a0b6ee2330a4c90ea5c58feae2d9c8eb2" title="property Key used to store box complexity">BCOMPLEXITY</a>); <a name="l00059"></a>00059 <a name="l00060"></a>00060 <span class="keywordflow">if</span> (prop) { <a name="l00061"></a>00061 <span class="keywordflow">return</span> <a class="code" href="tree_8cpp.html#a523bce65e2a281fe678f2362496061cf" title="if t has a node of type int, return it otherwise error">tree2int</a>(prop); <a name="l00062"></a>00062 <a name="l00063"></a>00063 } <span class="keywordflow">else</span> { <a name="l00064"></a>00064 <span class="keywordtype">int</span> v = <a class="code" href="boxcomplexity_8cpp.html#a2c77c263069b8d198f2c90c49667a34d" title="Compute the complexity of a box expression.">computeBoxComplexity</a>(box); <a name="l00065"></a>00065 box-><a class="code" href="classCTree.html#ac628a2ad0d2a21de584e3bca291bd38c">setProperty</a>(<a class="code" href="boxcomplexity_8cpp.html#a0b6ee2330a4c90ea5c58feae2d9c8eb2" title="property Key used to store box complexity">BCOMPLEXITY</a>,<a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(v)); <a name="l00066"></a>00066 <span class="keywordflow">return</span> v; <a name="l00067"></a>00067 } <a name="l00068"></a>00068 } </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:00 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>