Polaris: ArithmeticIfStmt.h Source File

ArithmeticIfStmt.h

Go to the documentation of this file.
00001 ///
00002 #ifndef _ARITHMETIC_IF_STMT_H
00003 #define _ARITHMETIC_IF_STMT_H
00004 ///
00005 #ifdef POLARIS_GNU_PRAGMAS
00006 #pragma interface
00007 #endif
00008 ///
00009 #ifndef _STATEMENT_H
00010 #include "Statement.h"
00011 #endif
00012 ///
00013 class ArithmeticIfStmt : public Statement {
00014     friend Statement * make_statement(const char *name, const BinRep & binstr);
00015 
00016  protected:
00017     virtual void       _setptrs(Dictionary<VoidPtrDef>&labels, const FormatDB &formats);
00018     RefList<Statement> _label_list;
00019 
00020     List<Statement>    _labels;   
00021 
00022     ///< Temporary list for the RefList, used as Statement
00023     ///< is built.  Later, the underlying list is the 
00024     ///< statement list itself.
00025 
00026     ArithmeticIfStmt(const char *l);
00027 
00028  public:
00029     void build_refs();
00030     
00031     inline void expr(Expression * e) {
00032         _exprlist.modify(ARITHIF_EXPR, e);
00033     }
00034 
00035     inline const Expression & expr() const { return _exprlist[ARITHIF_EXPR]; }
00036     inline Expression & expr()             { return _exprlist[ARITHIF_EXPR]; }
00037 
00038     inline const RefList<Statement> &label_list() const {
00039         return (const RefList<Statement> &) _label_list;
00040     }
00041     inline RefList<Statement> &label_list() {
00042         return (RefList<Statement> &) _label_list;
00043     }
00044 
00045     virtual RefSet<Statement> *build_succ(const StmtList &stmts) const;
00046     virtual int  structures_OK() const;
00047     virtual void convert(BinRep &stmt, ExprTable &etable, Symtab &symtab,
00048                          const NamelistDict & namelists,
00049                          const FormatDB &formats,
00050                          Dictionary<NextEntry> *next_table);
00051 
00052     ArithmeticIfStmt(const char *l, Expression * expr_exp, Statement * stmt1,
00053                      Statement * stmt2, Statement * stmt3);
00054     ArithmeticIfStmt(const ArithmeticIfStmt & stmt);
00055 
00056     virtual ~ArithmeticIfStmt();
00057 
00058     virtual ArithmeticIfStmt & operator = (const ArithmeticIfStmt & stmt);
00059 
00060     virtual Statement *clone() const;
00061     virtual void print_debug(ostream & o, int debug) const;
00062     virtual void fortran_write(ostream & o, int &indent, char *type = "") const;
00063  
00064     virtual void    exchange_convert( VDL &vdl );
00065     ///< Convert the Statement into the exchange format.
00066 };
00067 
00068 #endif
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:05:37 2005