Ignore:
Timestamp:
May 17, 2015, 1:19:35 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
0dd3a2f
Parents:
b87a5ed
Message:

licencing: second groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/ResolvExpr/ConversionCost.h

    rb87a5ed ra32b204  
    1 /*
    2  * This file is part of the Cforall project
    3  *
    4  * $Id: ConversionCost.h,v 1.6 2005/08/29 20:14:16 rcbilson Exp $
    5  *
    6  */
     1//
     2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
     3//
     4// The contents of this file are covered under the licence agreement in the
     5// file "LICENCE" distributed with Cforall.
     6//
     7// ConversionCost.h --
     8//
     9// Author           : Richard C. Bilson
     10// Created On       : Sun May 17 09:37:28 2015
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 09:39:23 2015
     13// Update Count     : 2
     14//
    715
    8 #ifndef RESOLVEXPR_CONVERSIONCOST_PROTECTED_H
    9 #define RESOLVEXPR_CONVERSIONCOST_PROTECTED_H
     16#ifndef CONVERSIONCOST_H
     17#define CONVERSIONCOST_H
    1018
    1119#include "SynTree/Visitor.h"
     
    1523
    1624namespace ResolvExpr {
     25        class ConversionCost : public Visitor {
     26          public:
     27                ConversionCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
     28 
     29                Cost get_cost() const { return cost; }
    1730
    18 class ConversionCost : public Visitor
    19 {
    20 public:
    21   ConversionCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
    22  
    23   Cost get_cost() const { return cost; }
    24 
    25   virtual void visit(VoidType *voidType);
    26   virtual void visit(BasicType *basicType);
    27   virtual void visit(PointerType *pointerType);
    28   virtual void visit(ArrayType *arrayType);
    29   virtual void visit(FunctionType *functionType);
    30   virtual void visit(StructInstType *aggregateUseType);
    31   virtual void visit(UnionInstType *aggregateUseType);
    32   virtual void visit(EnumInstType *aggregateUseType);
    33   virtual void visit(ContextInstType *aggregateUseType);
    34   virtual void visit(TypeInstType *aggregateUseType);
    35   virtual void visit(TupleType *tupleType);
    36 
    37 protected:
    38   Type *dest;
    39   const SymTab::Indexer &indexer;
    40   Cost cost;
    41   const TypeEnvironment &env;
    42 };
    43 
     31                virtual void visit(VoidType *voidType);
     32                virtual void visit(BasicType *basicType);
     33                virtual void visit(PointerType *pointerType);
     34                virtual void visit(ArrayType *arrayType);
     35                virtual void visit(FunctionType *functionType);
     36                virtual void visit(StructInstType *aggregateUseType);
     37                virtual void visit(UnionInstType *aggregateUseType);
     38                virtual void visit(EnumInstType *aggregateUseType);
     39                virtual void visit(ContextInstType *aggregateUseType);
     40                virtual void visit(TypeInstType *aggregateUseType);
     41                virtual void visit(TupleType *tupleType);
     42          protected:
     43                Type *dest;
     44                const SymTab::Indexer &indexer;
     45                Cost cost;
     46                const TypeEnvironment &env;
     47        };
    4448} // namespace ResolvExpr
    4549
    46 #endif /* #ifndef RESOLVEXPR_CONVERSIONCOST_PROTECTED_H */
     50#endif // CONVERSIONCOST_H */
     51
     52// Local Variables: //
     53// tab-width: 4 //
     54// mode: c++ //
     55// compile-command: "make install" //
     56// End: //
Note: See TracChangeset for help on using the changeset viewer.