Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > ffa1e6f5ad04360808fe8840fe3ba036 > files > 79

vrq-devel-1.0.88-1.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>vrq: /net/fileserver/nas/home/mdh/vrq/src/cfunction.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
   <tr>
    <td width="180"><a href="index.html"><img src="vrq.png" width="150" height="100" border="0" alt="vrq"></a></td>
    <td background="top_bg.png" align="right" width="100%">
      <img src="glyth.png" width="500" height="100" border="0" alt="">
    </td>
   </tr>
   <tr>
    <td background="#FFFFFF" align="right" width="50" height="4"></td>
   </tr>
  </table>
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<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="modules.html"><span>Modules</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>
<h1>/net/fileserver/nas/home/mdh/vrq/src/cfunction.h</h1><a href="cfunction_8h.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"> * Copyright (C) 1997-2007, Mark Hummel</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of Vrq.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Vrq is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU General Public</span>
<a name="l00007"></a>00007 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * Vrq is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment"> * General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public</span>
<a name="l00016"></a>00016 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, </span>
<a name="l00018"></a>00018 <span class="comment"> * Boston, MA  02110-1301  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 <span class="comment">/******************************************************************************</span>
<a name="l00022"></a>00022 <span class="comment"> *</span>
<a name="l00023"></a>00023 <span class="comment"> *</span>
<a name="l00024"></a>00024 <span class="comment"> *         cfunction.hpp</span>
<a name="l00025"></a>00025 <span class="comment"> *              - class definition of function</span>
<a name="l00026"></a>00026 <span class="comment"> *                definition nodes</span>
<a name="l00027"></a>00027 <span class="comment"> *</span>
<a name="l00028"></a>00028 <span class="comment"> ******************************************************************************</span>
<a name="l00029"></a>00029 <span class="comment"> */</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="preprocessor">#ifndef CFUNCTION_HPP</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define CFUNCTION_HPP</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;vector&gt;</span> 
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;list&gt;</span> 
<a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="glue_8h.html">glue.h</a>"</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="cdecl_8h.html">cdecl.h</a>"</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="csymtab_8h.html">csymtab.h</a>"</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="cblock_8h.html">cblock.h</a>"</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="cnode_8h.html">cnode.h</a>"</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="cfref_8h.html">cfref.h</a>"</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="keyword">class </span>CContext;
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 
<a name="l00050"></a><a class="code" href="classCFunction.html">00050</a> <span class="keyword">class </span><a class="code" href="classCFunction.html" title="Declaration object for functions and tasks.">CFunction</a>: <span class="keyword">public</span> <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052 <span class="keyword">private</span>:
<a name="l00053"></a>00053         <a class="code" href="classCSymtab.html" title="Aux class used to create symbol table scoping.">CSymtab&lt;CDecl&gt;</a>    portSymtab;       
<a name="l00054"></a>00054         <span class="keywordtype">int</span>               portDirListValid; 
<a name="l00055"></a>00055 
<a name="l00056"></a>00056         vector&lt;CPortDir*&gt; portDirList;      
<a name="l00057"></a>00057         <a class="code" href="classCDecl.html" title="Base class for describing declaration objects.">CDecl</a>*            output;           
<a name="l00058"></a>00058 
<a name="l00059"></a>00059         <span class="keywordtype">int</span>               automatic;        
<a name="l00060"></a>00060         <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*            ports;            
<a name="l00061"></a>00061         <span class="keywordtype">int</span>               inlinePortDecls;  
<a name="l00062"></a>00062 <span class="keyword">public</span>:
<a name="l00069"></a>00069         <a class="code" href="classCFunction.html#453e7409a9b3bfb236c0c3b24e3e9aec" title="Create function/task declaration object.">CFunction</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="structCoord__t.html" title="Structure to hold file coordinates.">Coord_t</a>* aLoc, <span class="keywordtype">int</span> automatic );
<a name="l00074"></a>00074         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCFunction.html#afea245e0699a0363c831f7ea46438cb" title="Dump function info to file descriptor.">Dump</a>( FILE* f );
<a name="l00079"></a>00079         <span class="keyword">virtual</span> vector&lt;CPortDir*&gt;* <a class="code" href="classCFunction.html#1214e9670ff2f0ca7f2541f22066820b" title="Get array of port declarations.">GetPortDirList</a>();
<a name="l00084"></a><a class="code" href="classCFunction.html#ed9add9af44b974be4b4acd54b703ae0">00084</a>         <span class="keywordtype">void</span>    <a class="code" href="classCFunction.html#ed9add9af44b974be4b4acd54b703ae0" title="Set function port list.">SetPorts</a>( <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* n ) { ports = n; }
<a name="l00089"></a><a class="code" href="classCFunction.html#7d0b799712a074763ba10f66bd420c9c">00089</a>         <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*  <a class="code" href="classCFunction.html#7d0b799712a074763ba10f66bd420c9c" title="Get function port list.">GetPorts</a>() { <span class="keywordflow">return</span> ports; }
<a name="l00094"></a><a class="code" href="classCFunction.html#8ea1a02abde1158271f989fbf8c7fc30">00094</a>         <span class="keywordtype">int</span>     <a class="code" href="classCFunction.html#8ea1a02abde1158271f989fbf8c7fc30" title="Get inline declaration attribute.">InlinePortDecls</a>() { <span class="keywordflow">return</span> inlinePortDecls; }
<a name="l00099"></a><a class="code" href="classCFunction.html#43fea2024c6487383331e989c2e8ca96">00099</a>         <span class="keywordtype">void</span>    <a class="code" href="classCFunction.html#8ea1a02abde1158271f989fbf8c7fc30" title="Get inline declaration attribute.">InlinePortDecls</a>( <span class="keywordtype">int</span> v ) { inlinePortDecls = v; }
<a name="l00104"></a><a class="code" href="classCFunction.html#37d6171dcb729998be94b4a87ac3a955">00104</a>         <span class="keywordtype">void</span>    <a class="code" href="classCFunction.html#37d6171dcb729998be94b4a87ac3a955" title="Set output declaration for function.">SetOutput</a>( <a class="code" href="classCDecl.html" title="Base class for describing declaration objects.">CDecl</a>* output ) { this-&gt;output = output; }
<a name="l00109"></a><a class="code" href="classCFunction.html#1a5157064faa0a689f565a6ca8e6c62a">00109</a>         <a class="code" href="classCDecl.html" title="Base class for describing declaration objects.">CDecl</a>*  <a class="code" href="classCFunction.html#1a5157064faa0a689f565a6ca8e6c62a" title="Get output declaration.">GetOutput</a>() { <span class="keywordflow">return</span> output; }
<a name="l00115"></a><a class="code" href="classCFunction.html#3be0735af164825c32d7b2ce0a6a6bbf">00115</a>         <span class="keywordtype">int</span>     <a class="code" href="classCFunction.html#3be0735af164825c32d7b2ce0a6a6bbf" title="Get automatic attribute.">GetAutomatic</a>() { <span class="keywordflow">return</span> automatic; }
<a name="l00116"></a>00116 
<a name="l00126"></a>00126         <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classCFunction.html#5ac6f247a337996728183b02ca494d1c" title="Get width of function.">Width</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block ) ;
<a name="l00136"></a>00136         <span class="keyword">static</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCFunction.html#1a3321ee388d91438a7b5d2e355abe78" title="Get width of function as an expression.">WidthExp</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block ) ;
<a name="l00147"></a>00147         <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classCFunction.html#244fef07105e5a4326ca8e39026445e8" title="Determine if width of function is constant.">WidthConstant</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, 
<a name="l00148"></a>00148                                                         <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00159"></a>00159         <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classCFunction.html#31da656b8ec56842898b2acc7f75c386" title="Determine if width of function is volatile.">WidthVolatile</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, 
<a name="l00160"></a>00160                                                         <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00170"></a>00170         <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classCFunction.html#77dee38daf65bc7fe628543e4cb842b4" title="Determine if width of function is evaluateable.">WidthEvaluateable</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, 
<a name="l00171"></a>00171                                       <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00181"></a>00181         <span class="keyword">static</span> <a class="code" href="cdecl_8h.html#ff499c00c9873bf3fcf1c46bf2652790" title="Expression node type.">NodeType_t</a> <a class="code" href="classCFunction.html#545eda4c6b40749455a5adbfb157f8d6" title="Determine if type of result of function.">Type</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00182"></a>00182 
<a name="l00190"></a>00190         <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classCFunction.html#2ded3f761d366fd4fbf23f286ed1a179" title="Determine if function can be evaluated.">Evaluateable</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00191"></a>00191 
<a name="l00199"></a>00199         <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classCFunction.html#d9acb3e7ca70b3dca5a230c6e30d3818" title="Evaluate function as a vector and return result.">EvalVector</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>&amp; v, <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, 
<a name="l00200"></a>00200                                         <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00201"></a>00201 
<a name="l00209"></a>00209         <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="classCFunction.html#dd8a281d8c27e4a3fa58913646eae91a" title="Evaluate function as a real and return result.">EvalReal</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00210"></a>00210 
<a name="l00215"></a>00215         <span class="keywordtype">void</span>    <a class="code" href="classCDecl.html#a5ecfff625616b81a4de3fce4e6d0cb3">PreVisit1</a>( <span class="keywordtype">int</span> (*func)(<a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*,<span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* data );
<a name="l00216"></a>00216         <span class="keywordtype">void</span>    <a class="code" href="classCDecl.html#e71ba72ce0fc7e32db9cd38d6f738a44">PostVisit1</a>( <span class="keywordtype">void</span> (*func)(<a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*, <span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* data );
<a name="l00217"></a>00217         <span class="keywordtype">void</span>    <a class="code" href="classCDecl.html#e6e0d93143738a4d226cca8314a92cfe">PostSubVisit1</a>( <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* (*func)(<a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*, <span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* data );
<a name="l00218"></a>00218         <span class="keywordtype">void</span>    FixupPorts();
<a name="l00219"></a>00219         <span class="keywordtype">void</span>    SetPortSymtab( <a class="code" href="classCSymtab.html" title="Aux class used to create symbol table scoping.">CSymtab&lt;CDecl&gt;</a>&amp; <a class="code" href="classCBlock.html#e3e5968ce31846451f6e2babcdaa868b">symtab</a> );
<a name="l00220"></a>00220 <span class="keyword">protected</span>:
<a name="l00221"></a>00221         <span class="keyword">virtual</span> <span class="keywordtype">void</span> CodeListChanged() { portDirListValid = FALSE; }
<a name="l00222"></a>00222 <span class="keyword">private</span>:
<a name="l00223"></a>00223         <span class="keyword">static</span> <a class="code" href="classCFunction.html" title="Declaration object for functions and tasks.">CFunction</a>* FindFunction( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* symbol,
<a name="l00224"></a>00224                                 <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args, <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* block );
<a name="l00225"></a>00225         <span class="keywordtype">void</span> EvaluateArgs( CContext* context, <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* args );
<a name="l00229"></a>00229 };
<a name="l00230"></a>00230 
<a name="l00231"></a>00231 <span class="preprocessor">#endif // CFUNCTION_HPP</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 21 18:05:33 2009 for vrq by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>