| Polaris: TableExpr.h Source File | ||
|
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
TableExpr.hGo to the documentation of this file.00001 /// 00002 #ifndef _TABLE_EXPR_H 00003 #define _TABLE_EXPR_H 00004 /// 00005 /// \class TableExpr 00006 /// \brief An expression holding an expression table index. 00007 /// \defgroup Polaris 00008 /// \ingroup Polaris 00009 /// Expression 00010 /// \see Expression/TableExpr.h 00011 /// \see Expression/TableExpr.h 00012 /// \see Expression/Expression.cc 00013 /// 00014 /// \endcode 00015 /// \section Description Description 00016 /// This derived class is not an actual expression type. 00017 /// It is to be used as an intermediate form when converting 00018 /// from the SETL expression table to the C expression form. 00019 /// All it contains is a single value which is the index of 00020 /// an expression in the expression table. See ExprTable.h 00021 /// 00022 #ifdef POLARIS_GNU_PRAGMAS 00023 #pragma interface 00024 #endif 00025 /// 00026 #ifndef _EXPRESSION_H 00027 #include "Expression.h" 00028 #endif 00029 /// 00030 class TableExpr : public Expression { 00031 protected: 00032 int _entry; 00033 00034 public: 00035 inline TableExpr(); 00036 inline TableExpr(int n); 00037 inline TableExpr(const TableExpr & t); 00038 virtual ~TableExpr(); 00039 00040 virtual void entry(int); 00041 virtual int entry() const; 00042 ///< Access the expression table index. 00043 00044 virtual Expression *clone() const; 00045 virtual void print_debug(ostream & o, Boolean debug) const; 00046 virtual void convert(BinRep & exprSet, Symtab & symtab); 00047 virtual int structures_OK() const; 00048 virtual const ExprSignature & update_signature(); 00049 virtual int node_compare(const Expression & ex) const; 00050 ///< See Expression.h. 00051 00052 virtual int exchange_expr( VDL & vdl ); 00053 ///< Create a node in the "expression" member and return the index. 00054 }; 00055 00056 00057 ///< inline implementations 00058 00059 inline 00060 TableExpr::TableExpr() 00061 : Expression(TABLE_ENTRY, make_type(INTEGER_TYPE)) 00062 { 00063 ///< nothing to do 00064 } 00065 00066 inline 00067 TableExpr::TableExpr(int n) 00068 : Expression(TABLE_ENTRY, make_type(INTEGER_TYPE)) 00069 { 00070 _entry = n; 00071 } 00072 00073 inline 00074 TableExpr::TableExpr(const TableExpr & t) 00075 : Expression(t) 00076 { 00077 _entry = t.entry(); 00078 } 00079 00080 #endif |
||
|