00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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
00132
00133 CGate( const CGate& );
00137 };
00138
00139 #endif // CGATE_HPP