![]() |
![]() |
00001 /***************************************************************************** 00002 * Copyright (C) 1997-2007, Mark Hummel 00003 * This file is part of Vrq. 00004 * 00005 * Vrq is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * Vrq is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301 USA 00019 ***************************************************************************** 00020 */ 00021 /****************************************************************************** 00022 * 00023 * 00024 * cparam.hpp 00025 * - class definition of parameter 00026 * definition nodes 00027 * 00028 ****************************************************************************** 00029 */ 00030 00031 #ifndef CPARAM_HPP 00032 #define CPARAM_HPP 00033 00034 #include <stdio.h> 00035 #include "glue.h" 00036 #include "cnode.h" 00037 #include "cdecl.h" 00038 00039 00040 class CNode; 00041 00042 00046 class CParam: public CDecl 00047 { 00048 private: 00049 CNode* expression; 00050 int specify; 00051 Decl_t subType; 00052 int inlined; 00053 00054 public: 00061 CParam( CSymbol* symbol, Coord_t* aLoc, Decl_t type ); 00066 CParam( const CParam& param ); 00072 virtual int IsWidthConstant( void ); 00078 virtual int IsWidthVolatile( void ); 00083 virtual int IsWidthEvaluateable( void ); 00088 virtual INT32 GetWidth( void ); 00093 virtual CNode* GetWidthExp( void ); 00098 virtual int WidthDirection( void ); 00103 void Specify( int v ) { specify = v; } 00108 int Specify( void ) { return specify; } 00113 void SetExpression( CNode* aExp ); 00118 CNode* GetExpression( void ); 00123 virtual NodeType_t GetNodeType( void ); 00128 virtual void Dump( FILE* f ); 00133 void SetSubType( Decl_t t ) { subType = t; } 00138 Decl_t GetSubType() { return subType; } 00144 void SetInlined( int v ) { inlined = v; } 00150 int GetInlined() { return inlined; } 00155 void PreVisit1( int (*func)(CNode*,void*), void* data ); 00156 void PostVisit1( void (*func)(CNode*, void*), void* data ); 00157 void PostSubVisit1( CNode* (*func)(CNode*, void*), void* data ); 00161 }; 00162 00163 #endif // CPARAM_HPP