ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        ctor
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        gc_noraii
        jacob/cs343-translation
        jenkins-sandbox
        memory
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        string
        with_gc
      
      
        
          | Last change
 on this file since 643a2e1 was             51b73452, checked in by Peter A. Buhr <pabuhr@…>, 11 years ago | 
        
          | 
initial commit
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            1.1 KB | 
      
      
| Line |  | 
|---|
| 1 | /* | 
|---|
| 2 | * This file is part of the Cforall project | 
|---|
| 3 | * | 
|---|
| 4 | * $Id: TupleExpr.cc,v 1.11 2005/08/29 20:59:26 rcbilson Exp $ | 
|---|
| 5 | * | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 | #include "Expression.h" | 
|---|
| 9 | #include "utility.h" | 
|---|
| 10 |  | 
|---|
| 11 |  | 
|---|
| 12 | TupleExpr::TupleExpr( Expression *_aname ) : Expression( _aname ) | 
|---|
| 13 | { | 
|---|
| 14 | } | 
|---|
| 15 |  | 
|---|
| 16 | TupleExpr::TupleExpr( const TupleExpr &other ) | 
|---|
| 17 | : Expression( other ) | 
|---|
| 18 | { | 
|---|
| 19 | cloneAll( other.exprs, exprs ); | 
|---|
| 20 | } | 
|---|
| 21 |  | 
|---|
| 22 | TupleExpr::~TupleExpr() | 
|---|
| 23 | { | 
|---|
| 24 | deleteAll( exprs ); | 
|---|
| 25 | } | 
|---|
| 26 |  | 
|---|
| 27 | void | 
|---|
| 28 | TupleExpr::print( std::ostream &os, int indent ) const | 
|---|
| 29 | { | 
|---|
| 30 | os << std::string( indent, ' ' ) << "Tuple:" << std::endl; | 
|---|
| 31 | printAll( exprs, os, indent+2 ); | 
|---|
| 32 | Expression::print( os, indent ); | 
|---|
| 33 | } | 
|---|
| 34 |  | 
|---|
| 35 | SolvedTupleExpr::SolvedTupleExpr( std::list<Expression *> &_exprs, Expression *_aname ) | 
|---|
| 36 | :  Expression( _aname ) | 
|---|
| 37 | { | 
|---|
| 38 | std::copy(_exprs.begin(), _exprs.end(), back_inserter(exprs)); | 
|---|
| 39 | } | 
|---|
| 40 |  | 
|---|
| 41 | SolvedTupleExpr::SolvedTupleExpr( const SolvedTupleExpr &other ) | 
|---|
| 42 | : Expression( other ) | 
|---|
| 43 | { | 
|---|
| 44 | cloneAll( other.exprs, exprs ); | 
|---|
| 45 | } | 
|---|
| 46 |  | 
|---|
| 47 | void | 
|---|
| 48 | SolvedTupleExpr::print( std::ostream &os, int indent ) const | 
|---|
| 49 | { | 
|---|
| 50 | os << std::string( indent, ' ' ) << "Solved Tuple:" << std::endl; | 
|---|
| 51 | printAll( exprs, os, indent+2 ); | 
|---|
| 52 | Expression::print( os, indent ); | 
|---|
| 53 | } | 
|---|
| 54 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.