Sophie

Sophie

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

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: boxtype.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>boxtype.cpp File Reference</h1>
<p>A simple type system for block diagram expressions. The type of a block diagram is defined by a number of inputs and outputs.  
<a href="#_details">More...</a></p>
<code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="boxes_8hh_source.html">boxes.hh</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ppbox_8hh_source.html">ppbox.hh</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="prim2_8hh_source.html">prim2.hh</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="xtended_8hh_source.html">xtended.hh</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for boxtype.cpp:</div>
<div class="dynsection">
</div>

<p><a href="boxtype_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 bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="boxtype_8cpp.html#ae159e6baa8401e374f0f42182725fd46">infereBoxType</a> (<a class="el" href="classCTree.html">Tree</a> t, int *inum, int *onum)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Infere the type (number of inputs and outputs) of a box.  <a href="#ae159e6baa8401e374f0f42182725fd46"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="boxtype_8cpp.html#ac5c10eb592a85ecba6d6990f9f78010d">getBoxType</a> (<a class="el" href="classCTree.html">Tree</a> box, int *inum, int *onum)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the type (number of inputs and outputs) of a box or false if undefined.  <a href="#ac5c10eb592a85ecba6d6990f9f78010d"></a><br/></td></tr>
<tr><td colspan="2"><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="boxtype_8cpp.html#a8112d401cbebb0271a59c1519be875be">BOXTYPEPROP</a> = tree(symbol(&quot;boxTypeProp&quot;))</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A simple type system for block diagram expressions. The type of a block diagram is defined by a number of inputs and outputs. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Yann Orlarey </dd></dl>
<dl class="version"><dt><b>Version:</b></dt><dd>1.0 </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>2003 </dd></dl>

