<!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: node.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 Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>node.cpp</h1><a href="node_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<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>"</span> <a name="l00002"></a>00002 <a name="l00003"></a><a class="code" href="classNode.html#a76c86ebf8e6339130343e77e358b5ffd">00003</a> ostream& <a class="code" href="classNode.html#a76c86ebf8e6339130343e77e358b5ffd" title="print a node on a stream">Node::print</a> (ostream& fout) <span class="keyword">const</span> <a name="l00004"></a>00004 { <a name="l00005"></a>00005 <span class="keywordflow">switch</span> (fType) { <a name="l00006"></a>00006 <span class="keywordflow">case</span> <a class="code" href="node_8hh.html#ab04a0655cd1e3bcac5e8f48c18df1a57ad9d8bec340dcdc21f11245be75a56543">kIntNode</a> : <span class="keywordflow">return</span> fout << fData.i; <a name="l00007"></a>00007 <span class="keywordflow">case</span> <a class="code" href="node_8hh.html#ab04a0655cd1e3bcac5e8f48c18df1a57ae5a0184feec487df979dbf13befd979a">kDoubleNode</a> : <span class="keywordflow">return</span> fout << fData.f; <a name="l00008"></a>00008 <span class="keywordflow">case</span> <a class="code" href="node_8hh.html#ab04a0655cd1e3bcac5e8f48c18df1a57abf709fea7cdbffa24d8ef306118eb1ff">kSymNode</a> : <span class="keywordflow">return</span> fout << *(fData.s); <a name="l00009"></a>00009 <span class="keywordflow">case</span> <a class="code" href="node_8hh.html#ab04a0655cd1e3bcac5e8f48c18df1a57a98d57c7fc83e7b03526f7d985a47be29">kPointerNode</a> : <span class="keywordflow">return</span> fout << <span class="stringliteral">"ptr:"</span> << fData.p; <a name="l00010"></a>00010 <span class="keywordflow">default</span> : <span class="keywordflow">return</span> fout << <span class="stringliteral">"badnode"</span>; <a name="l00011"></a>00011 } <a name="l00012"></a>00012 <a name="l00013"></a>00013 <span class="comment">// return fout;</span> <a name="l00014"></a>00014 } <a name="l00015"></a>00015 </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 <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>