Sophie

Sophie

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

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: ppbox.cpp Source File</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>
<h1>ppbox.cpp</h1><a href="ppbox_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> ************************************************************************</span>
<a name="l00003"></a>00003 <span class="comment">    FAUST compiler</span>
<a name="l00004"></a>00004 <span class="comment">    Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale</span>
<a name="l00005"></a>00005 <span class="comment">    ---------------------------------------------------------------------</span>
<a name="l00006"></a>00006 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
<a name="l00007"></a>00007 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00008"></a>00008 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00009"></a>00009 <span class="comment">    (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment">    along with this program; if not, write to the Free Software</span>
<a name="l00018"></a>00018 <span class="comment">    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00019"></a>00019 <span class="comment"> ************************************************************************</span>
<a name="l00020"></a>00020 <span class="comment"> ************************************************************************/</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="list_8hh.html">list.hh</a>&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="boxes_8hh.html">boxes.hh</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="ppbox_8hh.html">ppbox.hh</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="signals_8hh.html">signals.hh</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="prim2_8hh.html">prim2.hh</a>&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="xtended_8hh.html">xtended.hh</a>&quot;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 
<a name="l00032"></a><a class="code" href="ppbox_8hh.html#a5b146156345acaa92818b2a362e2507b">00032</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="ppbox_8cpp.html#a5b146156345acaa92818b2a362e2507b">prim0name</a>(<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *(*ptr) ())
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034     <span class="keywordflow">return</span> <span class="stringliteral">&quot;prim0???&quot;</span>;
<a name="l00035"></a>00035 }
<a name="l00036"></a>00036 
<a name="l00037"></a><a class="code" href="ppbox_8hh.html#a8f1abadd58804b9c372328443250e0a0">00037</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="ppbox_8cpp.html#a8f1abadd58804b9c372328443250e0a0">prim1name</a>(<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *(*ptr) (<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *))
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#aa329e904f79949f635b5e7ee472c7976">sigDelay1</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;mem&quot;</span>;
<a name="l00040"></a>00040     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#a6e61ed61966e9d6f2e19b4f114d6dc07">sigIntCast</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;int&quot;</span>;
<a name="l00041"></a>00041     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#a93095558ccb99d241c8839e2eacbd64f">sigFloatCast</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;float&quot;</span>;
<a name="l00042"></a>00042     <span class="keywordflow">return</span> <span class="stringliteral">&quot;prim1???&quot;</span>;
<a name="l00043"></a>00043 }
<a name="l00044"></a>00044 
<a name="l00045"></a><a class="code" href="ppbox_8hh.html#aab6e83fd89926efe096c424c0e1e694b">00045</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="ppbox_8cpp.html#aab6e83fd89926efe096c424c0e1e694b">prim2name</a>(<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *(*ptr) (<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *))
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#ab914de7e6da0eea04636dd51ad35240a">sigAdd</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;+&quot;</span>;
<a name="l00048"></a>00048     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a390c47bc104a8e072c0c75ea0f9524e6">sigSub</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;-&quot;</span>;
<a name="l00049"></a>00049     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a333591913e073c3acd6b891b6da85298">sigMul</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;*&quot;</span>;
<a name="l00050"></a>00050     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#aa355af5e231f2e25ed43fa2f3bf6c72f">sigDiv</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;/&quot;</span>;
<a name="l00051"></a>00051     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a4e0f362fbbc7e3eaa37dd1637da01385">sigRem</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;%&quot;</span>;
<a name="l00052"></a>00052 
<a name="l00053"></a>00053     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a0fd3d5dd708928e297b7289c81a2b135">sigAND</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;&amp;&quot;</span>;
<a name="l00054"></a>00054     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#ab49167bdfec43077d07b82a6b0d606f2">sigOR</a> ) <span class="keywordflow">return</span> <span class="stringliteral">&quot;|&quot;</span>;
<a name="l00055"></a>00055     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a3489f3c7632a7a3ee6f70405c9ea0c42">sigXOR</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;^&quot;</span>;
<a name="l00056"></a>00056 
<a name="l00057"></a>00057     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#abb0b074b9d842efc46e9f0909cbdd64a">sigLeftShift</a> ) <span class="keywordflow">return</span> <span class="stringliteral">&quot;&lt;&lt;&quot;</span>;
<a name="l00058"></a>00058     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#ad7ca4720927fa00b4fd944c3e33e1563">sigRightShift</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;&gt;&gt;&quot;</span>;
<a name="l00059"></a>00059 
<a name="l00060"></a>00060     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#aac97f0387416fd4dd6090f65ef263978">sigLT</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;&lt;&quot;</span>;
<a name="l00061"></a>00061     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a68dde7c17e18278689a22caafcbcebb3">sigLE</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;&lt;=&quot;</span>;
<a name="l00062"></a>00062     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a7035cc851064c3e3b9f4f47c2164fd33">sigGT</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;&gt;&quot;</span>;
<a name="l00063"></a>00063     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#ae141796959ee846e4fc66e749a7e6df3">sigGE</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;&gt;=&quot;</span>;
<a name="l00064"></a>00064     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a682eb3d896f56221daff5a305115940b">sigEQ</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;==&quot;</span>;
<a name="l00065"></a>00065     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a85c09df5b5212ddc73c687ec1ea7ae5a">sigNE</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;!=&quot;</span>;
<a name="l00066"></a>00066 
<a name="l00067"></a>00067     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#ae4887b59dd1461bfacc431147c78ebb8">sigFixDelay</a>) <span class="keywordflow">return</span> <span class="stringliteral">&quot;@&quot;</span>;
<a name="l00068"></a>00068     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#aed0831b7a845cd58ab430a42abb7e69c">sigPrefix</a>)   <span class="keywordflow">return</span> <span class="stringliteral">&quot;prefix&quot;</span>;
<a name="l00069"></a>00069     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#ad8a10742ab836237673156bf6b37cf20">sigAttach</a>)   <span class="keywordflow">return</span> <span class="stringliteral">&quot;attach&quot;</span>;
<a name="l00070"></a>00070 
<a name="l00071"></a>00071     <span class="keywordflow">return</span> <span class="stringliteral">&quot;prim2???&quot;</span>;
<a name="l00072"></a>00072 }
<a name="l00073"></a>00073 
<a name="l00074"></a><a class="code" href="ppbox_8hh.html#a98e1c3df1237e09e4d98ca263b47c9fe">00074</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="ppbox_8cpp.html#a98e1c3df1237e09e4d98ca263b47c9fe">prim3name</a>(<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *(*ptr) (<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *))
<a name="l00075"></a>00075 {
<a name="l00076"></a>00076     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a428189df3c9af99579448ce981d557b1">sigReadOnlyTable</a>)    <span class="keywordflow">return</span> <span class="stringliteral">&quot;rdtable&quot;</span>;
<a name="l00077"></a>00077     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#a2283eb07e3595f93d678bf9ab986d914">sigSelect2</a>)          <span class="keywordflow">return</span> <span class="stringliteral">&quot;select2&quot;</span>;
<a name="l00078"></a>00078     <span class="keywordflow">return</span> <span class="stringliteral">&quot;prim3???&quot;</span>;
<a name="l00079"></a>00079 }
<a name="l00080"></a>00080 
<a name="l00081"></a><a class="code" href="ppbox_8hh.html#a02ff42a6b78b33f02f96c67bf7fd386b">00081</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="ppbox_8cpp.html#a02ff42a6b78b33f02f96c67bf7fd386b">prim4name</a>(<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *(*ptr) (<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *))
<a name="l00082"></a>00082 {
<a name="l00083"></a>00083     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8cpp.html#a70367824d7df436ff7267bb124826750">sigSelect3</a>)          <span class="keywordflow">return</span> <span class="stringliteral">&quot;select3&quot;</span>;
<a name="l00084"></a>00084     <span class="keywordflow">return</span> <span class="stringliteral">&quot;prim4???&quot;</span>;
<a name="l00085"></a>00085 }
<a name="l00086"></a>00086 
<a name="l00087"></a><a class="code" href="ppbox_8hh.html#a0d9d3bae236541656f2e0b0c88fee269">00087</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="ppbox_8cpp.html#a0d9d3bae236541656f2e0b0c88fee269">prim5name</a>(<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *(*ptr) (<a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *, <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">CTree</a> *))
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089     <span class="keywordflow">if</span> (ptr == <a class="code" href="signals_8hh.html#a7b228b627c0d3ed4181cc08f65e538c1">sigWriteReadTable</a>)   <span class="keywordflow">return</span> <span class="stringliteral">&quot;wrtable&quot;</span>;
<a name="l00090"></a>00090     <span class="keywordflow">return</span> <span class="stringliteral">&quot;prim5???&quot;</span>;
<a name="l00091"></a>00091 }
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 
<a name="l00094"></a><a class="code" href="ppbox_8cpp.html#a756c422aeae1e55ccc53c49ef58170f6">00094</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="ppbox_8cpp.html#a756c422aeae1e55ccc53c49ef58170f6">streambinop</a>(ostream&amp; fout, <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> t1, <span class="keyword">const</span> <span class="keywordtype">char</span>* op, <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> t2, <span class="keywordtype">int</span> curPriority, <span class="keywordtype">int</span> upPriority)
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096     <span class="keywordflow">if</span> (upPriority &gt; curPriority) fout &lt;&lt; <span class="charliteral">&#39;(&#39;</span>;
<a name="l00097"></a>00097     fout &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t1,curPriority) &lt;&lt; op &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(t2,curPriority);
<a name="l00098"></a>00098     <span class="keywordflow">if</span> (upPriority &gt; curPriority) fout &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00099"></a>00099 }
<a name="l00100"></a>00100 
<a name="l00101"></a><a class="code" href="ppbox_8cpp.html#a26603ca40d863fb1513efe5dee2cd3e1">00101</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="ppbox_8cpp.html#a26603ca40d863fb1513efe5dee2cd3e1">printRule</a>(ostream&amp; fout, <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> rule)
<a name="l00102"></a>00102 {
<a name="l00103"></a>00103     <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> lhs = <a class="code" href="list_8hh.html#a626356b3c8f3e0130d0e043a1dd8547c">left</a>(rule);
<a name="l00104"></a>00104     <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> rhs = <a class="code" href="list_8hh.html#a098460d0916242eebda50610e2a86e39">right</a>(rule);
<a name="l00105"></a>00105     <span class="keywordtype">char</span> sep = <span class="charliteral">&#39;(&#39;</span>; <span class="keywordflow">while</span> (!<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(lhs)) { fout &lt;&lt; sep &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(lhs)); sep=<span class="charliteral">&#39;,&#39;</span>; lhs=<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(lhs); }
<a name="l00106"></a>00106     fout &lt;&lt; <span class="stringliteral">&quot;) =&gt; &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(rhs) &lt;&lt; <span class="stringliteral">&quot;; &quot;</span>;
<a name="l00107"></a>00107 }
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 <span class="comment">/*****************************************************************************</span>
<a name="l00110"></a>00110 <span class="comment">     affichage d&#39;une expression box comme en entree</span>
<a name="l00111"></a>00111 <span class="comment">*****************************************************************************/</span>
<a name="l00112"></a>00112 
<a name="l00113"></a><a class="code" href="classboxpp.html#aa9c11fc2b7de08c1fcd4a6103ffeff5f">00113</a> ostream&amp; <a class="code" href="classboxpp.html#aa9c11fc2b7de08c1fcd4a6103ffeff5f">boxpp::print</a> (ostream&amp; fout)<span class="keyword"> const</span>
<a name="l00114"></a>00114 <span class="keyword"></span>{
<a name="l00115"></a>00115     <span class="keywordtype">int</span>     i, id;
<a name="l00116"></a>00116     <span class="keywordtype">double</span>  r;
<a name="l00117"></a>00117     <a class="code" href="boxes_8hh.html#a52afc5e73408f761d5d61926ced73eef">prim0</a>   p0;
<a name="l00118"></a>00118     <a class="code" href="boxes_8hh.html#ad7497a9790f9d05878096b459487a510">prim1</a>   p1;
<a name="l00119"></a>00119     <a class="code" href="boxes_8hh.html#abc5863a46190002232036f027c5acfdb">prim2</a>   p2;
<a name="l00120"></a>00120     <a class="code" href="boxes_8hh.html#a2769ccced25ffcb2997204594bb52f0e">prim3</a>   p3;
<a name="l00121"></a>00121     <a class="code" href="boxes_8hh.html#a55608c6610d13a8ccd575de80c191b31">prim4</a>   p4;
<a name="l00122"></a>00122     <a class="code" href="boxes_8hh.html#ae228ee0345249785e8f74cce21162037">prim5</a>   p5;
<a name="l00123"></a>00123 
<a name="l00124"></a>00124     <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>    t1, t2, t3, ff, label, cur, <a class="code" href="interval_8hh.html#a2f8edc4561e9744ed4233b205fa7ec32">min</a>, <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>, step, type, <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>, file, arg,
<a name="l00125"></a>00125             body, fun, args, abstr, genv, vis, lenv, ldef, slot,
<a name="l00126"></a>00126             ident, rules;
<a name="l00127"></a>00127 
<a name="l00128"></a>00128     <span class="keyword">const</span> <span class="keywordtype">char</span>* str;
<a name="l00129"></a>00129 
<a name="l00130"></a>00130     <a class="code" href="classxtended.html">xtended</a>* xt = (<a class="code" href="classxtended.html">xtended</a>*) <a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>);
<a name="l00131"></a>00131 
<a name="l00132"></a>00132 
<a name="l00133"></a>00133     <span class="comment">// primitive elements</span>
<a name="l00134"></a>00134          <span class="keywordflow">if</span> (xt)                        fout &lt;&lt; xt-&gt;<a class="code" href="classxtended.html#a59e2a80966bb13528803e79b32c7a365">name</a>();
<a name="l00135"></a>00135     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a7904414896442fcfa0947156b6563d52">isBoxInt</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;i))         fout &lt;&lt; i;
<a name="l00136"></a>00136     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a292a68d93ea73f703bc880cca4d01bc2">isBoxReal</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;r))        fout &lt;&lt; r;
<a name="l00137"></a>00137     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#acf54df78e7e909644907619a03b3f695">isBoxCut</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>))             fout &lt;&lt; <span class="charliteral">&#39;!&#39;</span>;
<a name="l00138"></a>00138     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ac32713127f8c8c3cb26e28a31580b257">isBoxWire</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>))            fout &lt;&lt; <span class="charliteral">&#39;_&#39;</span>;
<a name="l00139"></a>00139     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a15452e8c3476a87963f8a52cb1e905db">isBoxIdent</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;str))     fout &lt;&lt; str;
<a name="l00140"></a>00140     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#af6596889fd117b00a85ca9ee837f2988">isBoxPrim0</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;p0))      fout &lt;&lt; <a class="code" href="ppbox_8cpp.html#a5b146156345acaa92818b2a362e2507b">prim0name</a>(p0);
<a name="l00141"></a>00141     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a261369dc82c96fbfa1978859ca4cf2e3">isBoxPrim1</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;p1))      fout &lt;&lt; <a class="code" href="ppbox_8cpp.html#a8f1abadd58804b9c372328443250e0a0">prim1name</a>(p1);
<a name="l00142"></a>00142     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a9c79105875b22a5b09a0b6f768375d09">isBoxPrim2</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;p2))      fout &lt;&lt; <a class="code" href="ppbox_8cpp.html#aab6e83fd89926efe096c424c0e1e694b">prim2name</a>(p2);
<a name="l00143"></a>00143     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a826142cbc8a1a762612f22273303794e">isBoxPrim3</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;p3))      fout &lt;&lt; <a class="code" href="ppbox_8cpp.html#a98e1c3df1237e09e4d98ca263b47c9fe">prim3name</a>(p3);
<a name="l00144"></a>00144     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a5cae175b6153210d76c153feb2af908c">isBoxPrim4</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;p4))      fout &lt;&lt; <a class="code" href="ppbox_8cpp.html#a02ff42a6b78b33f02f96c67bf7fd386b">prim4name</a>(p4);
<a name="l00145"></a>00145     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aba4a65a9f30e78759da0796c55b13e8e">isBoxPrim5</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;p5))      fout &lt;&lt; <a class="code" href="ppbox_8cpp.html#a0d9d3bae236541656f2e0b0c88fee269">prim5name</a>(p5);
<a name="l00146"></a>00146 
<a name="l00147"></a>00147     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ab0b15f29743df4080b8b1c38e64a2cc1">isBoxAbstr</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>,arg,body))  fout &lt;&lt; <span class="stringliteral">&quot;\\&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(arg) &lt;&lt; <span class="stringliteral">&quot;.(&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(body) &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00148"></a>00148     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a25bfc1d2b8e1649e3f5ca468771c08f6">isBoxAppl</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, fun, args)) fout &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(fun) &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(args) ;
<a name="l00149"></a>00149 
<a name="l00150"></a>00150     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ab7f1921185dc888aee8f041a96989eb3">isBoxWithLocalDef</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, body, ldef))    fout &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(body) &lt;&lt; <span class="stringliteral">&quot; with { &quot;</span> &lt;&lt; <a class="code" href="classenvpp.html">envpp</a>(ldef) &lt;&lt; <span class="stringliteral">&quot; }&quot;</span>;
<a name="l00151"></a>00151 
<a name="l00152"></a>00152     <span class="comment">// foreign elements</span>
<a name="l00153"></a>00153     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a70f7ab7aecc722355d6096ca89a7658f">isBoxFFun</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, ff))        fout &lt;&lt; <span class="stringliteral">&quot;ffunction(&quot;</span> &lt;&lt; <a class="code" href="prim2_8cpp.html#a9293046e818b432cfa8a7d418679eff3">ffname</a>(ff) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00154"></a>00154     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a8744a0451eacde8e56290b3fd74bc0b1">isBoxFConst</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, type, name, file))
<a name="l00155"></a>00155                                         fout &lt;&lt; <span class="stringliteral">&quot;fconstant(&quot;</span> <span class="comment">/*&lt;&lt; tree2str(type) */</span>&lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(name) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00156"></a>00156     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aed6793582932079092255c2643b45f91">isBoxFVar</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, type, name, file))
<a name="l00157"></a>00157                                         fout &lt;&lt; <span class="stringliteral">&quot;fvariable(&quot;</span> &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(name) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00158"></a>00158 
<a name="l00159"></a>00159     <span class="comment">// block diagram binary operator</span>
<a name="l00160"></a>00160     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ad7c79f7a1c0aa3109ab0548e59194d48">isBoxSeq</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2))     <a class="code" href="ppbox_8cpp.html#a756c422aeae1e55ccc53c49ef58170f6">streambinop</a>(fout, t1, <span class="stringliteral">&quot;:&quot;</span>, t2, 1, <a class="code" href="classboxpp.html#a75835a893a0ba4c9bc2f67ea423c085e">priority</a>);
<a name="l00161"></a>00161     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a654a2a97bdc734448e669899976bdbd0">isBoxSplit</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2))   <a class="code" href="ppbox_8cpp.html#a756c422aeae1e55ccc53c49ef58170f6">streambinop</a>(fout, t1, <span class="stringliteral">&quot;&lt;:&quot;</span>, t2, 1, <a class="code" href="classboxpp.html#a75835a893a0ba4c9bc2f67ea423c085e">priority</a>);
<a name="l00162"></a>00162     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a7b7d0ce5bacf1a799517f7b50dfe7a3e">isBoxMerge</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2))   <a class="code" href="ppbox_8cpp.html#a756c422aeae1e55ccc53c49ef58170f6">streambinop</a>(fout, t1, <span class="stringliteral">&quot;:&gt;&quot;</span>, t2, 1, <a class="code" href="classboxpp.html#a75835a893a0ba4c9bc2f67ea423c085e">priority</a>);
<a name="l00163"></a>00163     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a8a24d365092cfdabb32218ab8e446dc6">isBoxPar</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2))     <a class="code" href="ppbox_8cpp.html#a756c422aeae1e55ccc53c49ef58170f6">streambinop</a>(fout, t1,<span class="stringliteral">&quot;,&quot;</span>,t2, 2, <a class="code" href="classboxpp.html#a75835a893a0ba4c9bc2f67ea423c085e">priority</a>);
<a name="l00164"></a>00164     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a97de4dc9680e2d0820a5d1d18255fa35">isBoxRec</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2))     <a class="code" href="ppbox_8cpp.html#a756c422aeae1e55ccc53c49ef58170f6">streambinop</a>(fout, t1,<span class="stringliteral">&quot;~&quot;</span>,t2, 4, <a class="code" href="classboxpp.html#a75835a893a0ba4c9bc2f67ea423c085e">priority</a>);
<a name="l00165"></a>00165 
<a name="l00166"></a>00166     <span class="comment">// iterative block diagram construction</span>
<a name="l00167"></a>00167     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aaee8867be9aa585c10a24e8bcfda8be8">isBoxIPar</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2, t3))    fout &lt;&lt; <span class="stringliteral">&quot;par(&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t2) &lt;&lt; <span class="stringliteral">&quot;) {&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t3) &lt;&lt; <span class="stringliteral">&quot;}&quot;</span>;
<a name="l00168"></a>00168     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a941c97af1f77596438700760de8556b4">isBoxISeq</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2, t3))    fout &lt;&lt; <span class="stringliteral">&quot;seq(&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t2) &lt;&lt; <span class="stringliteral">&quot;) {&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t3) &lt;&lt; <span class="stringliteral">&quot;}&quot;</span>;
<a name="l00169"></a>00169     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#adb2b3be73061b6840374339d0a111dd5">isBoxISum</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2, t3))    fout &lt;&lt; <span class="stringliteral">&quot;sum(&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t2) &lt;&lt; <span class="stringliteral">&quot;) {&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t3) &lt;&lt; <span class="stringliteral">&quot;}&quot;</span>;
<a name="l00170"></a>00170     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ac0013317ab94b61d9e25f026316487b3">isBoxIProd</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2, t3))   fout &lt;&lt; <span class="stringliteral">&quot;prod(&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t2) &lt;&lt; <span class="stringliteral">&quot;) {&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t3) &lt;&lt; <span class="stringliteral">&quot;}&quot;</span>;
<a name="l00171"></a>00171 
<a name="l00172"></a>00172     <span class="comment">// user interface</span>
<a name="l00173"></a>00173     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a83b021a73e7c4af2535efcfe0832c690">isBoxButton</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label))   fout &lt;&lt; <span class="stringliteral">&quot;button(&quot;</span> &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00174"></a>00174     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a635dcccb574f9a9c911b89a756126473">isBoxCheckbox</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label)) fout &lt;&lt; <span class="stringliteral">&quot;checkbox(&quot;</span> &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00175"></a>00175     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a4bf55c2d9a65d986d0d19da98d14db16">isBoxVSlider</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, cur, min, max, step))     {
<a name="l00176"></a>00176         fout &lt;&lt; <span class="stringliteral">&quot;vslider(&quot;</span>
<a name="l00177"></a>00177              &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00178"></a>00178              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(cur) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00179"></a>00179              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(min) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00180"></a>00180              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(max) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00181"></a>00181              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(step)&lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00182"></a>00182     }
<a name="l00183"></a>00183     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#adf3ec537a021d2a50ddc8e029d540451">isBoxHSlider</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, cur, min, max, step))     {
<a name="l00184"></a>00184         fout &lt;&lt; <span class="stringliteral">&quot;hslider(&quot;</span>
<a name="l00185"></a>00185              &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00186"></a>00186              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(cur) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00187"></a>00187              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(min) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00188"></a>00188              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(max) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00189"></a>00189              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(step)&lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00190"></a>00190     }
<a name="l00191"></a>00191     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a5643302db2568cf9eaa48fd6f7d336a9">isBoxVGroup</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, t1)) {
<a name="l00192"></a>00192         fout &lt;&lt; <span class="stringliteral">&quot;vgroup(&quot;</span> &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1, 0) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00193"></a>00193     }
<a name="l00194"></a>00194     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a1b73cc14722de085e72c0a008fa56af3">isBoxHGroup</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, t1)) {
<a name="l00195"></a>00195         fout &lt;&lt; <span class="stringliteral">&quot;hgroup(&quot;</span> &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1, 0) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00196"></a>00196     }
<a name="l00197"></a>00197     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a3e76d86869cc8b1df759a4bcb972cf2d">isBoxTGroup</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, t1)) {
<a name="l00198"></a>00198         fout &lt;&lt; <span class="stringliteral">&quot;tgroup(&quot;</span> &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1, 0) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00199"></a>00199     }
<a name="l00200"></a>00200     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aa34cc27fbf6e04a6825ba4461af2a9e0">isBoxHBargraph</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, min, max))  {
<a name="l00201"></a>00201         fout &lt;&lt; <span class="stringliteral">&quot;hbargraph(&quot;</span>
<a name="l00202"></a>00202              &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00203"></a>00203              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(min) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00204"></a>00204              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(max) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00205"></a>00205     }
<a name="l00206"></a>00206     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a1f17c731544a73f907993681b57e7461">isBoxVBargraph</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, min, max))  {
<a name="l00207"></a>00207         fout &lt;&lt; <span class="stringliteral">&quot;vbargraph(&quot;</span>
<a name="l00208"></a>00208              &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00209"></a>00209              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(min) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00210"></a>00210              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(max) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00211"></a>00211     }
<a name="l00212"></a>00212     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aa135a488b7d54dcce1249f5761ab014a">isBoxNumEntry</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label, cur, min, max, step))    {
<a name="l00213"></a>00213         fout &lt;&lt; <span class="stringliteral">&quot;nentry(&quot;</span>
<a name="l00214"></a>00214              &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00215"></a>00215              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(cur) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00216"></a>00216              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(min) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00217"></a>00217              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(max) &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>
<a name="l00218"></a>00218              &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(step)&lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00219"></a>00219     }
<a name="l00220"></a>00220     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>)) {
<a name="l00221"></a>00221         fout &lt;&lt; <span class="stringliteral">&quot;()&quot;</span> ;
<a name="l00222"></a>00222     }
<a name="l00223"></a>00223     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>)) {
<a name="l00224"></a>00224 
<a name="l00225"></a>00225         <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> l = <a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>;
<a name="l00226"></a>00226         <span class="keywordtype">char</span> sep = <span class="charliteral">&#39;(&#39;</span>;
<a name="l00227"></a>00227 
<a name="l00228"></a>00228         <span class="keywordflow">do</span> {
<a name="l00229"></a>00229             fout &lt;&lt; sep &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(l));
<a name="l00230"></a>00230             sep = <span class="charliteral">&#39;,&#39;</span>;
<a name="l00231"></a>00231             l = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(l);
<a name="l00232"></a>00232         } <span class="keywordflow">while</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(l));
<a name="l00233"></a>00233 
<a name="l00234"></a>00234         fout &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00235"></a>00235 
<a name="l00236"></a>00236     }
<a name="l00237"></a>00237     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a37fc5c4fbb1931425e6bfe12f637ee87">isBoxEnvironment</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>)) {
<a name="l00238"></a>00238         fout &lt;&lt; <span class="stringliteral">&quot;environment&quot;</span>;
<a name="l00239"></a>00239     }
<a name="l00240"></a>00240     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a06b09fa05baf1a2567fb4aae3d1ce544">isClosure</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, abstr, genv, vis, lenv)) {
<a name="l00241"></a>00241         fout &lt;&lt; <span class="stringliteral">&quot;closure[&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(abstr)
<a name="l00242"></a>00242             &lt;&lt; <span class="stringliteral">&quot;, genv = &quot;</span> &lt;&lt; <a class="code" href="classenvpp.html">envpp</a>(genv)
<a name="l00243"></a>00243             &lt;&lt; <span class="stringliteral">&quot;, lenv = &quot;</span> &lt;&lt; <a class="code" href="classenvpp.html">envpp</a>(lenv)
<a name="l00244"></a>00244             &lt;&lt; <span class="stringliteral">&quot;]&quot;</span>;
<a name="l00245"></a>00245     }
<a name="l00246"></a>00246     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#abc1bd1c9718505ba602a6b5ed9d918b6">isBoxComponent</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label)) {
<a name="l00247"></a>00247         fout &lt;&lt; <span class="stringliteral">&quot;component(&quot;</span>
<a name="l00248"></a>00248             &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00249"></a>00249     }
<a name="l00250"></a>00250     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a342ac3176f21f2f11931cd0b004d78d3">isBoxAccess</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, t1, t2)) {
<a name="l00251"></a>00251         fout &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t1) &lt;&lt; <span class="charliteral">&#39;.&#39;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(t2);
<a name="l00252"></a>00252     }
<a name="l00253"></a>00253     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a669c5f5ddf58b6f22e1497e24577469b">isImportFile</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, label)) {
<a name="l00254"></a>00254         fout &lt;&lt; <span class="stringliteral">&quot;import(&quot;</span>
<a name="l00255"></a>00255             &lt;&lt; <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(label) &lt;&lt; <span class="charliteral">&#39;)&#39;</span>;
<a name="l00256"></a>00256     }
<a name="l00257"></a>00257     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#af4b23a35faec0884c4591ff92576c3d4">isBoxSlot</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, &amp;<span class="keywordtype">id</span>)) {
<a name="l00258"></a>00258         fout &lt;&lt; <span class="stringliteral">&quot;#&quot;</span> &lt;&lt; id;
<a name="l00259"></a>00259     }
<a name="l00260"></a>00260     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ab73899d732fd2181be3d72f28c11ab3d">isBoxSymbolic</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, slot, body)) {
<a name="l00261"></a>00261         fout &lt;&lt; <span class="stringliteral">&quot;[&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(slot) &lt;&lt; <span class="stringliteral">&quot;&gt;&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(body) &lt;&lt; <span class="stringliteral">&quot;]&quot;</span>;
<a name="l00262"></a>00262     }
<a name="l00263"></a>00263     
<a name="l00264"></a>00264     <span class="comment">// Pattern Matching Extensions</span>
<a name="l00265"></a>00265     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a345a4cfac5657c40640b503058b300f9">isBoxCase</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, rules)) {
<a name="l00266"></a>00266         fout &lt;&lt; <span class="stringliteral">&quot;case {&quot;</span>;
<a name="l00267"></a>00267         <span class="keywordflow">while</span> (!<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(rules)) { <a class="code" href="ppbox_8cpp.html#a26603ca40d863fb1513efe5dee2cd3e1">printRule</a>(fout, <a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(rules)); rules = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(rules); }
<a name="l00268"></a>00268         fout &lt;&lt; <span class="stringliteral">&quot;}&quot;</span>;     
<a name="l00269"></a>00269     }
<a name="l00270"></a>00270 <span class="preprocessor">#if 0</span>
<a name="l00271"></a>00271 <span class="preprocessor"></span>    <span class="comment">// more useful for debugging output</span>
<a name="l00272"></a>00272     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ad166878e0270e4eab4adf2fb5f81fc31">isBoxPatternVar</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, ident)) {
<a name="l00273"></a>00273         fout &lt;&lt; <span class="stringliteral">&quot;&lt;&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(ident) &lt;&lt; <span class="stringliteral">&quot;&gt;&quot;</span>; 
<a name="l00274"></a>00274     }
<a name="l00275"></a>00275 <span class="preprocessor">#else</span>
<a name="l00276"></a>00276 <span class="preprocessor"></span>    <span class="comment">// beautify messages involving lhs patterns</span>
<a name="l00277"></a>00277     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ad166878e0270e4eab4adf2fb5f81fc31">isBoxPatternVar</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>, ident)) {
<a name="l00278"></a>00278         fout &lt;&lt; <a class="code" href="classboxpp.html#aedd60f8cf603dd422b056ced0a7a9a56">boxpp</a>(ident);   
<a name="l00279"></a>00279     }
<a name="l00280"></a>00280 <span class="preprocessor">#endif</span>
<a name="l00281"></a>00281 <span class="preprocessor"></span>
<a name="l00282"></a>00282     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a23a555bb65c1a6a4af53c7c1f24ff124">isBoxPatternMatcher</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>)) {
<a name="l00283"></a>00283         fout &lt;&lt; <span class="stringliteral">&quot;PM[&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a> &lt;&lt; <span class="stringliteral">&quot;]&quot;</span>;    
<a name="l00284"></a>00284     }
<a name="l00285"></a>00285 
<a name="l00286"></a>00286     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a0f492ef7453000e0b40455ac32bd76d4">isBoxError</a>(<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a>)) {
<a name="l00287"></a>00287         fout &lt;&lt; <span class="stringliteral">&quot;ERROR&quot;</span>;    
<a name="l00288"></a>00288     }
<a name="l00289"></a>00289 
<a name="l00290"></a>00290     
<a name="l00291"></a>00291     <span class="comment">// None of the previous tests succeded, then it is not a valid box</span>
<a name="l00292"></a>00292     <span class="keywordflow">else</span> {
<a name="l00293"></a>00293         cerr &lt;&lt; <span class="stringliteral">&quot;Error in box::print() : &quot;</span> &lt;&lt; *<a class="code" href="classboxpp.html#a8e3b1c52490c065c160399a10f3c1c6d">box</a> &lt;&lt; <span class="stringliteral">&quot; is not the address of a valid box&quot;</span> &lt;&lt; endl;
<a name="l00294"></a>00294         exit(1);
<a name="l00295"></a>00295     }
<a name="l00296"></a>00296 
<a name="l00297"></a>00297     <span class="keywordflow">return</span> fout;
<a name="l00298"></a>00298 }
<a name="l00299"></a>00299 
<a name="l00300"></a>00300 
<a name="l00301"></a>00301 <span class="comment">/*****************************************************************************</span>
<a name="l00302"></a>00302 <span class="comment">     affichage d&#39;un environnement</span>
<a name="l00303"></a>00303 <span class="comment">*****************************************************************************/</span>
<a name="l00304"></a>00304 
<a name="l00305"></a><a class="code" href="classenvpp.html#a0eb974f49addf54e5e2c63ee78c6447d">00305</a> ostream&amp; <a class="code" href="classenvpp.html#a0eb974f49addf54e5e2c63ee78c6447d">envpp::print</a> (ostream&amp; fout)<span class="keyword"> const</span>
<a name="l00306"></a>00306 <span class="keyword"></span>{
<a name="l00307"></a>00307         <span class="keyword">const</span> <span class="keywordtype">char</span>*     sep = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00308"></a>00308         <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>    l = <a class="code" href="classenvpp.html#a7a86c4dcf940eb000a84302d3ae52f4a">fEnv</a>;
<a name="l00309"></a>00309 
<a name="l00310"></a>00310         fout &lt;&lt; <span class="charliteral">&#39;{&#39;</span>;
<a name="l00311"></a>00311         <span class="keywordflow">while</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(l)) {
<a name="l00312"></a>00312             fout &lt;&lt; sep &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(l))) &lt;&lt; <span class="stringliteral">&quot;=&quot;</span> &lt;&lt; <a class="code" href="classboxpp.html">boxpp</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(l)));
<a name="l00313"></a>00313             sep = <span class="stringliteral">&quot;, &quot;</span>;
<a name="l00314"></a>00314             l = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(l);
<a name="l00315"></a>00315         }
<a name="l00316"></a>00316         fout &lt;&lt; <span class="charliteral">&#39;}&#39;</span>;
<a name="l00317"></a>00317     <span class="keywordflow">return</span> fout;
<a name="l00318"></a>00318 }
<a name="l00319"></a>00319 
</pre></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>