Polaris: AllocateStmt.h Source File

AllocateStmt.h

Go to the documentation of this file.
00001 ///
00002 #ifndef _ALLOCATE_STMT_H
00003 #define _ALLOCATE_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 AllocateStmt : public Statement {
00014     friend Statement * make_statement(const char *name, const BinRep & binstr);
00015 
00016  protected:
00017 ///<  Expression * _parameters; - Now _exprlist[ALLOC_PARAMS]
00018     AllocateStmt(const char *l);
00019 
00020  public:
00021     void build_refs();
00022     
00023     inline const Expression & parameters_guarded() const 
00024            { return _exprlist[ALLOC_PARAMS]; }
00025     inline Expression & parameters_guarded()
00026            { return _exprlist[ALLOC_PARAMS]; }
00027 
00028     inline int parameters_valid() const
00029     { return (_exprlist.valid(ALLOC_PARAMS) == True &&
00030           _exprlist[ALLOC_PARAMS].op() != OMEGA_OP); }
00031 
00032     inline void parameters(Expression * e) {
00033         p_assert(e->op() == COMMA_OP,
00034          "AllocateStmt::parameters(Expression *): CommaExpr expected");
00035         _exprlist.modify(ALLOC_PARAMS, e);
00036     }
00037 
00038     virtual int  structures_OK() const;
00039     virtual void convert(BinRep &stmt, ExprTable &etable, Symtab &symtab,
00040                          const NamelistDict &namelists,
00041                          const FormatDB &formats,
00042                          Dictionary<NextEntry> *next_table);
00043 
00044     AllocateStmt(const char *l, Expression * parameters_exp);
00045     AllocateStmt(const AllocateStmt & stmt);
00046 
00047     virtual ~AllocateStmt();
00048 
00049     virtual AllocateStmt & operator = (const AllocateStmt & stmt);
00050 
00051     virtual Statement *clone() const;
00052     virtual void print_debug(ostream & o, int debug) const;
00053     virtual void fortran_write(ostream & o, int &indent, char *type = "") const;
00054  
00055     virtual void    exchange_convert( VDL &vdl );
00056     ///< Convert the Statement into the exchange format.
00057 };
00058 
00059 #endif
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:05:37 2005