vrq
/usr/src/RPM/BUILD/vrq-1.0.96/src/cgate.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  *         cgate.hpp
00025  *              - class definition a gate instance
00026  *
00027  ******************************************************************************
00028  */
00029 
00030 #ifndef CGATE_HPP
00031 #define CGATE_HPP
00032 
00033 #include "glue.h"
00034 #include "cdecl.h"
00035 #include "cnode.h"
00036 
00037 
00038 
00042 class CGate: public CDecl
00043 {
00044 private:
00045         CSymbol*        type;           
00046         CNode*          delayControl;   
00047         CNode*          arguments;      
00048         Strength_t      strength0;      
00049         Strength_t      strength1;      
00050 public:
00061         CGate( CSymbol* aSymbol, CSymbol* type, 
00062                Strength_t s0, Strength_t s1,
00063                CNode* delayControl, CNode* arguments, Coord_t* aLoc );
00069         virtual CDecl* Clone( CObstack* heap );
00074         CSymbol* GetType( void );
00079         CNode*   GetDelayControl( void );
00084         CNode*   GetArguments( void );
00089         void     SetArguments( CNode* n ) { arguments = n; }
00094         virtual void Dump( FILE* f );
00099         Strength_t Strength0() { return strength0; }
00104         void     Strength0( Strength_t pair ) { strength0 = pair; }
00109         Strength_t Strength1() { return strength1; }
00114         void     Strength1( Strength_t pair ) { strength1 = pair; }
00119         virtual void PreVisit1( int (*func)(CNode*,void*), void* data );
00120         virtual void PostVisit1( void (*func)(CNode*, void*), void* data );
00121         virtual void PostSubVisit1( CNode* (*func)(CNode*, void*), void* data );
00122 protected:
00128         void Copy( CObstack* heap, CGate& d );
00129 private:
00130         /*
00131          * disable copy constructor
00132          */
00133         CGate( const CGate& );
00137 };
00138 
00139 #endif // CGATE_HPP