<!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: names.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>names.hh File Reference</h1> <p>Interface for names management. <a href="#_details">More...</a></p> <code>#include "<a class="el" href="tlib_8hh_source.html">tlib.hh</a>"</code><br/> <code>#include "<a class="el" href="propagate_8hh_source.html">propagate.hh</a>"</code><br/> <code>#include <string></code><br/> <div class="dynheader"> Include dependency graph for names.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="names_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>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#afa6f89a686c004f84729e2bca7bf2053">getDefNameProperty</a> (<a class="el" href="classCTree.html">Tree</a> t, <a class="el" href="classCTree.html">Tree</a> &id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Indicates the identifier (if any) the expression was a definition of. <a href="#afa6f89a686c004f84729e2bca7bf2053"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#a4ae30710c357c86ad325c960b9236797">setDefNameProperty</a> (<a class="el" href="classCTree.html">Tree</a> t, <a class="el" href="classCTree.html">Tree</a> id)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#a2c87291a0048ceb1a5f9e3152f3c3b1b">setDefNameProperty</a> (<a class="el" href="classCTree.html">Tree</a> t, const string &name)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#adcca2bd45cbd0cfa4086e18c2ecd4902">setSigListNickName</a> (<a class="el" href="classCTree.html">Tree</a> lsig, const string &nickname)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">set the nickname property of a list of signals. <a href="#adcca2bd45cbd0cfa4086e18c2ecd4902"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#aa742c8abc11c119b7651bc78f62173f5">setSigNickname</a> (<a class="el" href="classCTree.html">Tree</a> t, const string &id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the nickname property of a signal. <a href="#aa742c8abc11c119b7651bc78f62173f5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#ab509e7915f29b2dfb19a44e5fc96153c">getSigNickname</a> (<a class="el" href="classCTree.html">Tree</a> t, <a class="el" href="classCTree.html">Tree</a> &id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the nickname property of a signal. <a href="#ab509e7915f29b2dfb19a44e5fc96153c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#adf6ba37a28536372e3be65128c79e615">searchIdDef</a> (<a class="el" href="classCTree.html">Tree</a> id, <a class="el" href="classCTree.html">Tree</a> &def, <a class="el" href="classCTree.html">Tree</a> lenv)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Search the environment for the definition of a symbol ID and return it. <a href="#adf6ba37a28536372e3be65128c79e615"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#ad057f174a67a40fd689fc379a5a21c2d">pushValueDef</a> (<a class="el" href="classCTree.html">Tree</a> id, <a class="el" href="classCTree.html">Tree</a> def, <a class="el" href="classCTree.html">Tree</a> lenv)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Push a new layer and add a single definition. <a href="#ad057f174a67a40fd689fc379a5a21c2d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="names_8hh.html#af924c3151bebd01af733bb0a1e39237c">simplifyPattern</a> (<a class="el" href="classCTree.html">Tree</a> pattern)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Simplify a block-diagram pattern by computing its numerical sub-expressions. <a href="#af924c3151bebd01af733bb0a1e39237c"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Interface for names management. </p> <p>Definition in file <a class="el" href="names_8hh_source.html">names.hh</a>.</p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="afa6f89a686c004f84729e2bca7bf2053"></a><!-- doxytag: member="names.hh::getDefNameProperty" ref="afa6f89a686c004f84729e2bca7bf2053" args="(Tree t, Tree &id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool getDefNameProperty </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> & </td> <td class="paramname"> <em>id</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Indicates the identifier (if any) the expression was a definition of. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>t</em> </td><td>the expression </td></tr> <tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>reference to the identifier </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if the expression t was a definition of id </dd></dl> <p>Definition at line <a class="el" href="names_8cpp_source.html#l00085">85</a> of file <a class="el" href="names_8cpp_source.html">names.cpp</a>.</p> <p>References <a class="el" href="list_8cpp_source.html#l00423">getProperty()</a>.</p> <p>Referenced by <a class="el" href="eval_8cpp_source.html#l00131">a2sb()</a>, <a class="el" href="eval_8cpp_source.html#l00974">applyList()</a>, <a class="el" href="eval_8cpp_source.html#l00279">eval()</a>, <a class="el" href="eval_8cpp_source.html#l01251">evalIdDef()</a>, <a class="el" href="drawschema_8cpp_source.html#l00318">generateDiagramSchema()</a>, <a class="el" href="drawschema_8cpp_source.html#l00466">generateInputSlotSchema()</a>, <a class="el" href="drawschema_8cpp_source.html#l00358">generateInsideSchema()</a>, <a class="el" href="drawschema_8cpp_source.html#l00478">generateOutputSlotSchema()</a>, <a class="el" href="doc_8cpp_source.html#l00963">legalFileName()</a>, <a class="el" href="doc_8cpp_source.html#l00575">mapGetEqName()</a>, <a class="el" href="eval_8cpp_source.html#l00150">real_a2sb()</a>, and <a class="el" href="drawschema_8cpp_source.html#l00216">writeSchemaFile()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00086"></a>00086 { <a name="l00087"></a>00087 <span class="comment">//cerr << "getDefNameProperty of : " << t << endl;</span> <a name="l00088"></a>00088 <span class="keywordflow">return</span> <a class="code" href="list_8cpp.html#a665745948013d012bb123e9577c094bd">getProperty</a>(t, <a class="code" href="names_8cpp.html#a075486203f56a7041baacd5322ab491c" title="Definition name property : a property to keep track of the definition name of an...">DEFNAMEPROPERTY</a>, <span class="keywordtype">id</span>); <a name="l00089"></a>00089 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ab509e7915f29b2dfb19a44e5fc96153c"></a><!-- doxytag: member="names.hh::getSigNickname" ref="ab509e7915f29b2dfb19a44e5fc96153c" args="(Tree t, Tree &id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool getSigNickname </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> & </td> <td class="paramname"> <em>id</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Get the nickname property of a signal. </p> <p>Definition at line <a class="el" href="names_8cpp_source.html#l00122">122</a> of file <a class="el" href="names_8cpp_source.html">names.cpp</a>.</p> <p>References <a class="el" href="list_8cpp_source.html#l00423">getProperty()</a>.</p> <p>Referenced by <a class="el" href="doc__compile_8cpp_source.html#l00105">DocCompiler::compileLateq()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00123"></a>00123 { <a name="l00124"></a>00124 <span class="keywordtype">bool</span> r = <a class="code" href="list_8cpp.html#a665745948013d012bb123e9577c094bd">getProperty</a>(t, <a class="code" href="names_8cpp.html#a615d8744635e73c24fa0c11996bc1056">NICKNAMEPROPERTY</a>, <span class="keywordtype">id</span>); <a name="l00125"></a>00125 <span class="keywordflow">return</span> r; <a name="l00126"></a>00126 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ad057f174a67a40fd689fc379a5a21c2d"></a><!-- doxytag: member="names.hh::pushValueDef" ref="ad057f174a67a40fd689fc379a5a21c2d" args="(Tree id, Tree def, Tree lenv)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> pushValueDef </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>id</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>def</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>lenv</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Push a new layer and add a single definition. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>the symbol id to be defined </td></tr> <tr><td valign="top"></td><td valign="top"><em>def</em> </td><td>the definition to be binded to the symbol id </td></tr> <tr><td valign="top"></td><td valign="top"><em>lenv</em> </td><td>the environment where to push the layer and add the definition </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the new environment </dd></dl> <p>Definition at line <a class="el" href="eval_8cpp_source.html#l01189">1189</a> of file <a class="el" href="eval_8cpp_source.html">eval.cpp</a>.</p> <p>References <a class="el" href="eval_8cpp_source.html#l01164">addLayerDef()</a>, and <a class="el" href="eval_8cpp_source.html#l01151">pushNewLayer()</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00660">apply_pattern_matcher()</a>, <a class="el" href="eval_8cpp_source.html#l00974">applyList()</a>, <a class="el" href="eval_8cpp_source.html#l00816">iteratePar()</a>, <a class="el" href="eval_8cpp_source.html#l00898">iterateProd()</a>, <a class="el" href="eval_8cpp_source.html#l00842">iterateSeq()</a>, <a class="el" href="eval_8cpp_source.html#l00870">iterateSum()</a>, and <a class="el" href="eval_8cpp_source.html#l00150">real_a2sb()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01190"></a>01190 { <a name="l01191"></a>01191 <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> lenv2 = <a class="code" href="eval_8cpp.html#a4c12b1741c548fc686dca046095fbc6f" title="Push a new (unique) empty layer (where multiple definitions can be stored) on top...">pushNewLayer</a>(lenv); <a name="l01192"></a>01192 <a class="code" href="eval_8cpp.html#a7f5f4731ffc9c2c137ae52c11df0ab94" title="Add a definition (as a property) to the current top level layer.">addLayerDef</a>(<span class="keywordtype">id</span>, def, lenv2); <a name="l01193"></a>01193 <span class="keywordflow">return</span> lenv2; <a name="l01194"></a>01194 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="adf6ba37a28536372e3be65128c79e615"></a><!-- doxytag: member="names.hh::searchIdDef" ref="adf6ba37a28536372e3be65128c79e615" args="(Tree id, Tree &def, Tree lenv)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool searchIdDef </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>id</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> & </td> <td class="paramname"> <em>def</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>lenv</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Search the environment for the definition of a symbol ID and return it. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>the symbol ID to search </td></tr> <tr><td valign="top"></td><td valign="top"><em>def</em> </td><td>where to store the definition if any </td></tr> <tr><td valign="top"></td><td valign="top"><em>lenv</em> </td><td>the environment </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if a definition was found </dd></dl> <p>Definition at line <a class="el" href="eval_8cpp_source.html#l01229">1229</a> of file <a class="el" href="eval_8cpp_source.html">eval.cpp</a>.</p> <p>References <a class="el" href="tree_8hh_source.html#l00143">CTree::branch()</a>, <a class="el" href="list_8cpp_source.html#l00423">getProperty()</a>, and <a class="el" href="list_8hh_source.html#l00137">isNil()</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00660">apply_pattern_matcher()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01230"></a>01230 { <a name="l01231"></a>01231 <span class="comment">// search the environment until a definition is found</span> <a name="l01232"></a>01232 <span class="comment">// or nil (the empty environment) is reached</span> <a name="l01233"></a>01233 <span class="keywordflow">while</span> (!<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(lenv) && !<a class="code" href="list_8cpp.html#a665745948013d012bb123e9577c094bd">getProperty</a>(lenv, <span class="keywordtype">id</span>, def)) { <a name="l01234"></a>01234 lenv = lenv-><a class="code" href="classCTree.html#a06c1513b23dc7b0d9da9c930c6dc43c5" title="return the ith branch (subtree) of a tree">branch</a>(0); <a name="l01235"></a>01235 } <a name="l01236"></a>01236 <span class="keywordflow">return</span> !<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(lenv); <a name="l01237"></a>01237 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a2c87291a0048ceb1a5f9e3152f3c3b1b"></a><!-- doxytag: member="names.hh::setDefNameProperty" ref="a2c87291a0048ceb1a5f9e3152f3c3b1b" args="(Tree t, const string &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setDefNameProperty </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>name</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="names_8cpp_source.html#l00060">60</a> of file <a class="el" href="names_8cpp_source.html">names.cpp</a>.</p> <p>References <a class="el" href="main_8cpp_source.html#l00120">gMaxNameSize</a>, <a class="el" href="list_8cpp_source.html#l00418">setProperty()</a>, and <a class="el" href="tree_8hh_source.html#l00173">tree()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00061"></a>00061 { <a name="l00062"></a>00062 <span class="comment">//cerr << "setDefNameProperty : " << name << " FOR " << t << "#" << boxpp(t) << endl;</span> <a name="l00063"></a>00063 <span class="keywordtype">int</span> n = <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>.size(); <a name="l00064"></a>00064 <span class="keywordtype">int</span> m = (<a class="code" href="eval_8cpp.html#a5cc4e35ec800bd5a558fb4aeb93a592c">gMaxNameSize</a>>1023) ? 1023 : <a class="code" href="eval_8cpp.html#a5cc4e35ec800bd5a558fb4aeb93a592c">gMaxNameSize</a>; <a name="l00065"></a>00065 <span class="keywordflow">if</span> (n > m) { <a name="l00066"></a>00066 <span class="comment">// the name is too long we reduce it to 2/3 of maxsize</span> <a name="l00067"></a>00067 <span class="keywordtype">char</span> buf[1024]; <a name="l00068"></a>00068 <span class="keywordtype">int</span> i = 0; <a name="l00069"></a>00069 <span class="comment">// copy first third</span> <a name="l00070"></a>00070 <span class="keywordflow">for</span> (; i < m/3; i++) { buf[i] = <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>[i]; } <a name="l00071"></a>00071 <span class="comment">// add ...</span> <a name="l00072"></a>00072 buf[i++] = <span class="charliteral">'.'</span>; <a name="l00073"></a>00073 buf[i++] = <span class="charliteral">'.'</span>; <a name="l00074"></a>00074 buf[i++] = <span class="charliteral">'.'</span>; <a name="l00075"></a>00075 <span class="comment">// copy last third</span> <a name="l00076"></a>00076 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> c = n-m/3; c<n; c++, i++) { buf[i] = <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>[c]; } <a name="l00077"></a>00077 buf[i] = 0; <a name="l00078"></a>00078 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(t, <a class="code" href="names_8cpp.html#a075486203f56a7041baacd5322ab491c" title="Definition name property : a property to keep track of the definition name of an...">DEFNAMEPROPERTY</a>, <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(buf)); <a name="l00079"></a>00079 } <span class="keywordflow">else</span> { <a name="l00080"></a>00080 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(t, <a class="code" href="names_8cpp.html#a075486203f56a7041baacd5322ab491c" title="Definition name property : a property to keep track of the definition name of an...">DEFNAMEPROPERTY</a>, <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(<a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>.c_str())); <a name="l00081"></a>00081 } <a name="l00082"></a>00082 <a name="l00083"></a>00083 } </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="a4ae30710c357c86ad325c960b9236797"></a><!-- doxytag: member="names.hh::setDefNameProperty" ref="a4ae30710c357c86ad325c960b9236797" args="(Tree t, Tree id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setDefNameProperty </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>id</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="names_8cpp_source.html#l00054">54</a> of file <a class="el" href="names_8cpp_source.html">names.cpp</a>.</p> <p>References <a class="el" href="list_8cpp_source.html#l00418">setProperty()</a>.</p> <p>Referenced by <a class="el" href="eval_8cpp_source.html#l00131">a2sb()</a>, <a class="el" href="eval_8cpp_source.html#l00974">applyList()</a>, <a class="el" href="eval_8cpp_source.html#l00279">eval()</a>, <a class="el" href="eval_8cpp_source.html#l01204">pushMultiClosureDefs()</a>, <a class="el" href="eval_8cpp_source.html#l00150">real_a2sb()</a>, and <a class="el" href="eval_8cpp_source.html#l00309">realeval()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00055"></a>00055 { <a name="l00056"></a>00056 <span class="comment">//cerr << "setDefNameProperty : " << *id << " FOR " << t << "#" << boxpp(t) << endl;</span> <a name="l00057"></a>00057 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(t, <a class="code" href="names_8cpp.html#a075486203f56a7041baacd5322ab491c" title="Definition name property : a property to keep track of the definition name of an...">DEFNAMEPROPERTY</a>, <span class="keywordtype">id</span>); <a name="l00058"></a>00058 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="adcca2bd45cbd0cfa4086e18c2ecd4902"></a><!-- doxytag: member="names.hh::setSigListNickName" ref="adcca2bd45cbd0cfa4086e18c2ecd4902" args="(Tree lsig, const string &nickname)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setSigListNickName </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>lsig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>nickname</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>set the nickname property of a list of signals. </p> <p>If the list contains more than one signal, adds an index to the nickname </p> <p>Definition at line <a class="el" href="names_8cpp_source.html#l00134">134</a> of file <a class="el" href="names_8cpp_source.html">names.cpp</a>.</p> <p>References <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8hh_source.html#l00138">isList()</a>, <a class="el" href="list_8hh_source.html#l00137">isNil()</a>, <a class="el" href="names_8cpp_source.html#l00108">setSigNickname()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, and <a class="el" href="list_8hh_source.html#l00134">tl()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00135"></a>00135 { <a name="l00136"></a>00136 assert(<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(lsig)); <a name="l00137"></a>00137 <a name="l00138"></a>00138 <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(lsig))) { <a name="l00139"></a>00139 <a class="code" href="names_8cpp.html#aa742c8abc11c119b7651bc78f62173f5" title="Set the nickname property of a signal.">setSigNickname</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(lsig), nickname); <a name="l00140"></a>00140 } <span class="keywordflow">else</span> { <a name="l00141"></a>00141 <span class="keywordtype">int</span> i=0; <a name="l00142"></a>00142 <span class="keywordflow">while</span> (!<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(lsig)) { <a name="l00143"></a>00143 <a class="code" href="names_8cpp.html#aa742c8abc11c119b7651bc78f62173f5" title="Set the nickname property of a signal.">setSigNickname</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(lsig), <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0_$1"</span>, nickname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(++i))); <a name="l00144"></a>00144 lsig = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(lsig); <a name="l00145"></a>00145 } <a name="l00146"></a>00146 } <a name="l00147"></a>00147 } </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="aa742c8abc11c119b7651bc78f62173f5"></a><!-- doxytag: member="names.hh::setSigNickname" ref="aa742c8abc11c119b7651bc78f62173f5" args="(Tree t, const string &id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setSigNickname </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>id</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the nickname property of a signal. </p> <p>Definition at line <a class="el" href="names_8cpp_source.html#l00108">108</a> of file <a class="el" href="names_8cpp_source.html">names.cpp</a>.</p> <p>References <a class="el" href="signals_8cpp_source.html#l00062">isSigFixDelay()</a>, <a class="el" href="signals_8hh_source.html#l00185">isZero()</a>, <a class="el" href="list_8cpp_source.html#l00418">setProperty()</a>, and <a class="el" href="tree_8hh_source.html#l00173">tree()</a>.</p> <p>Referenced by <a class="el" href="names_8cpp_source.html#l00134">setSigListNickName()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00109"></a>00109 { <a name="l00110"></a>00110 <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> s,d; <a name="l00111"></a>00111 <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#af55cdefee258834b3b8f6c070d4970c9">isSigFixDelay</a>(t,s,d) && <a class="code" href="signals_8hh.html#a73fa3ec5ebd4e47dc0fde2d24cc08c56">isZero</a>(d)) { <a name="l00112"></a>00112 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(s, <a class="code" href="names_8cpp.html#a615d8744635e73c24fa0c11996bc1056">NICKNAMEPROPERTY</a>, <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(<span class="keywordtype">id</span>)); <a name="l00113"></a>00113 } <span class="keywordflow">else</span> { <a name="l00114"></a>00114 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(t, <a class="code" href="names_8cpp.html#a615d8744635e73c24fa0c11996bc1056">NICKNAMEPROPERTY</a>, <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(<span class="keywordtype">id</span>)); <a name="l00115"></a>00115 } <a name="l00116"></a>00116 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="af924c3151bebd01af733bb0a1e39237c"></a><!-- doxytag: member="names.hh::simplifyPattern" ref="af924c3151bebd01af733bb0a1e39237c" args="(Tree pattern)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> simplifyPattern </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>value</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Simplify a block-diagram pattern by computing its numerical sub-expressions. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pattern</em> </td><td>an evaluated block-diagram </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a simplified pattern </dd></dl> <p>Definition at line <a class="el" href="eval_8cpp_source.html#l00605">605</a> of file <a class="el" href="eval_8cpp_source.html">eval.cpp</a>.</p> <p>References <a class="el" href="eval_8cpp_source.html#l00563">getNumericProperty()</a>, <a class="el" href="eval_8cpp_source.html#l00618">isBoxNumeric()</a>, and <a class="el" href="eval_8cpp_source.html#l00558">setNumericProperty()</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00593">apply_pattern_matcher_internal()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00606"></a>00606 { <a name="l00607"></a>00607 <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="classnum.html">num</a>; <a name="l00608"></a>00608 <span class="keywordflow">if</span> (!<a class="code" href="eval_8cpp.html#ac91fbe8e83a3c6b44c1e699521f8d960">getNumericProperty</a>(value,num)) { <a name="l00609"></a>00609 <span class="keywordflow">if</span> (!<a class="code" href="eval_8cpp.html#a0f9b3d2672c752d8d3e87904f22e1ebd">isBoxNumeric</a>(value,num)) { <a name="l00610"></a>00610 num = value; <a name="l00611"></a>00611 } <a name="l00612"></a>00612 <a class="code" href="eval_8cpp.html#a5f7473c40d765c93ecad984cb9338334">setNumericProperty</a>(value,num); <a name="l00613"></a>00613 } <a name="l00614"></a>00614 <span class="keywordflow">return</span> num; <a name="l00615"></a>00615 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:08 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>