<p>Definition in file <a class="el" href="boxtype_8cpp_source.html">boxtype.cpp</a>.</p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ac5c10eb592a85ecba6d6990f9f78010d"></a><!-- doxytag: member="boxtype.cpp::getBoxType" ref="ac5c10eb592a85ecba6d6990f9f78010d" args="(Tree box, int *inum, int *onum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool getBoxType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCTree.html">Tree</a>&nbsp;</td>
          <td class="paramname"> <em>box</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>inum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>onum</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the type (number of inputs and outputs) of a box or false if undefined. </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>&nbsp;</td><td>the box we want to know the type </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>inum</em>&nbsp;</td><td>the place to return the number of inputs </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>onum</em>&nbsp;</td><td>the place to return the number of outputs </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if type is defined, false if undefined </dd></dl>

<p>Definition at line <a class="el" href="boxtype_8cpp_source.html#l00063">63</a> of file <a class="el" href="boxtype_8cpp_source.html">boxtype.cpp</a>.</p>

<p>References <a class="el" href="list_8hh_source.html#l00124">cons()</a>, <a class="el" href="node_8hh_source.html#l00098">Node::getInt()</a>, <a class="el" href="list_8cpp_source.html#l00423">getProperty()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="boxtype_8cpp_source.html#l00097">infereBoxType()</a>, <a class="el" href="list_8hh_source.html#l00137">isNil()</a>, <a class="el" href="list_8cpp_source.html#l00116">nil</a>, <a class="el" href="tree_8hh_source.html#l00141">CTree::node()</a>, <a class="el" href="list_8cpp_source.html#l00418">setProperty()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, and <a class="el" href="tree_8hh_source.html#l00173">tree()</a>.</p>

<p>Referenced by <a class="el" href="eval_8cpp_source.html#l00974">applyList()</a>, <a class="el" href="eval_8cpp_source.html#l00920">boxlistOutputs()</a>, <a class="el" href="eval_8cpp_source.html#l00677">eval2double()</a>, <a class="el" href="eval_8cpp_source.html#l00706">eval2int()</a>, <a class="el" href="drawschema_8cpp_source.html#l00318">generateDiagramSchema()</a>, <a class="el" href="doc_8cpp_source.html#l00790">getBoxInputsAndOutputs()</a>, <a class="el" href="boxtype_8cpp_source.html#l00097">infereBoxType()</a>, <a class="el" href="eval_8cpp_source.html#l00618">isBoxNumeric()</a>, <a class="el" href="main_8cpp_source.html#l00475">main()</a>, <a class="el" href="doc_8cpp_source.html#l00575">mapGetEqName()</a>, <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>, and <a class="el" href="eval_8cpp_source.html#l00569">replaceBoxNumeric()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00064"></a>00064 {
<a name="l00065"></a>00065     <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> t;
<a name="l00066"></a>00066     <span class="keywordflow">if</span> (<a class="code" href="list_8cpp.html#a665745948013d012bb123e9577c094bd">getProperty</a>(box, <a class="code" href="boxtype_8cpp.html#a8112d401cbebb0271a59c1519be875be">BOXTYPEPROP</a>, t)) {
<a name="l00067"></a>00067         
<a name="l00068"></a>00068         <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(t)) {
<a name="l00069"></a>00069             <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00070"></a>00070         } <span class="keywordflow">else</span> {
<a name="l00071"></a>00071             *inum = <a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(t)-&gt;<a class="code" href="classCTree.html#a8de786fec095c8304b9ffa7c1c316237" title="return the content of the tree">node</a>().<a class="code" href="classNode.html#a0ac89402d0e51d19bed062529a375efe">getInt</a>();
<a name="l00072"></a>00072             *onum = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(t)-&gt;<a class="code" href="classCTree.html#a8de786fec095c8304b9ffa7c1c316237" title="return the content of the tree">node</a>().<a class="code" href="classNode.html#a0ac89402d0e51d19bed062529a375efe">getInt</a>();
<a name="l00073"></a>00073             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00074"></a>00074         }
<a name="l00075"></a>00075         
<a name="l00076"></a>00076     } <span class="keywordflow">else</span> {
<a name="l00077"></a>00077     
<a name="l00078"></a>00078         <span class="keywordflow">if</span> (<a class="code" href="boxtype_8cpp.html#ae159e6baa8401e374f0f42182725fd46" title="Infere the type (number of inputs and outputs) of a box.">infereBoxType</a>(box, inum, onum)) {
<a name="l00079"></a>00079             <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(box, <a class="code" href="boxtype_8cpp.html#a8112d401cbebb0271a59c1519be875be">BOXTYPEPROP</a>, <a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(*inum), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(*onum)));
<a name="l00080"></a>00080             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00081"></a>00081         } <span class="keywordflow">else</span> {
<a name="l00082"></a>00082             <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(box, <a class="code" href="boxtype_8cpp.html#a8112d401cbebb0271a59c1519be875be">BOXTYPEPROP</a>, <a class="code" href="list_8cpp.html#a538b704dd07794b7237108f1917c471e">nil</a>);
<a name="l00083"></a>00083             <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00084"></a>00084         }
<a name="l00085"></a>00085     }
<a name="l00086"></a>00086 }
</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="ae159e6baa8401e374f0f42182725fd46"></a><!-- doxytag: member="boxtype.cpp::infereBoxType" ref="ae159e6baa8401e374f0f42182725fd46" args="(Tree t, int *inum, int *onum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool infereBoxType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCTree.html">Tree</a>&nbsp;</td>
          <td class="paramname"> <em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>inum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>onum</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Infere the type (number of inputs and outputs) of a box. </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>&nbsp;</td><td>the box we want to know the type </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>inum</em>&nbsp;</td><td>the place to return the number of inputs </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>onum</em>&nbsp;</td><td>the place to return the number of outputs </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="boxtype_8cpp_source.html#l00097">97</a> of file <a class="el" href="boxtype_8cpp_source.html">boxtype.cpp</a>.</p>

