<!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/csimpletype.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.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <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="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> <div class="tabs2"> <ul class="tablist"> <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 class="header"> <div class="headertitle"> <h1>/net/fileserver/nas/home/mdh/vrq/src/csimpletype.h</h1> </div> </div> <div class="contents"> <a href="csimpletype_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-2010, 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"> * csimpletype.h</span> <a name="l00025"></a>00025 <span class="comment"> * - abstract class for simple built in data types </span> <a name="l00026"></a>00026 <span class="comment"> *</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 CSIMPLETYPE_H</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define CSIMPLETYPE_H</span> <a name="l00033"></a>00033 <span class="preprocessor"></span> <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="cobject_8h.html">cobject.h</a>"</span> <a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="cdatatype_8h.html">cdatatype.h</a>"</span> <a name="l00036"></a>00036 <a name="l00040"></a><a class="code" href="classCSimpleType.html">00040</a> <span class="keyword">class </span><a class="code" href="classCSimpleType.html" title="class for describing simple builtin data types">CSimpleType</a> : <span class="keyword">public</span> <a class="code" href="classCDataType.html" title="Base class for describing data types.">CDataType</a> <a name="l00041"></a>00041 { <a name="l00042"></a>00042 <span class="keyword">public</span>: <a name="l00043"></a>00043 <span class="keyword">private</span>: <a name="l00044"></a>00044 <span class="keywordtype">int</span> signedAttr; <a name="l00045"></a>00045 <span class="keywordtype">int</span> unsignedAttr; <a name="l00046"></a>00046 <span class="keyword">public</span>: <a name="l00051"></a>00051 <a class="code" href="classCSimpleType.html#a1c60e990661df40aa5408f69dd67d57a" title="Create data type instance.">CSimpleType</a>( <a class="code" href="cdatatype_8h.html#adfd781749f7a9fe2df00a9bc5938efa3" title="Variable data types.">VarDataType_t</a> vt ); <a name="l00057"></a>00057 <a class="code" href="classCSimpleType.html#a1c60e990661df40aa5408f69dd67d57a" title="Create data type instance.">CSimpleType</a>( <a class="code" href="cdatatype_8h.html#adfd781749f7a9fe2df00a9bc5938efa3" title="Variable data types.">VarDataType_t</a> vt, list<CNode*>& rangeList ); <a name="l00062"></a>00062 <span class="keyword">virtual</span> <a class="code" href="classCDataType.html" title="Base class for describing data types.">CDataType</a>* <a class="code" href="classCSimpleType.html#ade9c543a6b0fa94d97c9a58954c7eab5" title="Create a new copy with a deep copy.">Clone</a>( <a class="code" href="classCObstack.html" title="Bulk object allocation object.">CObstack</a>* heap ); <a name="l00067"></a><a class="code" href="classCSimpleType.html#ac8b43e35bb41c156aff10141a6f27d7b">00067</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#ac8b43e35bb41c156aff10141a6f27d7b" title="Get declaration&#39;s signed attribute.">GetSignedAttr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> signedAttr; } <a name="l00072"></a><a class="code" href="classCSimpleType.html#a13258de60e128cc176ebac29626888b1">00072</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a13258de60e128cc176ebac29626888b1" title="Get declaration&#39;s unsigned attribute.">GetUnsignedAttr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> unsignedAttr; } <a name="l00077"></a><a class="code" href="classCSimpleType.html#a2576807f0d81a0eef4122f74296b2a74">00077</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCSimpleType.html#a2576807f0d81a0eef4122f74296b2a74" title="Set declaration&#39;s signed attribute.">SetSignedAttr</a>( <span class="keywordtype">int</span> v ) { signedAttr = v; } <a name="l00082"></a><a class="code" href="classCSimpleType.html#a5c021cbe5d33c14b24e5368cfbe3dde3">00082</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCSimpleType.html#a5c021cbe5d33c14b24e5368cfbe3dde3" title="Set declaration&#39;s unsigned attribute.">SetUnsignedAttr</a>( <span class="keywordtype">int</span> v ) { unsignedAttr = v; } <a name="l00087"></a>00087 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a84c0423c0c5097c9670e36826c0df514" title="Get declartion&#39;s signed property.">GetSigned</a>() <span class="keyword">const</span>; <a name="l00092"></a>00092 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a0efeb29d6371c8ba5da2106db0d7dc77" title="Get declaration&#39;s 2 state property.">GetTwoState</a>() <span class="keyword">const</span>; <a name="l00097"></a>00097 <span class="keyword">virtual</span> <a class="code" href="cdatatype_8h.html#aff499c00c9873bf3fcf1c46bf2652790" title="Expression node type.">NodeType_t</a> <a class="code" href="classCSimpleType.html#a2aedc229651f502d8886e60d85f095fb" title="Get data type.">GetNodeType</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>; <a name="l00105"></a><a class="code" href="classCSimpleType.html#aac00eb41ddb410165a6220f3ec180928">00105</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#aac00eb41ddb410165a6220f3ec180928" title="Determine if base width (sans packed dimensions) of declaration is constant, ie dependent upon only c...">IsBaseWidthConstant</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> TRUE; } <a name="l00113"></a><a class="code" href="classCSimpleType.html#a3d2bdc7c7795aab52092ba3d7bc4e8d8">00113</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a3d2bdc7c7795aab52092ba3d7bc4e8d8" title="Determine if base width (sans packed dimensions) of declaration is volatile, ie depend upon parameter...">IsBaseWidthVolatile</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> FALSE; } <a name="l00120"></a><a class="code" href="classCSimpleType.html#a6b40e48f786638995588421ebca157ce">00120</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a6b40e48f786638995588421ebca157ce" title="Determine if base width (sans packed dimensions) of declaration can be evaluated.">IsBaseWidthEvaluateable</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{<span class="keywordflow">return</span> TRUE; } <a name="l00125"></a>00125 <span class="keyword">virtual</span> <a class="code" href="glue_8h.html#a0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> <a class="code" href="classCSimpleType.html#aebfb935bc371476943959a2041eae708" title="Evaluate base width (sans packed dimensions) of declaration.">GetBaseWidth</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>; <a name="l00130"></a>00130 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#a0e2b1f61b27fff788bf7440c773c72e4" title="Get expression for datatype&#39;s base width (sans packed dimensions).">GetBaseWidthExp</a>() <span class="keyword">const</span>; <a name="l00136"></a>00136 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a675a68657bcf98e747bc68d4d7d7946b" title="Determine if complete data structure is a vector.">IsVector</a>() <span class="keyword">const</span>; <a name="l00142"></a>00142 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a70a60916d208235393b20fa16df45cce" title="Determine if complete data structure is packed.">IsPacked</a>() <span class="keyword">const</span>; <a name="l00148"></a>00148 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#a67a36f98ed19afd5313c1498ea1d5698" title="Get expression for declaration&#39;s msb.">GetPackedMsb</a>() <span class="keyword">const</span>; <a name="l00154"></a>00154 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#abc0e4798cecbc5889095f83e3c0d75b6" title="Get expression for declaration&#39;s lsb.">GetPackedLsb</a>() <span class="keyword">const</span>; <a name="l00160"></a>00160 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#ad47efebd24a3adea2350b98681660cae" title="Get expression for datatype&#39;s overall packed or vector range (msb/lsb).">GetPackedRange</a>() <span class="keyword">const</span>; <a name="l00165"></a>00165 <span class="keyword">virtual</span> <a class="code" href="glue_8h.html#a0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> <a class="code" href="classCSimpleType.html#a6808daa0db3a131ffd24fd2d4faf86f9" title="Evaluate packed or vector width of declaration.">GetPackedWidth</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>; <a name="l00170"></a>00170 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#aee2d15724fe9a1c8a900e1b4260e3018" title="Get expression for datatype&#39;s overall packed or vetor width.">GetPackedWidthExp</a>() <span class="keyword">const</span>; <a name="l00175"></a>00175 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a92f8b946b500bfddd3debda07d814246" title="Evaluate current decl width direction.">PackedWidthDirection</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>; <a name="l00180"></a>00180 <span class="keyword">virtual</span> <a class="code" href="glue_8h.html#a0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> <a class="code" href="classCSimpleType.html#a453a9d05129278bff37907d05c590fe7" title="Get number of packed dimensions of declaration.">GetNumberOfPackedDimensions</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>; <a name="l00186"></a>00186 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#a23a46265e1664b702ec732b255d555f3" title="Get expression tree for upper limit of given packed array dimension.">GetPackedMsi</a>( <a class="code" href="glue_8h.html#a0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> dim ) <span class="keyword">const</span>; <a name="l00192"></a>00192 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#aa68de410b6e37a9726dd623098edcca2" title="Get expression tree for lower limit of packed array dimension.">GetPackedLsi</a>( <a class="code" href="glue_8h.html#a0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> dim ) <span class="keyword">const</span>; <a name="l00198"></a>00198 <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* <a class="code" href="classCSimpleType.html#ad47efebd24a3adea2350b98681660cae" title="Get expression for datatype&#39;s overall packed or vector range (msb/lsb).">GetPackedRange</a>( <a class="code" href="glue_8h.html#a0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> dim ) <span class="keyword">const</span>; <a name="l00203"></a>00203 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCSimpleType.html#a8a1f444feb242ecb87a224fd4ef3f5bd" title="Dump data type info to file descriptor.">Dump</a>( FILE* f ) <span class="keyword">const</span>; <a name="l00204"></a>00204 <span class="keyword">protected</span>: <a name="l00211"></a>00211 <span class="keywordtype">void</span> <a class="code" href="classCSimpleType.html#a704daad4f080d2a8f316ab3d5ea4e626" title="Perform deep copy of given object to this one This should never be call directly, only by subclasses...">Copy</a>( <a class="code" href="classCObstack.html" title="Bulk object allocation object.">CObstack</a>* heap, <span class="keyword">const</span> <a class="code" href="classCSimpleType.html" title="class for describing simple builtin data types">CSimpleType</a>& o ); <a name="l00216"></a>00216 <span class="keywordtype">int</span> <a class="code" href="classCSimpleType.html#a38a85513953e1316a6178c44b7698611" title="Get width of vector.">GetVectorWidth</a>() <span class="keyword">const</span>; <a name="l00217"></a>00217 <span class="keyword">private</span>: <a name="l00218"></a>00218 <span class="comment">/*</span> <a name="l00219"></a>00219 <span class="comment"> * disable copy constructor</span> <a name="l00220"></a>00220 <span class="comment"> */</span> <a name="l00221"></a>00221 <a class="code" href="classCSimpleType.html#a1c60e990661df40aa5408f69dd67d57a" title="Create data type instance.">CSimpleType</a>( <span class="keyword">const</span> <a class="code" href="classCSimpleType.html" title="class for describing simple builtin data types">CSimpleType</a>& o ); <a name="l00222"></a>00222 <a name="l00223"></a>00223 }; <a name="l00224"></a>00224 <a name="l00225"></a>00225 <span class="preprocessor">#endif // CSIMPLETYPE_H</span> <a name="l00226"></a>00226 <span class="preprocessor"></span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>