param.h

来自「this is a lp0 compilator new」· C头文件 代码 · 共 74 行

H
74
字号
//// ********************************************************************// *// *    Author          : Gerald Carter// *                      cartegw@humsci.auburn.edu// *    Filename        : param.h// *    Date Created    : 961228// *// *    Description// *    -------------// *	This is the header file for a formalParameter class used by// *	the activationRecord class found in activate.h.// *// *    -------------// *    Modifications// *    -------------// *// *******************************************************************//// INCLUDE FILES#include <iostream.h>#include "symbol.h"// To prevent multiple inclusion#ifndef _PARAM_H#define _PARAM_H// ##################################################################// ## class paramEntry// ##class paramEntry {   private :      symbolNode		*symbol_entry,				*actual;   public :      // Constructor and Destructor      paramEntry ( void ) { symbol_entry = actual = 0; }      ~paramEntry ( void ) {}      // symbol_entry Methods      symbolNode* SetSymbolPtr ( symbolNode *ptr )         { symbol_entry = ptr; return ( symbol_entry ); }      symbolNode* GetSymbolPtr ( void )          { return ( symbol_entry ); }      symbolNode* SetActual ( symbolNode *ptr )         { actual = ptr; return ( actual ); }      symbolNode* GetActual ( void )         { return ( actual ); }      // Overloaded operators      friend ostream& operator<< ( ostream& S, const paramEntry& entry ) {         S << "Symbol Entry : " << *( entry.symbol_entry )           << "Actual : " << *( entry.actual );         return ( S );      }      // These could be problematic as there is no checking to see if       // the pointers are actually pointing to something.      int operator< ( const paramEntry& cmp )          { return ( *symbol_entry < *( cmp.symbol_entry ) ); }      int operator> ( const paramEntry& cmp )         { return ( *symbol_entry > *( cmp.symbol_entry ) ); }      int operator== ( const paramEntry& cmp )         { return ( *symbol_entry == *( cmp.symbol_entry ) ); }      paramEntry& operator= ( const paramEntry& );}; #endif//********** end of param.h ***************************************//*****************************************************************

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?