Polaris: ReturnStarExpr.h Source File

ReturnStarExpr.h

Go to the documentation of this file.
00001 ///
00002 #ifndef _RETURN_STAR_EXPR_H
00003 #define _RETURN_STAR_EXPR_H
00004 ///
00005 /// \class ReturnStarExpr 
00006 /// \brief An expression specifying which alternate return to take.
00007 /// \defgroup Polaris
00008 /// \ingroup Polaris
00009 ///  Expression
00010 /// \see Expression/ReturnStarExpr.h
00011 /// \see Expression/ReturnStarExpr.h
00012 /// \see Expression/Expression.cc
00013 ///
00014 /// \endcode
00015 /// \section Description Description
00016 /// A ReturnStarExpr is the expression holding an integer, which
00017 /// specifies which of possibly several alternate returns to
00018 /// take from a subroutine.  Its single argument is accessed
00019 /// through the method expr().  See UnaryExpr.h for more information
00020 /// about this methos.  The single argument is optional.
00021 ///
00022 #ifdef POLARIS_GNU_PRAGMAS
00023 #pragma interface
00024 #endif
00025 ///
00026 #ifndef _UNARY_EXPR_H
00027 #include "UnaryExpr.h"
00028 #endif
00029 ///
00030 class ReturnStarExpr : public UnaryExpr {
00031  public:
00032     inline ReturnStarExpr();
00033     inline ReturnStarExpr(Expression * arg_exp);
00034     inline ReturnStarExpr(const ReturnStarExpr & e);
00035     virtual ~ReturnStarExpr();
00036 
00037     virtual ReturnStarExpr & operator = (const ReturnStarExpr &);
00038 
00039     virtual Expression *clone() const;
00040     virtual int     structures_OK() const;
00041     virtual void    convert(BinRep & exprSet, Symtab & symtab);
00042     virtual void    print_debug(ostream & o, Boolean debug) const;
00043     ///< See Expression.h.
00044  
00045     virtual int     exchange_expr( VDL & vdl );
00046     ///< Create a node in the "expression" member and return the index.
00047 };
00048 
00049 
00050 ///< inline implementations
00051 
00052 inline
00053 ReturnStarExpr::ReturnStarExpr()
00054 : UnaryExpr(RETURN_OP, make_type(VOID_TYPE)) 
00055 {
00056     ///< nothing to do
00057 }
00058 
00059 inline
00060 ReturnStarExpr::ReturnStarExpr(Expression * arg_exp) 
00061 : UnaryExpr(RETURN_OP, make_type(VOID_TYPE), arg_exp) 
00062 {
00063     ///< nothing to do
00064 }
00065 
00066 inline
00067 ReturnStarExpr::ReturnStarExpr(const ReturnStarExpr & e)
00068 : UnaryExpr(e) 
00069 {
00070     ///< nothing to do
00071 }
00072 
00073 #endif
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:06 2005