<!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: symbol.hh File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>symbol.hh File Reference</h1> <p>A library to create and manipulate symbols with a unique name. <a href="#_details">More...</a></p> <code>#include <string></code><br/> <code>#include <map></code><br/> <div class="dynheader"> Include dependency graph for symbol.hh:</div> <div class="dynsection"> </div> <div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dynsection"> </div> <p><a href="symbol_8hh_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Classes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classSymbol.html">Symbol</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Symbols are unique objects with a name stored in a hash table. <a href="classSymbol.html#_details">More...</a><br/></td></tr> <tr><td colspan="2"><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classSymbol.html">Symbol</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#aac141e9ff20c575ad4887682c055da9a">Sym</a></td></tr> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSymbol.html">Symbol</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#aaa87083235b70d1042e59ae25e0800d8">symbol</a> (const char *str)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns (and creates if new) the symbol of name <code>str</code>. <a href="#aaa87083235b70d1042e59ae25e0800d8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSymbol.html">Symbol</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#abfc1191889039b578e061d8c7780ec5f">symbol</a> (const string &str)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns (and creates if new) the symbol of name <code>str</code>. <a href="#abfc1191889039b578e061d8c7780ec5f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSymbol.html">Symbol</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#a377309446e0e86ae663cd6709e02889d">unique</a> (const char *str)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a new unique symbol of name strxxx. <a href="#a377309446e0e86ae663cd6709e02889d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310">name</a> (<a class="el" href="classSymbol.html">Symbol</a> *sym)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of a symbol. <a href="#a8243134fbbd9d924ebbb3f833922e310"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff">getUserData</a> (<a class="el" href="classSymbol.html">Symbol</a> *sym)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns user data. <a href="#a603fcb6c07eacf2688c2a8470637d0ff"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#a936471e3b0afa59ffec0a94f7d1b6570">setUserData</a> (<a class="el" href="classSymbol.html">Symbol</a> *sym, void *d)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set user data. <a href="#a936471e3b0afa59ffec0a94f7d1b6570"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="symbol_8hh.html#a40eefc5733d79133c3aaa825313a6486">operator<<</a> (ostream &s, const <a class="el" href="classSymbol.html">Symbol</a> &n)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A library to create and manipulate symbols with a unique name. </p> <p>A library of functions to create and manipulate symbols with a unique name.</p> <p><b>API:</b></p> <ul> <li>Sym q = symbol("abcd"); <em>returns the symbol of name "abcd"</em></li> <li>const char* s = name(q); <em>returns the name of symbol q</em></li> <li>Sym q = unique("TOTO"); <em>returns a new unique symbol of name "TOTOnnn"</em></li> </ul> <p><b>Properties:</b></p> <p>If p and q are two symbols then : p != q <=> name(p) != name(q) </p> <p>Definition in file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <hr/><h2>Typedef Documentation</h2> <a class="anchor" id="aac141e9ff20c575ad4887682c055da9a"></a><!-- doxytag: member="symbol.hh::Sym" ref="aac141e9ff20c575ad4887682c055da9a" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="classSymbol.html">Symbol</a>* <a class="el" href="classSymbol.html">Sym</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00106">106</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> </div> </div> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a603fcb6c07eacf2688c2a8470637d0ff"></a><!-- doxytag: member="symbol.hh::getUserData" ref="a603fcb6c07eacf2688c2a8470637d0ff" args="(Symbol *sym)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* getUserData </td> <td>(</td> <td class="paramtype"><a class="el" href="classSymbol.html">Symbol</a> * </td> <td class="paramname"> <em>sym</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns user data. </p> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00100">100</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <p>References <a class="el" href="symbol_8hh_source.html#l00066">Symbol::fData</a>.</p> <p>Referenced by <a class="el" href="xtended_8hh_source.html#l00027">xtended::box()</a>, <a class="el" href="boxcomplexity_8cpp_source.html#l00087">computeBoxComplexity()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00196">DocCompiler::generateCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00227">ScalarCompiler::generateCode()</a>, <a class="el" href="drawschema_8cpp_source.html#l00358">generateInsideSchema()</a>, <a class="el" href="doc__compile_8cpp_source.html#l01058">DocCompiler::generateXtended()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01007">ScalarCompiler::generateXtended()</a>, <a class="el" href="subsignals_8cpp_source.html#l00010">getSubSignals()</a>, <a class="el" href="tree_8cpp_source.html#l00386">getUserData()</a>, <a class="el" href="boxtype_8cpp_source.html#l00097">infereBoxType()</a>, <a class="el" href="sigorderrules_8cpp_source.html#l00084">infereSigOrder()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00654">infereXType()</a>, <a class="el" href="ppsig_8cpp_source.html#l00178">ppsig::print()</a>, <a class="el" href="ppbox_8cpp_source.html#l00113">boxpp::print()</a>, <a class="el" href="ppsig_8cpp_source.html#l00163">ppsig::printextended()</a>, <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>, <a class="el" href="eval_8cpp_source.html#l00309">realeval()</a>, and <a class="el" href="simplify_8cpp_source.html#l00080">simplification()</a>.</p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a8243134fbbd9d924ebbb3f833922e310"></a><!-- doxytag: member="symbol.hh::name" ref="a8243134fbbd9d924ebbb3f833922e310" args="(Symbol *sym)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* name </td> <td>(</td> <td class="paramtype"><a class="el" href="classSymbol.html">Symbol</a> * </td> <td class="paramname"> <em>sym</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the name of a symbol. </p> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00098">98</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <p>References <a class="el" href="symbol_8hh_source.html#l00063">Symbol::fName</a>.</p> <p>Referenced by <a class="el" href="boxcomplexity_8cpp_source.html#l00087">computeBoxComplexity()</a>, <a class="el" href="eval_8cpp_source.html#l01251">evalIdDef()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00196">DocCompiler::generateCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00227">ScalarCompiler::generateCode()</a>, <a class="el" href="drawschema_8cpp_source.html#l00358">generateInsideSchema()</a>, <a class="el" href="errormsg_8cpp_source.html#l00072">getDefFileProp()</a>, <a class="el" href="subsignals_8cpp_source.html#l00010">getSubSignals()</a>, <a class="el" href="sigorderrules_8cpp_source.html#l00084">infereSigOrder()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>, <a class="el" href="uitree_8cpp_source.html#l00072">isBefore()</a>, <a class="el" href="boxes_8cpp_source.html#l00058">isBoxIdent()</a>, <a class="el" href="doc_8cpp_source.html#l00168">isDocTxt()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00502">isVerySimpleFormula()</a>, <a class="el" href="privatise_8cpp_source.html#l00054">makePrivatisationKey()</a>, <a class="el" href="privatise_8cpp_source.html#l00061">makePrivatisationLabel()</a>, <a class="el" href="labels_8cpp_source.html#l00119">normalizeLabel()</a>, <a class="el" href="ppsig_8cpp_source.html#l00178">ppsig::print()</a>, <a class="el" href="ppbox_8cpp_source.html#l00113">boxpp::print()</a>, <a class="el" href="list_8cpp_source.html#l00154">print()</a>, <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>, <a class="el" href="eval_8cpp_source.html#l00150">real_a2sb()</a>, <a class="el" href="shlysis_8cpp_source.html#l00069">shprkey()</a>, <a class="el" href="list_8cpp_source.html#l00496">substkey()</a>, <a class="el" href="tree_8cpp_source.html#l00292">tree2str()</a>, <a class="el" href="signals_8cpp_source.html#l00412">verySimple()</a>, and <a class="el" href="sigvisitor_8cpp_source.html#l00017">sigvisitor::visit()</a>.</p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a40eefc5733d79133c3aaa825313a6486"></a><!-- doxytag: member="symbol.hh::operator<<" ref="a40eefc5733d79133c3aaa825313a6486" args="(ostream &s, const Symbol &n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ostream& operator<< </td> <td>(</td> <td class="paramtype">ostream & </td> <td class="paramname"> <em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classSymbol.html">Symbol</a> & </td> <td class="paramname"> <em>n</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00103">103</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <p>References <a class="el" href="symbol_8cpp_source.html#l00174">Symbol::print()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00103"></a>00103 { <span class="keywordflow">return</span> n.<a class="code" href="classSymbol.html#a80aa251523a4a1c24e9e9e679205f18e" title="print a symbol on a stream">print</a>(s); } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a936471e3b0afa59ffec0a94f7d1b6570"></a><!-- doxytag: member="symbol.hh::setUserData" ref="a936471e3b0afa59ffec0a94f7d1b6570" args="(Symbol *sym, void *d)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setUserData </td> <td>(</td> <td class="paramtype"><a class="el" href="classSymbol.html">Symbol</a> * </td> <td class="paramname"> <em>sym</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"> <em>d</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set user data. </p> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00101">101</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <p>References <a class="el" href="symbol_8hh_source.html#l00066">Symbol::fData</a>.</p> <p>Referenced by <a class="el" href="xtended_8hh_source.html#l00018">xtended::xtended()</a>, and <a class="el" href="xtended_8hh_source.html#l00022">xtended::~xtended()</a>.</p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="abfc1191889039b578e061d8c7780ec5f"></a><!-- doxytag: member="symbol.hh::symbol" ref="abfc1191889039b578e061d8c7780ec5f" args="(const string &str)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSymbol.html">Symbol</a>* symbol </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>str</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns (and creates if new) the symbol of name <code>str</code>. </p> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00096">96</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <p>References <a class="el" href="symbol_8cpp_source.html#l00046">Symbol::get()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="aaa87083235b70d1042e59ae25e0800d8"></a><!-- doxytag: member="symbol.hh::symbol" ref="aaa87083235b70d1042e59ae25e0800d8" args="(const char *str)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSymbol.html">Symbol</a>* symbol </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>str</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns (and creates if new) the symbol of name <code>str</code>. </p> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00095">95</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <p>References <a class="el" href="symbol_8cpp_source.html#l00046">Symbol::get()</a>.</p> <p>Referenced by <a class="el" href="boxes_8cpp_source.html#l00056">boxIdent()</a>, <a class="el" href="doc_8cpp_source.html#l00166">docTxt()</a>, and <a class="el" href="node_8hh_source.html#l00084">Node::Node()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a377309446e0e86ae663cd6709e02889d"></a><!-- doxytag: member="symbol.hh::unique" ref="a377309446e0e86ae663cd6709e02889d" args="(const char *str)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSymbol.html">Symbol</a>* unique </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>str</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns a new unique symbol of name strxxx. </p> <p>Definition at line <a class="el" href="symbol_8hh_source.html#l00097">97</a> of file <a class="el" href="symbol_8hh_source.html">symbol.hh</a>.</p> <p>References <a class="el" href="symbol_8cpp_source.html#l00102">Symbol::prefix()</a>.</p> <p>Referenced by <a class="el" href="recursive-tree_8cpp_source.html#l00235">calcDeBruijn2Sym()</a>, <a class="el" href="privatise_8cpp_source.html#l00054">makePrivatisationKey()</a>, <a class="el" href="privatise_8cpp_source.html#l00061">makePrivatisationLabel()</a>, <a class="el" href="occurences_8cpp_source.html#l00063">OccMarkup::mark()</a>, <a class="el" href="eval_8cpp_source.html#l01151">pushNewLayer()</a>, <a class="el" href="shlysis_8cpp_source.html#l00069">shprkey()</a>, <a class="el" href="occurrences_8cpp_source.html#l00067">Occurrences::specificKey()</a>, and <a class="el" href="list_8cpp_source.html#l00496">substkey()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:15 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>