<p>References <a class="el" href="classxtended.html#ad709963a78f1b630e44ff518134487b5">xtended::arity()</a>, <a class="el" href="prim2_8cpp_source.html#l00064">ffarity()</a>, <a class="el" href="boxtype_8cpp_source.html#l00063">getBoxType()</a>, <a class="el" href="symbol_8hh_source.html#l00100">getUserData()</a>, <a class="el" href="boxes_8cpp_source.html#l00326">isBoxButton()</a>, <a class="el" href="boxes_8cpp_source.html#l00332">isBoxCheckbox()</a>, <a class="el" href="boxes_8cpp_source.html#l00090">isBoxCut()</a>, <a class="el" href="boxes_8cpp_source.html#l00245">isBoxEnvironment()</a>, <a class="el" href="boxes_8cpp_source.html#l00310">isBoxFConst()</a>, <a class="el" href="boxes_8cpp_source.html#l00304">isBoxFFun()</a>, <a class="el" href="boxes_8cpp_source.html#l00316">isBoxFVar()</a>, <a class="el" href="boxes_8cpp_source.html#l00417">isBoxHBargraph()</a>, <a class="el" href="boxes_8cpp_source.html#l00399">isBoxHGroup()</a>, <a class="el" href="boxes_8cpp_source.html#l00339">isBoxHSlider()</a>, <a class="el" href="boxes_8cpp_source.html#l00077">isBoxInt()</a>, <a class="el" href="boxes_8cpp_source.html#l00137">isBoxMerge()</a>, <a class="el" href="boxes_8cpp_source.html#l00380">isBoxNumEntry()</a>, <a class="el" href="boxes_8cpp_source.html#l00125">isBoxPar()</a>, <a class="el" href="boxes_8cpp_source.html#l00270">isBoxPrim0()</a>, <a class="el" href="boxes_8cpp_source.html#l00275">isBoxPrim1()</a>, <a class="el" href="boxes_8cpp_source.html#l00280">isBoxPrim2()</a>, <a class="el" href="boxes_8cpp_source.html#l00285">isBoxPrim3()</a>, <a class="el" href="boxes_8cpp_source.html#l00290">isBoxPrim4()</a>, <a class="el" href="boxes_8cpp_source.html#l00295">isBoxPrim5()</a>, <a class="el" href="boxes_8cpp_source.html#l00078">isBoxReal()</a>, <a class="el" href="boxes_8cpp_source.html#l00129">isBoxRec()</a>, <a class="el" href="boxes_8cpp_source.html#l00121">isBoxSeq()</a>, <a class="el" href="boxes_8cpp_source.html#l00104">isBoxSlot()</a>, <a class="el" href="boxes_8cpp_source.html#l00133">isBoxSplit()</a>, <a class="el" href="boxes_8cpp_source.html#l00111">isBoxSymbolic()</a>, <a class="el" href="boxes_8cpp_source.html#l00411">isBoxTGroup()</a>, <a class="el" href="boxes_8cpp_source.html#l00423">isBoxVBargraph()</a>, <a class="el" href="boxes_8cpp_source.html#l00405">isBoxVGroup()</a>, <a class="el" href="boxes_8cpp_source.html#l00359">isBoxVSlider()</a>, <a class="el" href="boxes_8cpp_source.html#l00094">isBoxWire()</a>, <a class="el" href="interval_8hh_source.html#l00060">max()</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00203">Automaton::s</a>.</p>

