vrq
/usr/src/RPM/BUILD/vrq-1.0.96/src/cgenvar.h
Go to the documentation of this file.
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  *         cgenvar.h
00025  *              - class definition of genvar 
00026  *                variables
00027  *
00028  ******************************************************************************
00029  */
00030 
00031 #ifndef CGENVAR_H
00032 #define CGENVAR_H
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 CGenvar: public CDecl
00047 {
00048 public:
00054         CGenvar( CSymbol* symbol, Coord_t* aLoc );
00060         virtual CDecl* Clone( CObstack* heap );
00065         virtual NodeType_t GetNodeType( void ) { return eS; }
00070         virtual INT32 GetWidth( void ) { return 32; }
00075         virtual int IsWidthEvaluateable() { return TRUE; }
00081         virtual int  IsWidthConstant( void ) { return TRUE; }
00087         virtual int  IsWidthVolatile( void ) { return FALSE; }
00092         virtual CNode* GetWidthExp() { return cINT32(GetWidth()); }
00097         virtual void Dump( FILE* f );
00098 protected:
00104         void Copy( CObstack* heap, CGenvar& d ) {};
00105 private:
00106         /*
00107          * disable copy constructor
00108          */
00109         CGenvar( const CGenvar& );
00110 };
00111 
00112 #endif // CGENVAR_H