<!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: doc_lang.cpp 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>doc_lang.cpp File Reference</h1><code>#include <iostream></code><br/> <code>#include <fstream></code><br/> <code>#include <set></code><br/> <code>#include <string></code><br/> <code>#include <time.h></code><br/> <code>#include <cstdlib></code><br/> <code>#include <errno.h></code><br/> <code>#include "<a class="el" href="doc__lang_8hh_source.html">doc_lang.hh</a>"</code><br/> <code>#include "<a class="el" href="doc__notice_8hh_source.html">doc_notice.hh</a>"</code><br/> <code>#include "<a class="el" href="doc__autodoc_8hh_source.html">doc_autodoc.hh</a>"</code><br/> <code>#include "<a class="el" href="doc__lang_8cpp_source.html">doc_metadatas.hh</a>"</code><br/> <code>#include "<a class="el" href="lateq_8hh_source.html">lateq.hh</a>"</code><br/> <code>#include "<a class="el" href="enrobage_8hh_source.html">enrobage.hh</a>"</code><br/> <code>#include "<a class="el" href="compatibility_8hh_source.html">compatibility.hh</a>"</code><br/> <div class="dynheader"> Include dependency graph for doc_lang.cpp:</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="doc__lang_8cpp_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">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#add3201215f3173ccb0a97c6493597118">importDocStrings</a> (const string &filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Feed the content of doc texts maps from a file. <a href="#add3201215f3173ccb0a97c6493597118"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#ae72fef0cbd22d7215006756caaaf1776">getKey</a> (string &s, string &key, size_t &pt1)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#aa8c3cd2a9a5b4055b3cf9f66bd1eec3d">getText</a> (string &s, size_t &pt1, string &text)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a5f4fb3e015c18685ae8cfb6ea7f437a5">storePair</a> (const string &key, const string &text)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a6f32b6a596900bcf3fd3bd33e53c841c">printStringMapContent</a> (map< string, string > &m, const string &name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Simple trace function. <a href="#a6f32b6a596900bcf3fd3bd33e53c841c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static istream * </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a56d99634f77c578d4704e016bfe61331">openArchFile</a> (const string &filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Open architecture file. <a href="#a56d99634f77c578d4704e016bfe61331"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a93f175441540044bcefdcd1a8736d43b">getCurrentDir</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get current directory and store it in gCurrentDir. <a href="#a93f175441540044bcefdcd1a8736d43b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#aa993eaaab62326b7ec82db3ac19d420c">cholddir</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Switch back to the previously stored current directory. <a href="#aa993eaaab62326b7ec82db3ac19d420c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#abc3498b3fe2b5d2aed70c4ace6f4b7a5">loadTranslationFile</a> (const string &lang)</td></tr> <tr><td colspan="2"><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">map< string, string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a4e08b24f212cb688122e89a717604295">gDocNoticeStringMap</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">set< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a9dbcc9de2eadb0e2b537a43a2bd548f4">gDocNoticeKeySet</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">map< string, string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#af7ce9ec8a5ae61a52f3b4910397e0310">gDocAutodocStringMap</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">set< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#adc3ebffae641bccf859c7175786b8276">gDocAutodocKeySet</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">map< string, string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#aa28e02b0250cd740aa42876df3b7c3e4">gDocMathStringMap</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">set< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#aba81e10741b3cf94c4e1207509071be3">gDocMathKeySet</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">map< string, string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#aa19e3a2853a131a2165ddead4a0e565d">gDocMetadatasStringMap</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">set< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a76ea20a64a81f7074d281d8305d84198">gDocMetadatasKeySet</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static const string </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#af0598983981bf28f04f29275c753ec39">gDocTextsDefaultFile</a> = "mathdoctexts-default.txt"</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static string </td><td class="memItemRight" valign="bottom"><a class="el" href="doc__lang_8cpp.html#a0c91ed41a90a100a2570f4d993c6e16a">gCurrentDir</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Room to save current directory name. <a href="#a0c91ed41a90a100a2570f4d993c6e16a"></a><br/></td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="aa993eaaab62326b7ec82db3ac19d420c"></a><!-- doxytag: member="doc_lang.cpp::cholddir" ref="aa993eaaab62326b7ec82db3ac19d420c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int cholddir </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Switch back to the previously stored current directory. </p> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00242">242</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>References <a class="el" href="doc__lang_8cpp_source.html#l00066">gCurrentDir</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00224">openArchFile()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00243"></a>00243 { <a name="l00244"></a>00244 <span class="keywordflow">if</span> (chdir(<a class="code" href="doc__lang_8cpp.html#a0c91ed41a90a100a2570f4d993c6e16a" title="Room to save current directory name.">gCurrentDir</a>.c_str()) == 0) { <a name="l00245"></a>00245 <span class="keywordflow">return</span> 0; <a name="l00246"></a>00246 } <span class="keywordflow">else</span> { <a name="l00247"></a>00247 perror(<span class="stringliteral">"cholddir"</span>); <a name="l00248"></a>00248 exit(errno); <a name="l00249"></a>00249 } <a name="l00250"></a>00250 } </pre></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="a93f175441540044bcefdcd1a8736d43b"></a><!-- doxytag: member="doc_lang.cpp::getCurrentDir" ref="a93f175441540044bcefdcd1a8736d43b" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void getCurrentDir </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Get current directory and store it in gCurrentDir. </p> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00256">256</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>References <a class="el" href="compatibility_8hh_source.html#l00052">FAUST_PATH_MAX</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00066">gCurrentDir</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00224">openArchFile()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00257"></a>00257 { <a name="l00258"></a>00258 <span class="keywordtype">char</span> buffer[<a class="code" href="compatibility_8hh.html#a3bf18fd70de2efe183049cb028875fe2">FAUST_PATH_MAX</a>]; <a name="l00259"></a>00259 <a class="code" href="doc__lang_8cpp.html#a0c91ed41a90a100a2570f4d993c6e16a" title="Room to save current directory name.">gCurrentDir</a> = getcwd (buffer, <a class="code" href="compatibility_8hh.html#a3bf18fd70de2efe183049cb028875fe2">FAUST_PATH_MAX</a>); <a name="l00260"></a>00260 } </pre></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="ae72fef0cbd22d7215006756caaaf1776"></a><!-- doxytag: member="doc_lang.cpp::getKey" ref="ae72fef0cbd22d7215006756caaaf1776" args="(string &s, string &key, size_t &pt1)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void getKey </td> <td>(</td> <td class="paramtype">string & </td> <td class="paramname"> <em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string & </td> <td class="paramname"> <em>key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t & </td> <td class="paramname"> <em>pt1</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00145">145</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00146"></a>00146 { <a name="l00147"></a>00147 <span class="comment">/* Initialisation. */</span> <a name="l00148"></a>00148 key = <span class="stringliteral">""</span>; <a name="l00149"></a>00149 <span class="keywordtype">string</span> separators = <span class="stringliteral">" \t"</span>; <a name="l00150"></a>00150 <span class="keywordtype">size_t</span> pk1 = 1; <a name="l00151"></a>00151 <span class="keywordtype">size_t</span> pk2 = s.find_first_of(separators); <a name="l00152"></a>00152 <a name="l00153"></a>00153 <span class="comment">/* Immediate '\n' after keyword case. */</span> <a name="l00154"></a>00154 <span class="keywordflow">if</span> (pk2==string::npos) pk2 = s.size(); <a name="l00155"></a>00155 <a name="l00156"></a>00156 <span class="comment">/* Capture and check the keyword. */</span> <a name="l00157"></a>00157 key = s.substr(pk1, pk2-1); <a name="l00158"></a>00158 <a name="l00159"></a>00159 <span class="comment">/* Prepare text capture. */</span> <a name="l00160"></a>00160 pt1 = s.find_first_of(<span class="stringliteral">"\""</span>, pk2); <a name="l00161"></a>00161 } </pre></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="aa8c3cd2a9a5b4055b3cf9f66bd1eec3d"></a><!-- doxytag: member="doc_lang.cpp::getText" ref="aa8c3cd2a9a5b4055b3cf9f66bd1eec3d" args="(string &s, size_t &pt1, string &text)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void getText </td> <td>(</td> <td class="paramtype">string & </td> <td class="paramname"> <em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t & </td> <td class="paramname"> <em>pt1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string & </td> <td class="paramname"> <em>text</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00164">164</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00165"></a>00165 { <a name="l00166"></a>00166 <span class="comment">/* Capture the text on the current line. */</span> <a name="l00167"></a>00167 <span class="keywordtype">size_t</span> pt2; <a name="l00168"></a>00168 pt2 = s.find_last_not_of(<span class="stringliteral">"\""</span>); <a name="l00169"></a>00169 <span class="keywordflow">if</span> (pt2!=string::npos) { <a name="l00170"></a>00170 <span class="keywordflow">if</span> (text.size() > 0) text += <span class="stringliteral">"\n"</span>; <span class="comment">// Handle line breaks.</span> <a name="l00171"></a>00171 text += s.substr(pt1+1, pt2-pt1); <a name="l00172"></a>00172 } <a name="l00173"></a>00173 } </pre></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="add3201215f3173ccb0a97c6493597118"></a><!-- doxytag: member="doc_lang.cpp::importDocStrings" ref="add3201215f3173ccb0a97c6493597118" args="(const string &filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void importDocStrings </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>filename</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Feed the content of doc texts maps from a file. </p> <p>This mecchanism allows to load different files for translation.</p> <p>"mathdoctexts" files must have been formatted as follows :</p> <ul> <li>a line beginning by ':' immediately declares a keyword,</li> <li>a line beginning by '"' contains text until the last '"',</li> <li>text can directly follow a keyword, if separated by one or many separator characters (space or tab).</li> <li>a direct line break between two double quoted strings will insert a '<br/> ' line break in the resulting notice string. </li> </ul> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00113">113</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>References <a class="el" href="doc__autodoc_8cpp_source.html#l00037">gDocAutodocStringMap</a>, <a class="el" href="lateq_8cpp_source.html#l00050">gDocMathStringMap</a>, <a class="el" href="doc__metadatas_8cpp_source.html#l00035">gDocMetadatasStringMap</a>, <a class="el" href="doc__notice_8cpp_source.html#l00038">gDocNoticeStringMap</a>, <a class="el" href="doc__lang_8cpp_source.html#l00145">getKey()</a>, <a class="el" href="doc__lang_8cpp_source.html#l00164">getText()</a>, <a class="el" href="doc__lang_8cpp_source.html#l00224">openArchFile()</a>, <a class="el" href="doc__lang_8cpp_source.html#l00204">printStringMapContent()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00176">storePair()</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00076">loadTranslationFile()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00114"></a>00114 { <a name="l00115"></a>00115 <span class="keywordtype">string</span> s; <a name="l00116"></a>00116 <span class="keywordtype">string</span> key, text; <a name="l00117"></a>00117 istream* file = <a class="code" href="doc__lang_8cpp.html#a56d99634f77c578d4704e016bfe61331" title="Open architecture file.">openArchFile</a>(filename); <a name="l00118"></a>00118 <a name="l00119"></a>00119 <span class="keywordflow">while</span> ( getline(*file, s) ) { <a name="l00120"></a>00120 <span class="keywordtype">size_t</span> pt1; <span class="comment">// Text pointer.</span> <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="comment">/* The first character determines whether will follow a key or a text. */</span> <a name="l00123"></a>00123 <span class="keywordflow">switch</span> (s[0]) { <a name="l00124"></a>00124 <span class="keywordflow">case</span> <span class="charliteral">':'</span>: <a name="l00125"></a>00125 text = <span class="stringliteral">""</span>; <a name="l00126"></a>00126 <a class="code" href="doc__lang_8cpp.html#ae72fef0cbd22d7215006756caaaf1776">getKey</a>(s, key, pt1); <a name="l00127"></a>00127 <span class="keywordflow">if</span> (pt1==string::npos) <span class="keywordflow">continue</span>; <a name="l00128"></a>00128 <span class="keywordflow">break</span>; <a name="l00129"></a>00129 <span class="keywordflow">case</span> <span class="charliteral">'\"'</span>: <a name="l00130"></a>00130 pt1 = 0; <a name="l00131"></a>00131 <span class="keywordflow">break</span>; <a name="l00132"></a>00132 <span class="keywordflow">default</span>: <a name="l00133"></a>00133 <span class="keywordflow">continue</span>; <a name="l00134"></a>00134 } <a name="l00135"></a>00135 <a class="code" href="doc__lang_8cpp.html#aa8c3cd2a9a5b4055b3cf9f66bd1eec3d">getText</a>(s, pt1, text); <a name="l00136"></a>00136 <a class="code" href="doc__lang_8cpp.html#a5f4fb3e015c18685ae8cfb6ea7f437a5">storePair</a>(key, text); <a name="l00137"></a>00137 } <a name="l00138"></a>00138 <a class="code" href="doc__lang_8cpp.html#a6f32b6a596900bcf3fd3bd33e53c841c" title="Simple trace function.">printStringMapContent</a>(<a class="code" href="doc__lang_8cpp.html#a4e08b24f212cb688122e89a717604295">gDocNoticeStringMap</a>, <span class="stringliteral">"gDocNoticeStringMap"</span>); <a name="l00139"></a>00139 <a class="code" href="doc__lang_8cpp.html#a6f32b6a596900bcf3fd3bd33e53c841c" title="Simple trace function.">printStringMapContent</a>(<a class="code" href="doc__autodoc_8cpp.html#af7ce9ec8a5ae61a52f3b4910397e0310">gDocAutodocStringMap</a>, <span class="stringliteral">"gDocAutodocStringMap"</span>); <a name="l00140"></a>00140 <a class="code" href="doc__lang_8cpp.html#a6f32b6a596900bcf3fd3bd33e53c841c" title="Simple trace function.">printStringMapContent</a>(<a class="code" href="doc__compile_8cpp.html#aa28e02b0250cd740aa42876df3b7c3e4">gDocMathStringMap</a>, <span class="stringliteral">"gDocMathStringMap"</span>); <a name="l00141"></a>00141 <a class="code" href="doc__lang_8cpp.html#a6f32b6a596900bcf3fd3bd33e53c841c" title="Simple trace function.">printStringMapContent</a>(<a class="code" href="doc_8cpp.html#aa19e3a2853a131a2165ddead4a0e565d">gDocMetadatasStringMap</a>, <span class="stringliteral">"gDocMetadatasStringMap"</span>); <a name="l00142"></a>00142 } </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="abc3498b3fe2b5d2aed70c4ace6f4b7a5"></a><!-- doxytag: member="doc_lang.cpp::loadTranslationFile" ref="abc3498b3fe2b5d2aed70c4ace6f4b7a5" args="(const string &lang)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void loadTranslationFile </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>lang</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p><p>First ensure that the default file is loaded a least.</p> <p>Then try and load the target file. </p> </p> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00076">76</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>References <a class="el" href="doc__lang_8cpp_source.html#l00053">gDocTextsDefaultFile</a>, <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>, <a class="el" href="doc__autodoc_8cpp_source.html#l00097">initDocAutodoc()</a>, <a class="el" href="lateq_8cpp_source.html#l00307">initDocMath()</a>, <a class="el" href="doc__metadatas_8cpp_source.html#l00051">initDocMetadatas()</a>, and <a class="el" href="doc__notice_8cpp_source.html#l00140">initDocNotice()</a>.</p> <p>Referenced by <a class="el" href="doc_8cpp_source.html#l00216">printDoc()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00077"></a>00077 { <a name="l00078"></a>00078 <a class="code" href="lateq_8cpp.html#abf16eac31f0df5e1897f78d6b9b7cc84" title="Dispatch initialization of autodoc container.">initDocMath</a>(); <a name="l00079"></a>00079 <a class="code" href="doc__notice_8cpp.html#a430123b40ce396d8bc67baa386aefd5c" title="Dispatch initialization of notice containers, after default notice file loading.">initDocNotice</a>(); <a name="l00080"></a>00080 <a class="code" href="doc__autodoc_8cpp.html#a1d778042564fea9d2d42bed09c836f13" title="Dispatch initialization of autodoc container.">initDocAutodoc</a>(); <a name="l00081"></a>00081 <a class="code" href="doc__metadatas_8cpp.html#a8c3cb0daee97e4ed408ec0c1bbd323cc" title="Dispatch initialization of metadatas container.">initDocMetadatas</a>(); <a name="l00082"></a>00082 <a name="l00084"></a>00084 <a class="code" href="doc__lang_8cpp.html#add3201215f3173ccb0a97c6493597118" title="Feed the content of doc texts maps from a file.">importDocStrings</a>(<a class="code" href="doc__lang_8cpp.html#af0598983981bf28f04f29275c753ec39">gDocTextsDefaultFile</a>); <a name="l00085"></a>00085 <a name="l00087"></a>00087 <span class="keywordflow">if</span> ( ! lang.empty() ) { <a name="l00088"></a>00088 <a class="code" href="doc__lang_8cpp.html#add3201215f3173ccb0a97c6493597118" title="Feed the content of doc texts maps from a file.">importDocStrings</a>( <span class="stringliteral">"mathdoctexts-"</span> + lang + <span class="stringliteral">".txt"</span> ); <a name="l00089"></a>00089 } <a name="l00090"></a>00090 } </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="a56d99634f77c578d4704e016bfe61331"></a><!-- doxytag: member="doc_lang.cpp::openArchFile" ref="a56d99634f77c578d4704e016bfe61331" args="(const string &filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static istream * openArchFile </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>filename</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Open architecture file. </p> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00224">224</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>References <a class="el" href="doc__lang_8cpp_source.html#l00242">cholddir()</a>, <a class="el" href="doc__lang_8cpp_source.html#l00256">getCurrentDir()</a>, and <a class="el" href="enrobage_8cpp_source.html#l00069">open_arch_stream()</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00225"></a>00225 { <a name="l00226"></a>00226 istream* file; <a name="l00227"></a>00227 <a class="code" href="doc__lang_8cpp.html#a93f175441540044bcefdcd1a8736d43b" title="Get current directory and store it in gCurrentDir.">getCurrentDir</a>(); <span class="comment">// Save the current directory.</span> <a name="l00228"></a>00228 <span class="keywordflow">if</span> ( (file = <a class="code" href="enrobage_8cpp.html#a901a730cc8136f70a2073da23fafa61e" title="Try to open an architecture file searching in various directories.">open_arch_stream</a>(filename.c_str())) ) { <a name="l00229"></a>00229 <span class="comment">//cerr << "Documentator : openArchFile : Opening '" << filename << "'" << endl;</span> <a name="l00230"></a>00230 } <span class="keywordflow">else</span> { <a name="l00231"></a>00231 cerr << <span class="stringliteral">"ERROR : can't open architecture file "</span> << filename << endl; <a name="l00232"></a>00232 exit(1); <a name="l00233"></a>00233 } <a name="l00234"></a>00234 <a class="code" href="doc__lang_8cpp.html#aa993eaaab62326b7ec82db3ac19d420c" title="Switch back to the previously stored current directory.">cholddir</a>(); <span class="comment">// Return to current directory.</span> <a name="l00235"></a>00235 <span class="keywordflow">return</span> file; <a name="l00236"></a>00236 } </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="a6f32b6a596900bcf3fd3bd33e53c841c"></a><!-- doxytag: member="doc_lang.cpp::printStringMapContent" ref="a6f32b6a596900bcf3fd3bd33e53c841c" args="(map< string, string > &m, const string &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void printStringMapContent </td> <td>(</td> <td class="paramtype">map< string, string > & </td> <td class="paramname"> <em>map</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><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Simple trace function. </p> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00204">204</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00204"></a>00204 { <a name="l00205"></a>00205 <span class="keywordtype">bool</span> trace = <span class="keyword">false</span>; <a name="l00206"></a>00206 <span class="keywordflow">if</span>(trace) { <a name="l00207"></a>00207 cout << <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a> << <span class="stringliteral">".size() = "</span> << m.size() << endl; <a name="l00208"></a>00208 map<string,string>::iterator it; <a name="l00209"></a>00209 <span class="keywordtype">int</span> i = 1; <a name="l00210"></a>00210 <span class="keywordflow">for</span>(it = m.begin(); it!=m.end(); ++it) <a name="l00211"></a>00211 cout << i++ << <span class="stringliteral">".\t"</span> << <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a> << <span class="stringliteral">"["</span> << it->first << <span class="stringliteral">"] \t= '"</span> << it->second << <span class="stringliteral">"'"</span> << endl; <a name="l00212"></a>00212 } <a name="l00213"></a>00213 } </pre></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="a5f4fb3e015c18685ae8cfb6ea7f437a5"></a><!-- doxytag: member="doc_lang.cpp::storePair" ref="a5f4fb3e015c18685ae8cfb6ea7f437a5" args="(const string &key, const string &text)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void storePair </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>text</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00176">176</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>References <a class="el" href="doc__autodoc_8cpp_source.html#l00038">gDocAutodocKeySet</a>, <a class="el" href="doc__autodoc_8cpp_source.html#l00037">gDocAutodocStringMap</a>, <a class="el" href="lateq_8cpp_source.html#l00051">gDocMathKeySet</a>, <a class="el" href="lateq_8cpp_source.html#l00050">gDocMathStringMap</a>, <a class="el" href="doc__metadatas_8cpp_source.html#l00036">gDocMetadatasKeySet</a>, <a class="el" href="doc__metadatas_8cpp_source.html#l00035">gDocMetadatasStringMap</a>, <a class="el" href="doc__notice_8cpp_source.html#l00039">gDocNoticeKeySet</a>, and <a class="el" href="doc__notice_8cpp_source.html#l00038">gDocNoticeStringMap</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00177"></a>00177 { <a name="l00178"></a>00178 <span class="comment">/* Store the current pair. */</span> <a name="l00179"></a>00179 <span class="keywordflow">if</span>(!key.empty() && !text.empty()) { <a name="l00180"></a>00180 <a name="l00181"></a>00181 <span class="keywordflow">if</span> (<a class="code" href="doc__lang_8cpp.html#a9dbcc9de2eadb0e2b537a43a2bd548f4">gDocNoticeKeySet</a>.find(key) != <a class="code" href="doc__lang_8cpp.html#a9dbcc9de2eadb0e2b537a43a2bd548f4">gDocNoticeKeySet</a>.end()) { <a name="l00182"></a>00182 <a class="code" href="doc__lang_8cpp.html#a4e08b24f212cb688122e89a717604295">gDocNoticeStringMap</a>[key] = text; <a name="l00183"></a>00183 } <a name="l00184"></a>00184 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="doc__autodoc_8cpp.html#adc3ebffae641bccf859c7175786b8276">gDocAutodocKeySet</a>.find(key) != <a class="code" href="doc__autodoc_8cpp.html#adc3ebffae641bccf859c7175786b8276">gDocAutodocKeySet</a>.end()) { <a name="l00185"></a>00185 <a class="code" href="doc__autodoc_8cpp.html#af7ce9ec8a5ae61a52f3b4910397e0310">gDocAutodocStringMap</a>[key] = text; <a name="l00186"></a>00186 } <a name="l00187"></a>00187 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="doc__lang_8cpp.html#aba81e10741b3cf94c4e1207509071be3">gDocMathKeySet</a>.find(key) != <a class="code" href="doc__lang_8cpp.html#aba81e10741b3cf94c4e1207509071be3">gDocMathKeySet</a>.end()) { <a name="l00188"></a>00188 <a class="code" href="doc__compile_8cpp.html#aa28e02b0250cd740aa42876df3b7c3e4">gDocMathStringMap</a>[key] = text; <a name="l00189"></a>00189 } <a name="l00190"></a>00190 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="doc__lang_8cpp.html#a76ea20a64a81f7074d281d8305d84198">gDocMetadatasKeySet</a>.find(key) != <a class="code" href="doc__lang_8cpp.html#a76ea20a64a81f7074d281d8305d84198">gDocMetadatasKeySet</a>.end()) { <a name="l00191"></a>00191 <a class="code" href="doc_8cpp.html#aa19e3a2853a131a2165ddead4a0e565d">gDocMetadatasStringMap</a>[key] = text; <a name="l00192"></a>00192 } <a name="l00193"></a>00193 <span class="keywordflow">else</span> { <a name="l00194"></a>00194 cerr << <span class="stringliteral">"Documentator : importDocStings : "</span> << <span class="stringliteral">"warning : unknown key \""</span> << key << <span class="stringliteral">"\""</span> << endl; <a name="l00195"></a>00195 } <a name="l00196"></a>00196 <span class="comment">//cerr << "gDocNoticeStringMap[\"" << key << "\"] = \"" << gDocNoticeStringMap[key] << "\"" << endl;</span> <a name="l00197"></a>00197 } <a name="l00198"></a>00198 } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <hr/><h2>Variable Documentation</h2> <a class="anchor" id="a0c91ed41a90a100a2570f4d993c6e16a"></a><!-- doxytag: member="doc_lang.cpp::gCurrentDir" ref="a0c91ed41a90a100a2570f4d993c6e16a" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string <a class="el" href="drawschema_8cpp.html#a7ce3017d02da6ef6554e0406e1a5b767">gCurrentDir</a><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Room to save current directory name. </p> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00066">66</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00242">cholddir()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00256">getCurrentDir()</a>.</p> </div> </div> <a class="anchor" id="adc3ebffae641bccf859c7175786b8276"></a><!-- doxytag: member="doc_lang.cpp::gDocAutodocKeySet" ref="adc3ebffae641bccf859c7175786b8276" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">set<string> <a class="el" href="doc__lang_8cpp.html#adc3ebffae641bccf859c7175786b8276">gDocAutodocKeySet</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__autodoc_8cpp_source.html#l00038">38</a> of file <a class="el" href="doc__autodoc_8cpp_source.html">doc_autodoc.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__autodoc_8cpp_source.html#l00112">initDocAutodocKeySet()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00176">storePair()</a>.</p> </div> </div> <a class="anchor" id="af7ce9ec8a5ae61a52f3b4910397e0310"></a><!-- doxytag: member="doc_lang.cpp::gDocAutodocStringMap" ref="af7ce9ec8a5ae61a52f3b4910397e0310" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">map<string, string> <a class="el" href="doc__lang_8cpp.html#af7ce9ec8a5ae61a52f3b4910397e0310">gDocAutodocStringMap</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__autodoc_8cpp_source.html#l00037">37</a> of file <a class="el" href="doc__autodoc_8cpp_source.html">doc_autodoc.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__autodoc_8cpp_source.html#l00058">declareAutoDoc()</a>, <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>, <a class="el" href="doc__autodoc_8cpp_source.html#l00134">printDocAutodocStringMapContent()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00176">storePair()</a>.</p> </div> </div> <a class="anchor" id="aba81e10741b3cf94c4e1207509071be3"></a><!-- doxytag: member="doc_lang.cpp::gDocMathKeySet" ref="aba81e10741b3cf94c4e1207509071be3" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">set<string> <a class="el" href="lateq_8cpp.html#aba81e10741b3cf94c4e1207509071be3">gDocMathKeySet</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="lateq_8cpp_source.html#l00051">51</a> of file <a class="el" href="lateq_8cpp_source.html">lateq.cpp</a>.</p> <p>Referenced by <a class="el" href="lateq_8cpp_source.html#l00362">initDocMathKeySet()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00176">storePair()</a>.</p> </div> </div> <a class="anchor" id="aa28e02b0250cd740aa42876df3b7c3e4"></a><!-- doxytag: member="doc_lang.cpp::gDocMathStringMap" ref="aa28e02b0250cd740aa42876df3b7c3e4" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">map<string, string> <a class="el" href="lateq_8cpp.html#aa28e02b0250cd740aa42876df3b7c3e4">gDocMathStringMap</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="lateq_8cpp_source.html#l00050">50</a> of file <a class="el" href="lateq_8cpp_source.html">lateq.cpp</a>.</p> </div> </div> <a class="anchor" id="a76ea20a64a81f7074d281d8305d84198"></a><!-- doxytag: member="doc_lang.cpp::gDocMetadatasKeySet" ref="a76ea20a64a81f7074d281d8305d84198" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">set<string> <a class="el" href="doc__metadatas_8cpp.html#a76ea20a64a81f7074d281d8305d84198">gDocMetadatasKeySet</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__metadatas_8cpp_source.html#l00036">36</a> of file <a class="el" href="doc__metadatas_8cpp_source.html">doc_metadatas.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__metadatas_8cpp_source.html#l00066">initDocMetadatasKeySet()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00176">storePair()</a>.</p> </div> </div> <a class="anchor" id="aa19e3a2853a131a2165ddead4a0e565d"></a><!-- doxytag: member="doc_lang.cpp::gDocMetadatasStringMap" ref="aa19e3a2853a131a2165ddead4a0e565d" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">map<string, string> <a class="el" href="doc__metadatas_8cpp.html#aa19e3a2853a131a2165ddead4a0e565d">gDocMetadatasStringMap</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__metadatas_8cpp_source.html#l00035">35</a> of file <a class="el" href="doc__metadatas_8cpp_source.html">doc_metadatas.cpp</a>.</p> </div> </div> <a class="anchor" id="a9dbcc9de2eadb0e2b537a43a2bd548f4"></a><!-- doxytag: member="doc_lang.cpp::gDocNoticeKeySet" ref="a9dbcc9de2eadb0e2b537a43a2bd548f4" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">set<string> <a class="el" href="doc__notice_8cpp.html#a9dbcc9de2eadb0e2b537a43a2bd548f4">gDocNoticeKeySet</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__notice_8cpp_source.html#l00039">39</a> of file <a class="el" href="doc__notice_8cpp_source.html">doc_notice.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__notice_8cpp_source.html#l00199">initDocNoticeFlagMap()</a>, <a class="el" href="doc__notice_8cpp_source.html#l00157">initDocNoticeKeySet()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00176">storePair()</a>.</p> </div> </div> <a class="anchor" id="a4e08b24f212cb688122e89a717604295"></a><!-- doxytag: member="doc_lang.cpp::gDocNoticeStringMap" ref="a4e08b24f212cb688122e89a717604295" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">map<string, string> <a class="el" href="doc__notice_8cpp.html#a4e08b24f212cb688122e89a717604295">gDocNoticeStringMap</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__notice_8cpp_source.html#l00038">38</a> of file <a class="el" href="doc__notice_8cpp_source.html">doc_notice.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00113">importDocStrings()</a>, <a class="el" href="doc__notice_8cpp_source.html#l00068">printDocNotice()</a>, <a class="el" href="doc__notice_8cpp_source.html#l00215">printDocNoticeStringMapContent()</a>, and <a class="el" href="doc__lang_8cpp_source.html#l00176">storePair()</a>.</p> </div> </div> <a class="anchor" id="af0598983981bf28f04f29275c753ec39"></a><!-- doxytag: member="doc_lang.cpp::gDocTextsDefaultFile" ref="af0598983981bf28f04f29275c753ec39" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const string <a class="el" href="doc__lang_8cpp.html#af0598983981bf28f04f29275c753ec39">gDocTextsDefaultFile</a> = "mathdoctexts-default.txt"<code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="doc__lang_8cpp_source.html#l00053">53</a> of file <a class="el" href="doc__lang_8cpp_source.html">doc_lang.cpp</a>.</p> <p>Referenced by <a class="el" href="doc__lang_8cpp_source.html#l00076">loadTranslationFile()</a>.</p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:04 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>