<!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: lateq.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 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>lateq.hh</h1><a href="lateq_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 <a name="l00024"></a>00024 <span class="preprocessor">#ifndef _LATEQ_H</span> <a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define _LATEQ_H</span> <a name="l00026"></a>00026 <span class="preprocessor"></span> <a name="l00027"></a>00027 <span class="comment">/**********************************************************************</span> <a name="l00028"></a>00028 <span class="comment"> - lateq.hh : the Lateq class definition (FAUST project) -</span> <a name="l00029"></a>00029 <span class="comment"> - for automatic generation of documentation -</span> <a name="l00030"></a>00030 <span class="comment"> - "lateq" stands for "LaTeX equations" -</span> <a name="l00031"></a>00031 <span class="comment"> - Several containers store LaTeX formulas by type of signals -</span> <a name="l00032"></a>00032 <span class="comment"> - Formulas usually are signal definitions, </span> <a name="l00033"></a>00033 <span class="comment"> except for input signals (only names). -</span> <a name="l00034"></a>00034 <span class="comment"></span> <a name="l00035"></a>00035 <span class="comment"></span> <a name="l00036"></a>00036 <span class="comment"> Historique :</span> <a name="l00037"></a>00037 <span class="comment"> -----------</span> <a name="l00038"></a>00038 <span class="comment"> 17-10-2001 : (klass.hh) implementation initiale (yo)</span> <a name="l00039"></a>00039 <span class="comment"> 18-10-2001 : (klass.hh) Ajout de getFreshID (yo)</span> <a name="l00040"></a>00040 <span class="comment"> 02-11-2001 : (klass.hh) Ajout de sous classes (yo)</span> <a name="l00041"></a>00041 <span class="comment"> 16-08-2009 : (lateq.hh) Création de lateq depuis klass.hh (kb)</span> <a name="l00042"></a>00042 <span class="comment"> 08-09-2009 : (lateq.hh) Grand nettoyage par le vide (yo & kb)</span> <a name="l00043"></a>00043 <span class="comment"> 23-09-2009 : (lateq.hh) Poursuite du nettoyage (kb)</span> <a name="l00044"></a>00044 <span class="comment"> 2009-11-23 : (lateq.hh) End of cleaning (kb)</span> <a name="l00045"></a>00045 <span class="comment"></span> <a name="l00046"></a>00046 <span class="comment">***********************************************************************/</span> <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="keyword">using namespace </span>std; <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="preprocessor">#include <string></span> <a name="l00051"></a>00051 <span class="preprocessor">#include <list></span> <a name="l00052"></a>00052 <span class="preprocessor">#include <map></span> <a name="l00053"></a>00053 <a name="l00054"></a>00054 <a name="l00055"></a><a class="code" href="classLateq.html">00055</a> <span class="keyword">class </span><a class="code" href="classLateq.html">Lateq</a> { <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="keyword">public</span>: <a name="l00058"></a>00058 <a name="l00059"></a><a class="code" href="classLateq.html#a24770240797dfdd66218fda4fbf00dcc">00059</a> <a class="code" href="classLateq.html#a24770240797dfdd66218fda4fbf00dcc">Lateq</a> (<span class="keyword">const</span> <span class="keywordtype">int</span>& numInputs, <span class="keyword">const</span> <span class="keywordtype">int</span>& numOutputs) <a name="l00060"></a>00060 : <a class="code" href="classLateq.html#a424a0c0c4563ff46ceef89fd987ffb8e">fNumInputs</a>(numInputs), <a class="code" href="classLateq.html#a55d00673a5448e1c89247d75cbe1b02a">fNumOutputs</a>(numOutputs) <a name="l00061"></a>00061 {} <a name="l00062"></a>00062 <a name="l00063"></a><a class="code" href="classLateq.html#a66310713be8ce775a6a010ecfee32238">00063</a> <a class="code" href="classLateq.html#a66310713be8ce775a6a010ecfee32238">~Lateq</a>() {} <a name="l00064"></a>00064 <a name="l00066"></a><a class="code" href="classLateq.html#a56c36f6cb86e65b9b9f5df15b4413200">00066</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a56c36f6cb86e65b9b9f5df15b4413200" title="Add a line of a latex equation code corresponding to a signal.">addInputSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#a7fec96f96bcfb0c07aa02e6916afdd56" title="LaTeX formulas to print.">fInputSigsFormulas</a>.push_back(str); } <a name="l00067"></a><a class="code" href="classLateq.html#a0885ac6f0ab272c5f09a4c8408fa0ef8">00067</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a0885ac6f0ab272c5f09a4c8408fa0ef8">addConstSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#aace142bc4784a010d8a1fa2ac6eb3b02">fConstSigsFormulas</a>.push_back(str); } <a name="l00068"></a><a class="code" href="classLateq.html#ac1fccab040b9e510b0c68ed391391a54">00068</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#ac1fccab040b9e510b0c68ed391391a54">addParamSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#a426b8fe1f70dfa7c771143a7d2a5afdd">fParamSigsFormulas</a>.push_back(str); } <a name="l00069"></a><a class="code" href="classLateq.html#a646d8b69aea5c2cdd4ac39596b9bac95">00069</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a646d8b69aea5c2cdd4ac39596b9bac95">addStoreSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#a158b8a1386e0a86e4527bfc110b45c52">fStoreSigsFormulas</a>.push_back(str); } <a name="l00070"></a><a class="code" href="classLateq.html#a1b9b98b6a1d73f5dbcfac4fca983a486">00070</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a1b9b98b6a1d73f5dbcfac4fca983a486">addRecurSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#acba268d84567e8d80a068086d0392003">fRecurSigsFormulas</a>.push_back(str); } <a name="l00071"></a><a class="code" href="classLateq.html#a21e52d1c6f035f12e820b9a52d536953">00071</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a21e52d1c6f035f12e820b9a52d536953">addRDTblSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#a37e008cd7d9b0548f2ab2e4f98047ef4">fRDTblSigsFormulas</a>.push_back(str); } <a name="l00072"></a><a class="code" href="classLateq.html#ab917fc89a96352815fcbf6a5c0cf6cbd">00072</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#ab917fc89a96352815fcbf6a5c0cf6cbd">addRWTblSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#a90e69f7b838bb77aa47ae67516e8091a">fRWTblSigsFormulas</a>.push_back(str); } <a name="l00073"></a><a class="code" href="classLateq.html#ade2f449b01d7f5d2622c7acaf9a2e4a0">00073</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#ade2f449b01d7f5d2622c7acaf9a2e4a0">addSelectSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#a1309348a3eb561f4afd5b89d4a411987">fSelectSigsFormulas</a>.push_back(str); } <a name="l00074"></a><a class="code" href="classLateq.html#a4504e1f63220750011909803f0917821">00074</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a4504e1f63220750011909803f0917821">addPrefixSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#a31eb174b9dbe7519eb58858d12f2203b">fPrefixSigsFormulas</a>.push_back(str); } <a name="l00075"></a><a class="code" href="classLateq.html#a6041017137f3f59bea06fcd8f38c4ea3">00075</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a6041017137f3f59bea06fcd8f38c4ea3">addOutputSigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#ab3ec0b73652726ee43989d0810981a74">fOutputSigsFormulas</a>.push_back(str); } <a name="l00076"></a><a class="code" href="classLateq.html#a43085fcd606c1a3338a9f1170656f825">00076</a> <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a43085fcd606c1a3338a9f1170656f825">addUISigFormula</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& path, <span class="keyword">const</span> <span class="keywordtype">string</span>& str) { <a class="code" href="classLateq.html#af9be9a225615bda300ddb73c7d095ecc">fUISigsFormulas</a>.insert(make_pair(path, str)); }; <a name="l00077"></a>00077 <a name="l00079"></a>00079 <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a21dbc72f648ae58202a45996f5d5527e" title="Top-level method to print a whole set of compiled LaTeX formulas.">println</a>(ostream& docout); <a name="l00080"></a>00080 <a name="l00081"></a><a class="code" href="classLateq.html#a6646343bd17ce1e3a8a797ba209faeaa">00081</a> <span class="keywordtype">int</span> <a class="code" href="classLateq.html#a6646343bd17ce1e3a8a797ba209faeaa">inputs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classLateq.html#a424a0c0c4563ff46ceef89fd987ffb8e">fNumInputs</a>; } <a name="l00082"></a><a class="code" href="classLateq.html#a6af3b05efdc8a9df5bd56a2bdef15557">00082</a> <span class="keywordtype">int</span> <a class="code" href="classLateq.html#a6af3b05efdc8a9df5bd56a2bdef15557">outputs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classLateq.html#a55d00673a5448e1c89247d75cbe1b02a">fNumOutputs</a>; } <a name="l00083"></a>00083 <a name="l00084"></a>00084 <a name="l00085"></a>00085 <span class="keyword">private</span>: <a name="l00086"></a>00086 <a name="l00087"></a><a class="code" href="classLateq.html#a424a0c0c4563ff46ceef89fd987ffb8e">00087</a> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classLateq.html#a424a0c0c4563ff46ceef89fd987ffb8e">fNumInputs</a>; <a name="l00088"></a><a class="code" href="classLateq.html#a55d00673a5448e1c89247d75cbe1b02a">00088</a> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classLateq.html#a55d00673a5448e1c89247d75cbe1b02a">fNumOutputs</a>; <a name="l00089"></a>00089 <a name="l00091"></a><a class="code" href="classLateq.html#a7fec96f96bcfb0c07aa02e6916afdd56">00091</a> list<string> <a class="code" href="classLateq.html#a7fec96f96bcfb0c07aa02e6916afdd56" title="LaTeX formulas to print.">fInputSigsFormulas</a>; <a name="l00092"></a><a class="code" href="classLateq.html#aace142bc4784a010d8a1fa2ac6eb3b02">00092</a> list<string> <a class="code" href="classLateq.html#aace142bc4784a010d8a1fa2ac6eb3b02">fConstSigsFormulas</a>; <a name="l00093"></a><a class="code" href="classLateq.html#a426b8fe1f70dfa7c771143a7d2a5afdd">00093</a> list<string> <a class="code" href="classLateq.html#a426b8fe1f70dfa7c771143a7d2a5afdd">fParamSigsFormulas</a>; <a name="l00094"></a><a class="code" href="classLateq.html#a158b8a1386e0a86e4527bfc110b45c52">00094</a> list<string> <a class="code" href="classLateq.html#a158b8a1386e0a86e4527bfc110b45c52">fStoreSigsFormulas</a>; <a name="l00095"></a><a class="code" href="classLateq.html#acba268d84567e8d80a068086d0392003">00095</a> list<string> <a class="code" href="classLateq.html#acba268d84567e8d80a068086d0392003">fRecurSigsFormulas</a>; <a name="l00096"></a><a class="code" href="classLateq.html#a37e008cd7d9b0548f2ab2e4f98047ef4">00096</a> list<string> <a class="code" href="classLateq.html#a37e008cd7d9b0548f2ab2e4f98047ef4">fRDTblSigsFormulas</a>; <a name="l00097"></a><a class="code" href="classLateq.html#a90e69f7b838bb77aa47ae67516e8091a">00097</a> list<string> <a class="code" href="classLateq.html#a90e69f7b838bb77aa47ae67516e8091a">fRWTblSigsFormulas</a>; <a name="l00098"></a><a class="code" href="classLateq.html#a1309348a3eb561f4afd5b89d4a411987">00098</a> list<string> <a class="code" href="classLateq.html#a1309348a3eb561f4afd5b89d4a411987">fSelectSigsFormulas</a>; <a name="l00099"></a><a class="code" href="classLateq.html#a31eb174b9dbe7519eb58858d12f2203b">00099</a> list<string> <a class="code" href="classLateq.html#a31eb174b9dbe7519eb58858d12f2203b">fPrefixSigsFormulas</a>; <a name="l00100"></a><a class="code" href="classLateq.html#ab3ec0b73652726ee43989d0810981a74">00100</a> list<string> <a class="code" href="classLateq.html#ab3ec0b73652726ee43989d0810981a74">fOutputSigsFormulas</a>; <a name="l00101"></a><a class="code" href="classLateq.html#af9be9a225615bda300ddb73c7d095ecc">00101</a> multimap<string,string> <a class="code" href="classLateq.html#af9be9a225615bda300ddb73c7d095ecc">fUISigsFormulas</a>; <a name="l00102"></a>00102 <a name="l00103"></a>00103 <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a4ed18a214c4e3319c735224519123607" title="Print a sorted list of input signals names (&quot;x_i(t)&quot;), on a single line...">printOneLine</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& section, list<string>& field, ostream& docout); <a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a6e090d687c50122959ff56d59bde85d1" title="Print formulas for user interface signals.">printHierarchy</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& section, multimap<string,string>& field, ostream& docout); <a name="l00105"></a>00105 <span class="keywordtype">void</span> <a class="code" href="classLateq.html#ad897c37e3c2b5d5a277b9cd4ceecfe7c" title="Print a dgroup environment to auto-break long formulas.">printDGroup</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& section, list<string>& field, ostream& docout); <a name="l00106"></a>00106 <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a1d68c0e7999afc1b1b28ea9537f4bc8c" title="Print formulas for select2, select3 and prefix signals.">printMath</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>& section, list<string>& field, ostream& docout); <a name="l00107"></a>00107 <a name="l00108"></a>00108 <span class="keywordtype">bool</span> <a class="code" href="classLateq.html#a30a26fb3592a36943776bf5d0dc80d0a" title="Find out whether all keys of the multimap are empty or not.">hasNotOnlyEmptyKeys</a>(multimap<string,string>& mm); <a name="l00109"></a>00109 <span class="keywordtype">void</span> <a class="code" href="classLateq.html#a49f50554ece2a019e43af4258da465e6" title="Simple handling of indentation.">tab</a>(<span class="keywordtype">int</span> n, ostream& docout) <span class="keyword">const</span>; <a name="l00110"></a>00110 }; <a name="l00111"></a>00111 <a name="l00112"></a>00112 <span class="keywordtype">void</span> <a class="code" href="lateq_8cpp.html#abf16eac31f0df5e1897f78d6b9b7cc84" title="Dispatch initialization of autodoc container.">initDocMath</a>(); <a name="l00113"></a>00113 <a name="l00114"></a>00114 <a name="l00115"></a>00115 <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 <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>