<p>Referenced by <a class="el" href="boxtype_8cpp_source.html#l00063">getBoxType()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00098"></a>00098 {
<a name="l00099"></a>00099     <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> a, b, ff, l, s;
<a name="l00100"></a>00100     <span class="comment">//Tree abstr, genv, vis, lenv;</span>
<a name="l00101"></a>00101     
<a name="l00102"></a>00102     <a class="code" href="classxtended.html">xtended</a>* p = (<a class="code" href="classxtended.html">xtended</a>*) <a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(t);
<a name="l00103"></a>00103 
<a name="l00104"></a>00104     <span class="keywordflow">if</span> (p)                      { *inum = p-&gt;<a class="code" href="classxtended.html#ad709963a78f1b630e44ff518134487b5">arity</a>(); *onum = 1; }
<a name="l00105"></a>00105     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a7904414896442fcfa0947156b6563d52">isBoxInt</a>(t))       { *inum = 0; *onum = 1; } 
<a name="l00106"></a>00106     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a292a68d93ea73f703bc880cca4d01bc2">isBoxReal</a>(t))      { *inum = 0; *onum = 1; } 
<a name="l00107"></a>00107     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ac32713127f8c8c3cb26e28a31580b257">isBoxWire</a>(t))      { *inum = 1; *onum = 1; }
<a name="l00108"></a>00108     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#acf54df78e7e909644907619a03b3f695">isBoxCut</a>(t))       { *inum = 1; *onum = 0; } 
<a name="l00109"></a>00109 
<a name="l00110"></a>00110     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#af4b23a35faec0884c4591ff92576c3d4">isBoxSlot</a>(t))      { *inum = 0; *onum = 1; } 
<a name="l00111"></a>00111     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ab73899d732fd2181be3d72f28c11ab3d">isBoxSymbolic</a>(t,s,b))  { <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(b, inum, onum)) <span class="keywordflow">return</span> <span class="keyword">false</span>; *inum += 1; } 
<a name="l00112"></a>00112     
<a name="l00113"></a>00113     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#af6596889fd117b00a85ca9ee837f2988">isBoxPrim0</a>(t))     { *inum = 0; *onum = 1; } 
<a name="l00114"></a>00114     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a261369dc82c96fbfa1978859ca4cf2e3">isBoxPrim1</a>(t))     { *inum = 1; *onum = 1; } 
<a name="l00115"></a>00115     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a9c79105875b22a5b09a0b6f768375d09">isBoxPrim2</a>(t))     { *inum = 2; *onum = 1; } 
<a name="l00116"></a>00116     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a826142cbc8a1a762612f22273303794e">isBoxPrim3</a>(t))     { *inum = 3; *onum = 1; } 
<a name="l00117"></a>00117     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a5cae175b6153210d76c153feb2af908c">isBoxPrim4</a>(t))     { *inum = 4; *onum = 1; } 
<a name="l00118"></a>00118     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aba4a65a9f30e78759da0796c55b13e8e">isBoxPrim5</a>(t))     { *inum = 5; *onum = 1; } 
<a name="l00119"></a>00119         
<a name="l00120"></a>00120     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a70f7ab7aecc722355d6096ca89a7658f">isBoxFFun</a>(t,ff))   { *inum = <a class="code" href="prim2_8cpp.html#af82147adb6d445cb8f8878f6dcedba64">ffarity</a>(ff); *onum = 1; } 
<a name="l00121"></a>00121     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a8744a0451eacde8e56290b3fd74bc0b1">isBoxFConst</a>(t))    { *inum = 0; *onum = 1; } 
<a name="l00122"></a>00122     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aed6793582932079092255c2643b45f91">isBoxFVar</a>(t))      { *inum = 0; *onum = 1; } 
<a name="l00123"></a>00123     
<a name="l00124"></a>00124     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a83b021a73e7c4af2535efcfe0832c690">isBoxButton</a>(t))    { *inum = 0; *onum = 1; } 
<a name="l00125"></a>00125     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a635dcccb574f9a9c911b89a756126473">isBoxCheckbox</a>(t))  { *inum = 0; *onum = 1; } 
<a name="l00126"></a>00126     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a4bf55c2d9a65d986d0d19da98d14db16">isBoxVSlider</a>(t))   { *inum = 0; *onum = 1; } 
<a name="l00127"></a>00127     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#adf3ec537a021d2a50ddc8e029d540451">isBoxHSlider</a>(t))   { *inum = 0; *onum = 1; } 
<a name="l00128"></a>00128     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aa135a488b7d54dcce1249f5761ab014a">isBoxNumEntry</a>(t))  { *inum = 0; *onum = 1; } 
<a name="l00129"></a>00129     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a5643302db2568cf9eaa48fd6f7d336a9">isBoxVGroup</a>(t,l,a)){ <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, inum, onum)) <span class="keywordflow">return</span> <span class="keyword">false</span>; } 
<a name="l00130"></a>00130     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a1b73cc14722de085e72c0a008fa56af3">isBoxHGroup</a>(t,l,a)){ <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, inum, onum)) <span class="keywordflow">return</span> <span class="keyword">false</span>; } 
<a name="l00131"></a>00131     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a3e76d86869cc8b1df759a4bcb972cf2d">isBoxTGroup</a>(t,l,a)){ <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, inum, onum)) <span class="keywordflow">return</span> <span class="keyword">false</span>; } 
<a name="l00132"></a>00132     
<a name="l00133"></a>00133     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a1f17c731544a73f907993681b57e7461">isBoxVBargraph</a>(t))     { *inum = 1; *onum = 1; } 
<a name="l00134"></a>00134     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aa34cc27fbf6e04a6825ba4461af2a9e0">isBoxHBargraph</a>(t))     { *inum = 1; *onum = 1; } 
<a name="l00135"></a>00135 
<a name="l00136"></a>00136     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ad7c79f7a1c0aa3109ab0548e59194d48">isBoxSeq</a>(t, a, b)) {
<a name="l00137"></a>00137         
<a name="l00138"></a>00138         <span class="keywordtype">int</span> u,v,x,y;
<a name="l00139"></a>00139         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, &amp;u, &amp;v)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00140"></a>00140         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(b, &amp;x, &amp;y)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00141"></a>00141 
<a name="l00142"></a>00142         <span class="keywordflow">if</span> (v != x) {
<a name="l00143"></a>00143             cerr    &lt;&lt; <span class="stringliteral">&quot;Error in sequential composition (A:B)&quot;</span> &lt;&lt; endl
<a name="l00144"></a>00144                     &lt;&lt; <span class="stringliteral">&quot;The number of outputs (&quot;</span> &lt;&lt; v &lt;&lt; <span class="stringliteral">&quot;) of A = &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(a) &lt;&lt; endl
<a name="l00145"></a>00145                     &lt;&lt; <span class="stringliteral">&quot;must be equal to the number of inputs (&quot;</span> &lt;&lt; x &lt;&lt; <span class="stringliteral">&quot;) of B : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(b) &lt;&lt; endl;
<a name="l00146"></a>00146             exit(1);
<a name="l00147"></a>00147         } <span class="keywordflow">else</span> {
<a name="l00148"></a>00148             *inum = u; *onum = y;
<a name="l00149"></a>00149         }
<a name="l00150"></a>00150 
<a name="l00151"></a>00151     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a8a24d365092cfdabb32218ab8e446dc6">isBoxPar</a>(t, a, b)) {
<a name="l00152"></a>00152         
<a name="l00153"></a>00153         <span class="keywordtype">int</span> u,v,x,y;
<a name="l00154"></a>00154         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, &amp;u, &amp;v)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00155"></a>00155         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(b, &amp;x, &amp;y)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00156"></a>00156 
<a name="l00157"></a>00157         *inum = u+x; *onum = v+y;
<a name="l00158"></a>00158 
<a name="l00159"></a>00159     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a654a2a97bdc734448e669899976bdbd0">isBoxSplit</a>(t, a, b)) {
<a name="l00160"></a>00160         
<a name="l00161"></a>00161         <span class="keywordtype">int</span> u,v,x,y;
<a name="l00162"></a>00162         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, &amp;u, &amp;v)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00163"></a>00163         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(b, &amp;x, &amp;y)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00164"></a>00164 
<a name="l00165"></a>00165         <span class="keywordflow">if</span> (v == 0) {
<a name="l00166"></a>00166             cerr    &lt;&lt; <span class="stringliteral">&quot;Connection error in : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl
<a name="l00167"></a>00167                     &lt;&lt; <span class="stringliteral">&quot;The first expression : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(a) &lt;&lt; <span class="stringliteral">&quot; has no outputs&quot;</span> &lt;&lt; endl;
<a name="l00168"></a>00168             exit(1);
<a name="l00169"></a>00169         }
<a name="l00170"></a>00170         
<a name="l00171"></a>00171         <span class="keywordflow">if</span> (x == 0) {
<a name="l00172"></a>00172             cerr    &lt;&lt; <span class="stringliteral">&quot;Connection error in : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl
<a name="l00173"></a>00173                     &lt;&lt; <span class="stringliteral">&quot;The second expression : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(b) &lt;&lt; <span class="stringliteral">&quot; has no inputs&quot;</span> &lt;&lt; endl;
<a name="l00174"></a>00174             exit(1);
<a name="l00175"></a>00175         }
<a name="l00176"></a>00176          
<a name="l00177"></a>00177         <span class="keywordflow">if</span> (x % v != 0) {
<a name="l00178"></a>00178             cerr    &lt;&lt; <span class="stringliteral">&quot;Connection error in : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl
<a name="l00179"></a>00179                     &lt;&lt; <span class="stringliteral">&quot;The number of outputs &quot;</span> &lt;&lt; v
<a name="l00180"></a>00180                     &lt;&lt; <span class="stringliteral">&quot; of the first expression should be a divisor of the number of inputs &quot;</span> &lt;&lt; x
<a name="l00181"></a>00181                     &lt;&lt; <span class="stringliteral">&quot; of the second expression&quot;</span> &lt;&lt; endl;
<a name="l00182"></a>00182             exit(1);
<a name="l00183"></a>00183         }
<a name="l00184"></a>00184         
<a name="l00185"></a>00185         *inum = u; *onum = y;
<a name="l00186"></a>00186 
<a name="l00187"></a>00187     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a7b7d0ce5bacf1a799517f7b50dfe7a3e">isBoxMerge</a>(t, a, b)) {
<a name="l00188"></a>00188         
<a name="l00189"></a>00189         <span class="keywordtype">int</span> u,v,x,y;
<a name="l00190"></a>00190         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, &amp;u, &amp;v)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00191"></a>00191         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(b, &amp;x, &amp;y)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00192"></a>00192 
<a name="l00193"></a>00193         <span class="keywordflow">if</span> (v == 0) {
<a name="l00194"></a>00194             cerr    &lt;&lt; <span class="stringliteral">&quot;Connection error in : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl
<a name="l00195"></a>00195                     &lt;&lt; <span class="stringliteral">&quot;The first expression : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(a) &lt;&lt; <span class="stringliteral">&quot; has no outputs&quot;</span> &lt;&lt; endl;
<a name="l00196"></a>00196             exit(1);
<a name="l00197"></a>00197         }
<a name="l00198"></a>00198         
<a name="l00199"></a>00199         <span class="keywordflow">if</span> (x == 0) {
<a name="l00200"></a>00200             cerr    &lt;&lt; <span class="stringliteral">&quot;Connection error in : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl
<a name="l00201"></a>00201                     &lt;&lt; <span class="stringliteral">&quot;The second expression : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(b) &lt;&lt; <span class="stringliteral">&quot; has no inputs&quot;</span> &lt;&lt; endl;
<a name="l00202"></a>00202             exit(1);
<a name="l00203"></a>00203         }
<a name="l00204"></a>00204         
<a name="l00205"></a>00205         <span class="keywordflow">if</span> (v % x != 0) { 
<a name="l00206"></a>00206             cerr    &lt;&lt; <span class="stringliteral">&quot;Connection error in : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl
<a name="l00207"></a>00207                     &lt;&lt; <span class="stringliteral">&quot;The number of outputs &quot;</span> &lt;&lt; v
<a name="l00208"></a>00208                     &lt;&lt; <span class="stringliteral">&quot; of the first expression should be a multiple of the number of inputs &quot;</span> &lt;&lt; x
<a name="l00209"></a>00209                     &lt;&lt; <span class="stringliteral">&quot; of the second expression&quot;</span> &lt;&lt; endl;
<a name="l00210"></a>00210             exit(1);
<a name="l00211"></a>00211         }
<a name="l00212"></a>00212 
<a name="l00213"></a>00213         *inum = u; *onum = y;
<a name="l00214"></a>00214 
<a name="l00215"></a>00215     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a97de4dc9680e2d0820a5d1d18255fa35">isBoxRec</a>(t, a, b)) {
<a name="l00216"></a>00216         
<a name="l00217"></a>00217         <span class="keywordtype">int</span> u,v,x,y;
<a name="l00218"></a>00218         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(a, &amp;u, &amp;v)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00219"></a>00219         <span class="keywordflow">if</span> (!<a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(b, &amp;x, &amp;y)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00220"></a>00220         <span class="keywordflow">if</span> ( (x &gt; v) | (y &gt; u) ) { 
<a name="l00221"></a>00221             cerr    &lt;&lt; <span class="stringliteral">&quot;Connection error in : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl;
<a name="l00222"></a>00222             <span class="keywordflow">if</span> (x &gt; v) cerr &lt;&lt; <span class="stringliteral">&quot;The number of outputs &quot;</span> &lt;&lt; v 
<a name="l00223"></a>00223                             &lt;&lt; <span class="stringliteral">&quot; of the first expression should be greater or equal \n  to the number of inputs &quot;</span> &lt;&lt; x 
<a name="l00224"></a>00224                             &lt;&lt; <span class="stringliteral">&quot; of the second exepression&quot;</span> &lt;&lt; endl;
<a name="l00225"></a>00225             <span class="keywordflow">if</span> (y &gt; u) cerr &lt;&lt; <span class="stringliteral">&quot;The number of inputs &quot;</span> &lt;&lt; u
<a name="l00226"></a>00226                             &lt;&lt; <span class="stringliteral">&quot; of the first expression should be greater or equal \n  to the number of outputs &quot;</span> &lt;&lt; y
<a name="l00227"></a>00227                             &lt;&lt; <span class="stringliteral">&quot; of the second exepression&quot;</span> &lt;&lt; endl;
<a name="l00228"></a>00228             exit(1);
<a name="l00229"></a>00229         }
<a name="l00230"></a>00230         *inum = <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>(0,u-y); *onum = v;
<a name="l00231"></a>00231         
<a name="l00232"></a>00232     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a37fc5c4fbb1931425e6bfe12f637ee87">isBoxEnvironment</a>(t)) {
<a name="l00233"></a>00233         cerr &lt;&lt; <span class="stringliteral">&quot;An environment is not a block-diagram : &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t) &lt;&lt; endl;
<a name="l00234"></a>00234         <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00235"></a>00235     } <span class="keywordflow">else</span> {
<a name="l00236"></a>00236       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00237"></a>00237     }
<a name="l00238"></a>00238     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00239"></a>00239 }   
</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>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a8112d401cbebb0271a59c1519be875be"></a><!-- doxytag: member="boxtype.cpp::BOXTYPEPROP" ref="a8112d401cbebb0271a59c1519be875be" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCTree.html">Tree</a> <a class="el" href="boxtype_8cpp.html#a8112d401cbebb0271a59c1519be875be">BOXTYPEPROP</a> = tree(symbol(&quot;boxTypeProp&quot;))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="boxtype_8cpp_source.html#l00050">50</a> of file <a class="el" href="boxtype_8cpp_source.html">boxtype.cpp</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:02 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>