⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classcell.html

📁 building parser with C++ functions
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>a1: Cell Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.9.1 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>Cell Class Reference</h1>Class Cell.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="Cell_8hpp-source.html">Cell.hpp</a>&gt;</code><p><p>Inheritance diagram for Cell:<p><center><img src="classCell.png" usemap="#Cell_map" border="0" alt=""></center><map name="Cell_map"><area href="classConsCell.html" alt="ConsCell" shape="rect" coords="0,56,75,80"><area href="classDoubleCell.html" alt="DoubleCell" shape="rect" coords="85,56,160,80"><area href="classIntCell.html" alt="IntCell" shape="rect" coords="170,56,245,80"><area href="classSymbolCell.html" alt="SymbolCell" shape="rect" coords="255,56,330,80"></map><a href="classCell-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a0">is_int</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if this is an int cell.  <a href="#a0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a1">is_double</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if this is a double cell.  <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a2">is_symbol</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if this is a symbol cell.  <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a3">is_cons</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if this is a cons cell.  <a href="#a3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a4">get_int</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor (error if this is not an int cell).  <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a5">get_double</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor (error if this is not a double cell).  <a href="#a5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a6">get_symbol</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor (error if this is not a symbol cell).  <a href="#a6"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classCell.html">Cell</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a7">get_car</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor (error if this is not a cons cell).  <a href="#a7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classCell.html">Cell</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a8">get_cdr</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor (error if this is not a cons cell).  <a href="#a8"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a9">print</a> (ostream &amp;os=cout) const =0</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print the subtree rooted at this cell, in s-expression notation.  <a href="#a9"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classCell.html">Cell</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a10">cell_ceil</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To do the operator "ceiling".  <a href="#a10"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classCell.html">Cell</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a11">cell_floor</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To do the operator "floor".  <a href="#a11"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a12">cell_sum</a> (int &amp;i, double &amp;result) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To do the operator "+".  <a href="#a12"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a13">cell_times</a> (int &amp;i, double &amp;result) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To do the operator "*".  <a href="#a13"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a14">cell_sub</a> (int &amp;i, double &amp;result) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To do the operator "-".  <a href="#a14"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a15">cell_div</a> (int &amp;i, double &amp;result) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To do the operator "/".  <a href="#a15"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a16">is_zero</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To check if it is zero.  <a href="#a16"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCell.html#a17">is_list</a> () const </td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Class Cell. <p><hr><h2>Member Function Documentation</h2><a class="anchor" name="a10" doxytag="Cell::cell_ceil"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="classCell.html">Cell</a> * Cell::cell_ceil           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>To do the operator "ceiling". <p><p>Reimplemented in <a class="el" href="classDoubleCell.html#a4">DoubleCell</a>.    </td>  </tr></table><a class="anchor" name="a15" doxytag="Cell::cell_div"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void Cell::cell_div           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>i</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>double &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>result</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>To do the operator "/". <p><p>Reimplemented in <a class="el" href="classIntCell.html#a7">IntCell</a>, and <a class="el" href="classDoubleCell.html#a9">DoubleCell</a>.    </td>  </tr></table><a class="anchor" name="a11" doxytag="Cell::cell_floor"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="classCell.html">Cell</a> * Cell::cell_floor           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>To do the operator "floor". <p><p>Reimplemented in <a class="el" href="classDoubleCell.html#a5">DoubleCell</a>.    </td>  </tr></table><a class="anchor" name="a14" doxytag="Cell::cell_sub"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void Cell::cell_sub           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>i</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>double &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>result</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>To do the operator "-". <p><p>Reimplemented in <a class="el" href="classIntCell.html#a6">IntCell</a>, and <a class="el" href="classDoubleCell.html#a8">DoubleCell</a>.    </td>  </tr></table><a class="anchor" name="a12" doxytag="Cell::cell_sum"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void Cell::cell_sum           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>i</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>double &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>result</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>To do the operator "+". <p><p>Reimplemented in <a class="el" href="classIntCell.html#a4">IntCell</a>, and <a class="el" href="classDoubleCell.html#a6">DoubleCell</a>.    </td>  </tr></table><a class="anchor" name="a13" doxytag="Cell::cell_times"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void Cell::cell_times           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>i</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>double &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>result</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>To do the operator "*". <p><p>Reimplemented in <a class="el" href="classIntCell.html#a5">IntCell</a>, and <a class="el" href="classDoubleCell.html#a7">DoubleCell</a>.    </td>  </tr></table><a class="anchor" name="a7" doxytag="Cell::get_car"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="classCell.html">Cell</a> * Cell::get_car           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Accessor (error if this is not a cons cell). <p><dl compact><dt><b>Returns:</b></dt><dd>First child cell.</dd></dl><p>Reimplemented in <a class="el" href="classConsCell.html#a2">ConsCell</a>.    </td>  </tr></table><a class="anchor" name="a8" doxytag="Cell::get_cdr"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="classCell.html">Cell</a> * Cell::get_cdr           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -