vrq
/usr/src/RPM/BUILD/vrq-1.0.96/src/cmacro.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  *         cmacro.hpp
00025  *              - class definition for macro 
00026  *
00027  *
00028  ******************************************************************************
00029  */
00030 
00031 #ifndef CMACRO_HPP
00032 #define CMACRO_HPP
00033 
00034 #include "glue.h"
00035 #include "cdecl.h"
00036 
00037 
00038 
00039 class CSymbol;
00040 
00044 class CMacro : public CDecl
00045 {
00046 private:
00047         char*   body;       
00048         char**  argList;    
00049         int     complex:1;  
00050         int     defined:1;  
00051         int     zone;       
00052 public:
00059         static CMacro*  LookupMacro( const char* aName );
00060 
00066         CMacro( CSymbol* aSymbol, Coord_t* aLoc );
00072         virtual CDecl* Clone( CObstack* heap );
00077         char*   GetBody( void );
00082         void    SetBody( char* aBody );
00088         int     GetZone( void ) { return zone; }
00093         void    SetZone( int aZone ) { zone = aZone; }
00098         void    SetComplex( int aComplex );
00103         int     IsComplex( void );
00108         char**  GetArgList( void );
00114         void    SetArgList( char** argList );
00119         virtual void Dump( FILE* f );
00124         int     IsDefined( void );
00129         void    SetDefined( int aDefined );
00130 protected:
00136         void Copy( CObstack* heap, CMacro& d );
00137 private:
00138         /*
00139          * disable copy constructor
00140          */
00141         CMacro( const CMacro& );
00142 };
00143 
00144 #endif // CMACRO_HPP