Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > aaf33964de706a538481c929c1da6a44 > files > 3316

faust-doc-0.9.10-5mdv2010.1.x86_64.rpm

<!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_Text.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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>doc_Text.cpp File Reference</h1><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="doc__Text_8hh_source.html">doc_Text.hh</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="compatibility_8hh_source.html">compatibility.hh</a>&quot;</code><br/>
<code>#include &lt;string&gt;</code><br/>
<code>#include &lt;vector&gt;</code><br/>
<code>#include &lt;iostream&gt;</code><br/>
<code>#include &lt;sstream&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="floats_8hh_source.html">floats.hh</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for doc_Text.cpp:</div>
<div class="dynsection">
</div>

<p><a href="doc__Text_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">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="doc__Text_8cpp.html#a766bb71b31ced62a84ffda255da27d10">scientific2tenpow</a> (double n)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="doc__Text_8cpp.html#a94cd8fa5739b11f30429fe190bf68d3c">docT</a> (char *c)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="doc__Text_8cpp.html#a8c66ac93ebb8988ee4e5918dcabcb181">docT</a> (int n)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="doc__Text_8cpp.html#abefe2aa03db6fb26473d0cb992d5a8d9">docT</a> (long n)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="doc__Text_8cpp.html#ab4b332b92264231d800d8dfae3de6758">docT</a> (double n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a trailing f when converting double-precision numbers to text if single-precision is required NO, this is no more true for LaTeX documentator.  <a href="#ab4b332b92264231d800d8dfae3de6758"></a><br/></td></tr>
<tr><td colspan="2"><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="doc__Text_8cpp.html#a9189feb409ffc639ae0bd0a809974123">gInternDoubleSwitch</a></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ab4b332b92264231d800d8dfae3de6758"></a><!-- doxytag: member="doc_Text.cpp::docT" ref="ab4b332b92264231d800d8dfae3de6758" args="(double n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string docT </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a trailing f when converting double-precision numbers to text if single-precision is required NO, this is no more true for LaTeX documentator. </p>

<p>Definition at line <a class="el" href="doc__Text_8cpp_source.html#l00084">84</a> of file <a class="el" href="doc__Text_8cpp_source.html">doc_Text.cpp</a>.</p>

<p>References <a class="el" href="doc__Text_8cpp_source.html#l00100">scientific2tenpow()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00085"></a>00085 {
<a name="l00086"></a>00086 <span class="comment">//    char c[64];</span>
<a name="l00087"></a>00087 <span class="comment">//    if  (n &lt;  0.1 &amp;&amp; n &gt; -0.1 &amp;&amp; n != 0.0) {</span>
<a name="l00088"></a>00088 <span class="comment">//        //snprintf(c, 63, &quot;%e&quot;, n); //, inumix());</span>
<a name="l00091"></a>00091 <span class="comment"></span><span class="comment">//        snprintf(c, 63, &quot;%g&quot;, n);</span>
<a name="l00092"></a>00092 <span class="comment">//    } else {</span>
<a name="l00093"></a>00093 <span class="comment">//        snprintf(c, 63, &quot;%g&quot;, n);</span>
<a name="l00094"></a>00094 <span class="comment">//        //zdel(c);</span>
<a name="l00095"></a>00095 <span class="comment">//    }</span>
<a name="l00096"></a>00096 <span class="comment">//    return string(c);</span>
<a name="l00097"></a>00097     <span class="keywordflow">return</span> <a class="code" href="doc__Text_8cpp.html#a766bb71b31ced62a84ffda255da27d10">scientific2tenpow</a>(n);
<a name="l00098"></a>00098 }
</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="abefe2aa03db6fb26473d0cb992d5a8d9"></a><!-- doxytag: member="doc_Text.cpp::docT" ref="abefe2aa03db6fb26473d0cb992d5a8d9" args="(long n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string docT </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="doc__Text_8cpp_source.html#l00061">61</a> of file <a class="el" href="doc__Text_8cpp_source.html">doc_Text.cpp</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00061"></a>00061 { <span class="keywordtype">char</span> c[64]; snprintf(c, 63, <span class="stringliteral">&quot;%ld&quot;</span>,n); <span class="keywordflow">return</span> string(c); }
</pre></div></p>

</div>
</div>
<a class="anchor" id="a8c66ac93ebb8988ee4e5918dcabcb181"></a><!-- doxytag: member="doc_Text.cpp::docT" ref="a8c66ac93ebb8988ee4e5918dcabcb181" args="(int n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string docT </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="doc__Text_8cpp_source.html#l00060">60</a> of file <a class="el" href="doc__Text_8cpp_source.html">doc_Text.cpp</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00060"></a>00060 { <span class="keywordtype">char</span> c[64]; snprintf(c, 63, <span class="stringliteral">&quot;%d&quot;</span>,n);  <span class="keywordflow">return</span> string(c); }
</pre></div></p>

</div>
</div>
<a class="anchor" id="a94cd8fa5739b11f30429fe190bf68d3c"></a><!-- doxytag: member="doc_Text.cpp::docT" ref="a94cd8fa5739b11f30429fe190bf68d3c" args="(char *c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string docT </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>c</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="doc__Text_8cpp_source.html#l00059">59</a> of file <a class="el" href="doc__Text_8cpp_source.html">doc_Text.cpp</a>.</p>

<p>Referenced by <a class="el" href="doc__compile_8cpp_source.html#l00105">DocCompiler::compileLateq()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00196">DocCompiler::generateCode()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00987">DocCompiler::generateIota()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00075">DocCompiler::getFreshID()</a>, and <a class="el" href="doc__compile_8cpp_source.html#l01293">DocCompiler::prepareIntervallicUI()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00059"></a>00059 { <span class="keywordflow">return</span> string(c); }
</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="a766bb71b31ced62a84ffda255da27d10"></a><!-- doxytag: member="doc_Text.cpp::scientific2tenpow" ref="a766bb71b31ced62a84ffda255da27d10" args="(double n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string scientific2tenpow </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="doc__Text_8cpp_source.html#l00100">100</a> of file <a class="el" href="doc__Text_8cpp_source.html">doc_Text.cpp</a>.</p>

<p>Referenced by <a class="el" href="doc__Text_8cpp_source.html#l00084">docT()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00101"></a>00101 {
<a name="l00102"></a>00102     <span class="keywordtype">char</span> tmp[64];
<a name="l00103"></a>00103     <span class="keywordtype">string</span> entree = <span class="stringliteral">&quot; * 10^{&quot;</span>;
<a name="l00104"></a>00104     <span class="keywordtype">char</span> sortie = <span class="charliteral">&#39;}&#39;</span>;
<a name="l00105"></a>00105     <span class="keywordtype">string</span> s;
<a name="l00106"></a>00106     string::size_type ps;
<a name="l00107"></a>00107     
<a name="l00108"></a>00108     snprintf(tmp, 63, <span class="stringliteral">&quot;%g&quot;</span>, n);
<a name="l00109"></a>00109     
<a name="l00110"></a>00110     <span class="comment">//cerr &lt;&lt; &quot;doc_Text.cpp : scientific2tenpow : &quot; &lt;&lt; n &lt;&lt; &quot; -&gt; \&quot;&quot; &lt;&lt; tmp &lt;&lt; &quot;\&quot;&quot; &lt;&lt; endl;</span>
<a name="l00111"></a>00111     s = tmp;
<a name="l00112"></a>00112     ps = s.find(<span class="charliteral">&#39;e&#39;</span>);
<a name="l00113"></a>00113     
<a name="l00114"></a>00114     <span class="keywordflow">if</span> (ps != string::npos) {
<a name="l00115"></a>00115         s.replace(ps, 1, <span class="stringliteral">&quot;&quot;</span>);
<a name="l00116"></a>00116         s.insert(ps, entree);
<a name="l00117"></a>00117         s += sortie;
<a name="l00118"></a>00118     }
<a name="l00119"></a>00119     <span class="keywordflow">else</span> {
<a name="l00120"></a>00120         <span class="comment">//cerr &lt;&lt; &quot;doc_Text.cpp : scientific2tenpow : \&#39;e\&#39; non trouvé&quot; &lt;&lt; endl;</span>
<a name="l00121"></a>00121     }
<a name="l00122"></a>00122         
<a name="l00123"></a>00123     <span class="keywordflow">return</span> s;
<a name="l00124"></a>00124 }
</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="a9189feb409ffc639ae0bd0a809974123"></a><!-- doxytag: member="doc_Text.cpp::gInternDoubleSwitch" ref="a9189feb409ffc639ae0bd0a809974123" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="Text_8cpp.html#a9189feb409ffc639ae0bd0a809974123">gInternDoubleSwitch</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</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&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>