Sophie

Sophie

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

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: tree.hh 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>tree.hh</h1><a href="tree_8hh.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 <span class="comment">/*****************************************************************************</span>
<a name="l00024"></a>00024 <span class="comment">******************************************************************************/</span>
<a name="l00025"></a>00025 
<a name="l00070"></a>00070 <span class="comment">/*****************************************************************************</span>
<a name="l00071"></a>00071 <span class="comment">******************************************************************************/</span>
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 <span class="preprocessor">#ifndef     __TREE__</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define     __TREE__</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00078"></a>00078 <span class="preprocessor">#include &quot;<a class="code" href="symbol_8hh.html" title="A library to create and manipulate symbols with a unique name.">symbol.hh</a>&quot;</span>
<a name="l00079"></a>00079 <span class="preprocessor">#include &quot;<a class="code" href="node_8hh.html" title="A Node is a tagged unions of int, double, symbol and void* used in the implementation...">node.hh</a>&quot;</span>
<a name="l00080"></a>00080 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00081"></a>00081 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00082"></a>00082 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 <span class="comment">//---------------------------------API---------------------------------------</span>
<a name="l00085"></a>00085 
<a name="l00086"></a><a class="code" href="tree_8hh.html#a550445c18f13907b563fa164d2aa5c4e">00086</a> <span class="keyword">class   </span><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="l00087"></a>00087 <span class="keyword">typedef</span> <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...">Tree</a>;
<a name="l00088"></a>00088 
<a name="l00089"></a><a class="code" href="tree_8hh.html#a22ad9111eca5d638262f4744720be347">00089</a> <span class="keyword">typedef</span> map&lt;Tree, Tree&gt; <a class="code" href="tree_8hh.html#a22ad9111eca5d638262f4744720be347">plist</a>;
<a name="l00090"></a><a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">00090</a> <span class="keyword">typedef</span> vector&lt;Tree&gt;    <a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">tvec</a>;
<a name="l00091"></a>00091 
<a name="l00109"></a><a class="code" href="classCTree.html">00109</a> <span class="keyword">class </span><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="l00110"></a>00110 {
<a name="l00111"></a>00111  <span class="keyword">private</span>:
<a name="l00112"></a><a class="code" href="classCTree.html#a29bf4e2903225271f81664d165bfef16">00112</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span>    <a class="code" href="classCTree.html#a29bf4e2903225271f81664d165bfef16">kHashTableSize</a> = 2000000; <span class="comment">//510511; ///&lt; size of the hash table used for &quot;hash consing&quot;</span>
<a name="l00113"></a><a class="code" href="classCTree.html#a3af2b052219194e951e1fe16ba9c0128">00113</a>     <span class="keyword">static</span> <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 class="code" href="classCTree.html#a3af2b052219194e951e1fe16ba9c0128" title="hash table used for &amp;quot;hash consing&amp;quot;">gHashTable</a>[<a class="code" href="classCTree.html#a29bf4e2903225271f81664d165bfef16">kHashTableSize</a>]; 
<a name="l00114"></a>00114 
<a name="l00115"></a>00115  <span class="keyword">public</span>:
<a name="l00116"></a><a class="code" href="classCTree.html#a85407e2333d3a3cc0f7859dad785e09f">00116</a>     <span class="keyword">static</span> <span class="keywordtype">bool</span>         <a class="code" href="classCTree.html#a85407e2333d3a3cc0f7859dad785e09f" title="Ctree::print() print with more details when true.">gDetails</a>;                   
<a name="l00117"></a>00117 
<a name="l00118"></a>00118  <span class="keyword">private</span>:
<a name="l00119"></a>00119     <span class="comment">// fields</span>
<a name="l00120"></a><a class="code" href="classCTree.html#a4ef66f2806d14e5f23c5e836b62375c9">00120</a>     <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 class="code" href="classCTree.html#a4ef66f2806d14e5f23c5e836b62375c9" title="next tree in the same hashtable entry">fNext</a>;              
<a name="l00121"></a><a class="code" href="classCTree.html#a91ef5d8ea6566e34450e7a14a45d0b1c">00121</a>     <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>        <a class="code" href="classCTree.html#a91ef5d8ea6566e34450e7a14a45d0b1c" title="the node content of the tree">fNode</a>;              
<a name="l00122"></a><a class="code" href="classCTree.html#adcb3bc208e0afc57732591da133dbc1c">00122</a>     <span class="keywordtype">void</span>*       <a class="code" href="classCTree.html#adcb3bc208e0afc57732591da133dbc1c" title="the type of a tree">fType</a>;              
<a name="l00123"></a><a class="code" href="classCTree.html#afaa8b85a64115a64f26fea7c7c778c53">00123</a>     <a class="code" href="tree_8hh.html#a22ad9111eca5d638262f4744720be347">plist</a>       <a class="code" href="classCTree.html#afaa8b85a64115a64f26fea7c7c778c53" title="the properties list attached to the tree">fProperties</a>;        
<a name="l00124"></a><a class="code" href="classCTree.html#a89094f441d0df103119ef5b1483f66f4">00124</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>        <a class="code" href="classCTree.html#a89094f441d0df103119ef5b1483f66f4" title="the hashtable key">fHashKey</a>;           
<a name="l00125"></a><a class="code" href="classCTree.html#a711625a5c7ad5c643600ac0ef3fff9d3">00125</a>     <span class="keywordtype">int</span>         <a class="code" href="classCTree.html#a711625a5c7ad5c643600ac0ef3fff9d3" title="how &amp;quot;open&amp;quot; is a tree (synthezised field)">fAperture</a>;          
<a name="l00126"></a><a class="code" href="classCTree.html#a85d23b2c4b83c8c41de55fd3dacbc929">00126</a>     <a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">tvec</a>        <a class="code" href="classCTree.html#a85d23b2c4b83c8c41de55fd3dacbc929" title="the subtrees">fBranch</a>;            
<a name="l00127"></a>00127 
<a name="l00128"></a>00128     <a class="code" href="classCTree.html#a468bc99b4d0fcc746c98e56a2faa3624" title="construction is private, uses tree::make instead">CTree</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> hk, <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">tvec</a>&amp; br);                         
<a name="l00129"></a>00129 
<a name="l00130"></a>00130     <span class="keywordtype">bool</span>        <a class="code" href="classCTree.html#a91fbc2f14773afbdfb20c1ce59262464" title="used to check if an equivalent tree already exists">equiv</a>               (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">tvec</a>&amp; br) <span class="keyword">const</span>;  
<a name="l00131"></a>00131     <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCTree.html#aed5575466db4ca391077245aa036a458" title="compute the hash key of a tree according to its node and branches">calcTreeHash</a>        (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">tvec</a>&amp; br);        
<a name="l00132"></a>00132     <span class="keyword">static</span> <span class="keywordtype">int</span>  <a class="code" href="classCTree.html#ab6f456ea4f5400fb5b93807b281e6eb3" title="compute how open is a tree">calcTreeAperture</a>    (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">tvec</a>&amp; br);        
<a name="l00133"></a>00133 
<a name="l00134"></a>00134  <span class="keyword">public</span>:
<a name="l00135"></a>00135     <a class="code" href="classCTree.html#a03282df290b747bb7a400919ec366af5">~CTree</a> ();
<a name="l00136"></a>00136 
<a name="l00137"></a>00137     <span class="keyword">static</span> <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 class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">make</a> (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keywordtype">int</span> ar, <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> br[]);        
<a name="l00138"></a>00138     <span class="keyword">static</span> <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 class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">make</a>(<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <a class="code" href="tree_8hh.html#ad425127c677ce9f82f03e6dc57a87937">tvec</a>&amp; br);            
<a name="l00139"></a>00139 
<a name="l00140"></a>00140     <span class="comment">// Accessors</span>
<a name="l00141"></a><a class="code" href="classCTree.html#a8de786fec095c8304b9ffa7c1c316237">00141</a>     <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; <a class="code" href="classCTree.html#a8de786fec095c8304b9ffa7c1c316237" title="return the content of the tree">node</a>()<span class="keyword"> const        </span>{ <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a91ef5d8ea6566e34450e7a14a45d0b1c" title="the node content of the tree">fNode</a>;         }   
<a name="l00142"></a><a class="code" href="classCTree.html#a68f2be5e845407bc956a2893fe6f0d03">00142</a>     <span class="keywordtype">int</span>         <a class="code" href="classCTree.html#a68f2be5e845407bc956a2893fe6f0d03" title="return the number of branches (subtrees) of a tree">arity</a>()<span class="keyword"> const       </span>{ <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a85d23b2c4b83c8c41de55fd3dacbc929" title="the subtrees">fBranch</a>.size();}   
<a name="l00143"></a><a class="code" href="classCTree.html#a06c1513b23dc7b0d9da9c930c6dc43c5">00143</a>     <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 class="code" href="classCTree.html#a06c1513b23dc7b0d9da9c930c6dc43c5" title="return the ith branch (subtree) of a tree">branch</a>(<span class="keywordtype">int</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a85d23b2c4b83c8c41de55fd3dacbc929" title="the subtrees">fBranch</a>[i];    }   
<a name="l00144"></a><a class="code" href="classCTree.html#ac857fdcad70269113f3502eb1af7b4fb">00144</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>        <a class="code" href="classCTree.html#ac857fdcad70269113f3502eb1af7b4fb" title="return the hashkey of the tree">hashkey</a>()<span class="keyword"> const     </span>{ <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a89094f441d0df103119ef5b1483f66f4" title="the hashtable key">fHashKey</a>;      }   
<a name="l00145"></a><a class="code" href="classCTree.html#a3ce05a5474896a873ddbccd7caea2680">00145</a>     <span class="keywordtype">int</span>         <a class="code" href="classCTree.html#a3ce05a5474896a873ddbccd7caea2680" title="return how &amp;quot;open&amp;quot; is a tree in terms of free variables">aperture</a>()<span class="keyword"> const    </span>{ <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a711625a5c7ad5c643600ac0ef3fff9d3" title="how &amp;quot;open&amp;quot; is a tree (synthezised field)">fAperture</a>;     }   
<a name="l00146"></a><a class="code" href="classCTree.html#a43dfbeab91c992660762d3d6783baff7">00146</a>     <span class="keywordtype">void</span>        <a class="code" href="classCTree.html#a43dfbeab91c992660762d3d6783baff7" title="modify the aperture of a tree">setAperture</a>(<span class="keywordtype">int</span> a)  { <a class="code" href="classCTree.html#a711625a5c7ad5c643600ac0ef3fff9d3" title="how &amp;quot;open&amp;quot; is a tree (synthezised field)">fAperture</a>=a;          }   
<a name="l00147"></a>00147 
<a name="l00148"></a>00148 
<a name="l00149"></a>00149     <span class="comment">// Print a tree and the hash table (for debugging purposes)</span>
<a name="l00150"></a>00150     ostream&amp;    <a class="code" href="classCTree.html#a47b39b985a852b02b12c8dd2d790543e" title="print recursively the content of a tree on a stream">print</a> (ostream&amp; fout) <span class="keyword">const</span>;                    
<a name="l00151"></a>00151     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classCTree.html#a52be1b22c7c2c7eb71d22fb4b4bc6033" title="print the hash table content (for debug purpose)">control</a> ();                                     
<a name="l00152"></a>00152 
<a name="l00153"></a>00153     <span class="comment">// type information</span>
<a name="l00154"></a><a class="code" href="classCTree.html#ac8a19f4ef59fae1449e60dbd990eb90f">00154</a>     <span class="keywordtype">void</span>        <a class="code" href="classCTree.html#ac8a19f4ef59fae1449e60dbd990eb90f">setType</a>(<span class="keywordtype">void</span>* t)    { <a class="code" href="classCTree.html#adcb3bc208e0afc57732591da133dbc1c" title="the type of a tree">fType</a> = t; }
<a name="l00155"></a><a class="code" href="classCTree.html#adfb1030a444053685b84e45c76eabe6a">00155</a>     <span class="keywordtype">void</span>*       <a class="code" href="classCTree.html#adfb1030a444053685b84e45c76eabe6a">getType</a>()           { <span class="keywordflow">return</span> <a class="code" href="classCTree.html#adcb3bc208e0afc57732591da133dbc1c" title="the type of a tree">fType</a>; }
<a name="l00156"></a>00156     
<a name="l00157"></a>00157     <span class="comment">// Property list of a tree</span>
<a name="l00158"></a><a class="code" href="classCTree.html#ac628a2ad0d2a21de584e3bca291bd38c">00158</a>     <span class="keywordtype">void</span>        <a class="code" href="classCTree.html#ac628a2ad0d2a21de584e3bca291bd38c">setProperty</a>(<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> key, <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> value) { <a class="code" href="classCTree.html#afaa8b85a64115a64f26fea7c7c778c53" title="the properties list attached to the tree">fProperties</a>[key] = value; }
<a name="l00159"></a><a class="code" href="classCTree.html#af2869391b5fbcf5a34cc034533fb207d">00159</a>     <span class="keywordtype">void</span>        <a class="code" href="classCTree.html#af2869391b5fbcf5a34cc034533fb207d">clearProperty</a>(<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> key) { <a class="code" href="classCTree.html#afaa8b85a64115a64f26fea7c7c778c53" title="the properties list attached to the tree">fProperties</a>.erase(key); }
<a name="l00160"></a><a class="code" href="classCTree.html#a902b48b83db587f14dbd31999c0f715f">00160</a>     <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 class="code" href="classCTree.html#a902b48b83db587f14dbd31999c0f715f">getProperty</a>(<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> key) {
<a name="l00161"></a>00161         plist::iterator i = <a class="code" href="classCTree.html#afaa8b85a64115a64f26fea7c7c778c53" title="the properties list attached to the tree">fProperties</a>.find(key);
<a name="l00162"></a>00162         <span class="keywordflow">if</span> (i==<a class="code" href="classCTree.html#afaa8b85a64115a64f26fea7c7c778c53" title="the properties list attached to the tree">fProperties</a>.end()) {
<a name="l00163"></a>00163             <span class="keywordflow">return</span> 0;
<a name="l00164"></a>00164         } <span class="keywordflow">else</span> {
<a name="l00165"></a>00165             <span class="keywordflow">return</span> i-&gt;second;
<a name="l00166"></a>00166         }
<a name="l00167"></a>00167     }
<a name="l00168"></a>00168 };
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 <span class="comment">//---------------------------------API---------------------------------------</span>
<a name="l00171"></a>00171 
<a name="l00172"></a>00172 <span class="comment">// to build trees</span>
<a name="l00173"></a><a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">00173</a> <span class="keyword">inline</span> <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 class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a> (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n) { <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> br[1]; <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">CTree::make</a>(n, 0, br); }
<a name="l00174"></a><a class="code" href="tree_8hh.html#a7b42df3433bf903e48509e1dadba39c1">00174</a> <span class="keyword">inline</span> <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 class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a> (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <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>&amp; a) { <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> br[]= {a}; <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">CTree::make</a>(n, 1, br); }
<a name="l00175"></a><a class="code" href="tree_8hh.html#a3db1bf5dc3b9e088a3c921d04178373f">00175</a> <span class="keyword">inline</span> <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 class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a> (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <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>&amp; a, <span class="keyword">const</span> <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>&amp; b) { <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> br[]= {a,b}; <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">CTree::make</a>(n, 2, br); }
<a name="l00176"></a><a class="code" href="tree_8hh.html#a766dfc0c3b4fb6b64c37d045466f6658">00176</a> <span class="keyword">inline</span> <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 class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a> (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <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>&amp; a, <span class="keyword">const</span> <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>&amp; b, <span class="keyword">const</span> <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>&amp; c) { <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> br[]= {a,b,c}; <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">CTree::make</a>(n, 3, br); }
<a name="l00177"></a><a class="code" href="tree_8hh.html#a690fbe02dd51249747a91fd6c175e45e">00177</a> <span class="keyword">inline</span> <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 class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a> (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <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>&amp; a, <span class="keyword">const</span> <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>&amp; b, <span class="keyword">const</span> <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>&amp; c, <span class="keyword">const</span> <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>&amp; d) { <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> br[]= {a,b,c,d}; <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">CTree::make</a>(n, 4, br); }
<a name="l00178"></a>00178 
<a name="l00179"></a><a class="code" href="tree_8hh.html#a392459fb5d995744bddfc16ed2a4fc8e">00179</a> <span class="keyword">inline</span> <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 class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a> (<span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <span class="keyword">const</span> <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>&amp; a, <span class="keyword">const</span> <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>&amp; b, <span class="keyword">const</span> <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>&amp; c, <span class="keyword">const</span> <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>&amp; d, <span class="keyword">const</span> <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>&amp; e) { <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> br[]= {a,b,c,d,e}; <span class="keywordflow">return</span> <a class="code" href="classCTree.html#a3184c572cef05308f59e36ea2bdf537e" title="return a new tree or an existing equivalent one">CTree::make</a>(n, 5, br); }
<a name="l00180"></a>00180 
<a name="l00181"></a>00181 <span class="comment">// useful conversions</span>
<a name="l00182"></a>00182 <span class="keywordtype">int</span>         <a class="code" href="tree_8cpp.html#a523bce65e2a281fe678f2362496061cf" title="if t has a node of type int, return it otherwise error">tree2int</a> (<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="l00183"></a>00183 <span class="keywordtype">double</span>      <a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a> (<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="l00184"></a>00184 <span class="keywordtype">double</span>      <a class="code" href="tree_8cpp.html#ade36e0f4c45ca9bf2307f972715010c7" title="if t has a node of type float, return it otherwise error">tree2double</a> (<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="l00185"></a>00185 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a> (<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="l00186"></a>00186 <span class="keywordtype">void</span>*       <a class="code" href="tree_8cpp.html#ad1d692b2c0a86d485a3d096af07632e6" title="if t has a node of type ptr, return it otherwise error">tree2ptr</a> (<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="l00187"></a>00187 <span class="keywordtype">void</span>*       <a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(<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="l00188"></a>00188 
<a name="l00189"></a>00189 <span class="comment">// pattern matching</span>
<a name="l00190"></a>00190 <span class="keywordtype">bool</span> <a class="code" href="tree_8cpp.html#a06be972e0437c7c09e8a1274586fe176">isTree</a> (<span class="keyword">const</span> <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>&amp; t, <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n);
<a name="l00191"></a>00191 <span class="keywordtype">bool</span> <a class="code" href="tree_8cpp.html#a06be972e0437c7c09e8a1274586fe176">isTree</a> (<span class="keyword">const</span> <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>&amp; t, <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <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>&amp; a);
<a name="l00192"></a>00192 <span class="keywordtype">bool</span> <a class="code" href="tree_8cpp.html#a06be972e0437c7c09e8a1274586fe176">isTree</a> (<span class="keyword">const</span> <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>&amp; t, <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <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>&amp; a, <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>&amp; b);
<a name="l00193"></a>00193 <span class="keywordtype">bool</span> <a class="code" href="tree_8cpp.html#a06be972e0437c7c09e8a1274586fe176">isTree</a> (<span class="keyword">const</span> <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>&amp; t, <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <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>&amp; a, <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>&amp; b, <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>&amp; c);
<a name="l00194"></a>00194 <span class="keywordtype">bool</span> <a class="code" href="tree_8cpp.html#a06be972e0437c7c09e8a1274586fe176">isTree</a> (<span class="keyword">const</span> <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>&amp; t, <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <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>&amp; a, <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>&amp; b, <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>&amp; c, <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>&amp; d);
<a name="l00195"></a>00195 <span class="keywordtype">bool</span> <a class="code" href="tree_8cpp.html#a06be972e0437c7c09e8a1274586fe176">isTree</a> (<span class="keyword">const</span> <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>&amp; t, <span class="keyword">const</span> <a class="code" href="classNode.html" title="Class Node = (type x (int + double + Sym + void*)).">Node</a>&amp; n, <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>&amp; a, <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>&amp; b, <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>&amp; c, <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>&amp; d, <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>&amp; e);
<a name="l00196"></a>00196 
<a name="l00197"></a>00197 <span class="comment">//printing</span>
<a name="l00198"></a><a class="code" href="tree_8hh.html#a1781548293b54cd58253e731e130c15e">00198</a> <span class="keyword">inline</span> ostream&amp; <a class="code" href="ppbox_8hh.html#a23b1718100bac6cb41d43dd01f226eef">operator &lt;&lt; </a>(ostream&amp; s, <span class="keyword">const</span> <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>&amp; t) { <span class="keywordflow">return</span> t.<a class="code" href="classCTree.html#a47b39b985a852b02b12c8dd2d790543e" title="print recursively the content of a tree on a stream">print</a>(s); }
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 
<a name="l00201"></a>00201 <span class="comment">//-----------------------------------------------------------------------------</span>
<a name="l00202"></a>00202 <span class="comment">// recursive trees</span>
<a name="l00203"></a>00203 <span class="comment">//-----------------------------------------------------------------------------</span>
<a name="l00204"></a>00204 
<a name="l00205"></a>00205 <span class="comment">// creation a recursive trees</span>
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 <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 class="code" href="recursive-tree_8cpp.html#aa598f21268aa7198407d2eb6929d09ab" title="create a de Bruijn recursive tree">rec</a>(<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> body);                        
<a name="l00208"></a>00208 <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 class="code" href="recursive-tree_8cpp.html#aa598f21268aa7198407d2eb6929d09ab" title="create a de Bruijn recursive tree">rec</a>(<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> <span class="keywordtype">id</span>, <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> body);               
<a name="l00209"></a>00209 
<a name="l00210"></a>00210 <span class="keywordtype">bool</span> <a class="code" href="recursive-tree_8cpp.html#a4cb44c6e41e21da830e748dc35f16ba5" title="is t a de Bruijn recursive tree">isRec</a>(<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 class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a>&amp; body);             
<a name="l00211"></a>00211 <span class="keywordtype">bool</span> <a class="code" href="recursive-tree_8cpp.html#a4cb44c6e41e21da830e748dc35f16ba5" title="is t a de Bruijn recursive tree">isRec</a>(<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 class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a>&amp; <span class="keywordtype">id</span>, <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>&amp; body);   
<a name="l00212"></a>00212 
<a name="l00213"></a>00213 <span class="comment">// creation of recursive references</span>
<a name="l00214"></a>00214 
<a name="l00215"></a>00215 <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 class="code" href="recursive-tree_8cpp.html#ab93ecee07e77e314fe39e3199d06437a" title="create a de Bruijn recursive reference">ref</a>(<span class="keywordtype">int</span> level);                        
<a name="l00216"></a>00216 <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 class="code" href="recursive-tree_8cpp.html#ab93ecee07e77e314fe39e3199d06437a" title="create a de Bruijn recursive reference">ref</a>(<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> <span class="keywordtype">id</span>);                          
<a name="l00217"></a>00217 
<a name="l00218"></a>00218 <span class="keywordtype">bool</span> <a class="code" href="recursive-tree_8cpp.html#a3a07093d0e487cc733adab39f6a18e78" title="is t a de Bruijn recursive reference">isRef</a>(<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, <span class="keywordtype">int</span>&amp; level);             
<a name="l00219"></a>00219 <span class="keywordtype">bool</span> <a class="code" href="recursive-tree_8cpp.html#a3a07093d0e487cc733adab39f6a18e78" title="is t a de Bruijn recursive reference">isRef</a>(<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 class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a>&amp; <span class="keywordtype">id</span>);               
<a name="l00220"></a>00220 
<a name="l00221"></a>00221 
<a name="l00222"></a>00222 <span class="comment">// Open vs Closed regarding de Bruijn references</span>
<a name="l00223"></a>00223 
<a name="l00224"></a><a class="code" href="tree_8hh.html#af31b1f843981d67b717d68d6285d7da6">00224</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="tree_8hh.html#af31b1f843981d67b717d68d6285d7da6" title="t contains free de Bruijn references">isOpen</a>(<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)   { <span class="keywordflow">return</span> t-&gt;<a class="code" href="classCTree.html#a3ce05a5474896a873ddbccd7caea2680" title="return how &amp;quot;open&amp;quot; is a tree in terms of free variables">aperture</a>() &gt; 0; }  
<a name="l00225"></a><a class="code" href="tree_8hh.html#a447a569f359244de90fa72c2efdb8be5">00225</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="tree_8hh.html#a447a569f359244de90fa72c2efdb8be5" title="t dont contain free de Bruijn ref">isClosed</a>(<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) { <span class="keywordflow">return</span> t-&gt;<a class="code" href="classCTree.html#a3ce05a5474896a873ddbccd7caea2680" title="return how &amp;quot;open&amp;quot; is a tree in terms of free variables">aperture</a>() &lt;= 0;}  
<a name="l00226"></a>00226 
<a name="l00227"></a>00227 <span class="comment">// lift by 1 the free de Bruijn references</span>
<a name="l00228"></a>00228 
<a name="l00229"></a>00229 <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 class="code" href="recursive-tree_8cpp.html#abf6659f19a0e48b81af0b0fb39ede302">lift</a>(<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="l00230"></a>00230 
<a name="l00231"></a>00231 <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 class="code" href="recursive-tree_8cpp.html#ab896f65486e6d80d4440721f2f89ff96">deBruijn2Sym</a> (<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="l00232"></a>00232 <span class="keywordtype">void</span> <a class="code" href="recursive-tree_8cpp.html#ae6da444b930bc1b8eed51bd15108e5e2">updateAperture</a> (<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="l00233"></a>00233 
<a name="l00234"></a>00234 <span class="comment">//---------------------------------------------------------------------------</span>
<a name="l00235"></a>00235 
<a name="l00236"></a><a class="code" href="classTabber.html">00236</a> <span class="keyword">class </span><a class="code" href="classTabber.html">Tabber</a>
<a name="l00237"></a>00237 {
<a name="l00238"></a><a class="code" href="classTabber.html#ad7e8c7b8d6f9515ded8d6481200d61aa">00238</a>     <span class="keywordtype">int</span> <a class="code" href="classTabber.html#ad7e8c7b8d6f9515ded8d6481200d61aa">fIndent</a>;
<a name="l00239"></a>00239   <span class="keyword">public</span>:
<a name="l00240"></a><a class="code" href="classTabber.html#a81a73ba1e87faed18e9d9515dd2ffd0c">00240</a>     <a class="code" href="classTabber.html#a81a73ba1e87faed18e9d9515dd2ffd0c">Tabber</a>(<span class="keywordtype">int</span> n=0) : <a class="code" href="classTabber.html#ad7e8c7b8d6f9515ded8d6481200d61aa">fIndent</a>(n)    {}
<a name="l00241"></a><a class="code" href="classTabber.html#a77c25479567d0e61a0662b4c6d51fdfc">00241</a>     <a class="code" href="classTabber.html">Tabber</a>&amp; <a class="code" href="classTabber.html#a77c25479567d0e61a0662b4c6d51fdfc">operator++</a>()            { <a class="code" href="classTabber.html#ad7e8c7b8d6f9515ded8d6481200d61aa">fIndent</a>++; <span class="keywordflow">return</span> *<span class="keyword">this</span>;}
<a name="l00242"></a><a class="code" href="classTabber.html#ab9bb516d4e906b48042c1bf01f70a342">00242</a>     <a class="code" href="classTabber.html">Tabber</a>&amp; <a class="code" href="classTabber.html#ab9bb516d4e906b48042c1bf01f70a342">operator--</a>()            { assert(<a class="code" href="classTabber.html#ad7e8c7b8d6f9515ded8d6481200d61aa">fIndent</a> &gt; 0); <a class="code" href="classTabber.html#ad7e8c7b8d6f9515ded8d6481200d61aa">fIndent</a>--; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
<a name="l00243"></a>00243 
<a name="l00244"></a><a class="code" href="classTabber.html#a43ac045bf16aaa952134c9c1f66aa681">00244</a>     ostream&amp; <a class="code" href="classTabber.html#a43ac045bf16aaa952134c9c1f66aa681">print</a> (ostream&amp; fout)
<a name="l00245"></a>00245                         { <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="classTabber.html#ad7e8c7b8d6f9515ded8d6481200d61aa">fIndent</a>; i++) fout &lt;&lt; <span class="charliteral">&#39;\t&#39;</span>; <span class="keywordflow">return</span> fout; }
<a name="l00246"></a>00246 };
<a name="l00247"></a>00247 
<a name="l00248"></a>00248 <span class="comment">//printing</span>
<a name="l00249"></a><a class="code" href="tree_8hh.html#ab9c974fb35ace4ee17e328ce1b1a66c3">00249</a> <span class="keyword">inline</span> ostream&amp; <a class="code" href="ppbox_8hh.html#a23b1718100bac6cb41d43dd01f226eef">operator &lt;&lt; </a>(ostream&amp; s, <a class="code" href="classTabber.html">Tabber</a>&amp; t) { <span class="keywordflow">return</span> t.<a class="code" href="classTabber.html#a43ac045bf16aaa952134c9c1f66aa681">print</a>(s); }
<a name="l00250"></a>00250 
<a name="l00251"></a>00251 <span class="keyword">extern</span> <a class="code" href="classTabber.html">Tabber</a> <a class="code" href="tree_8cpp.html#a559d741ee88818bb48d7ea8caf7419c1">TABBER</a>;
<a name="l00252"></a>00252 
<a name="l00253"></a>00253 
<a name="l00254"></a>00254 <span class="preprocessor">#endif</span>
</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>