/* * This file is part of the Cforall project * * $Id: ConversionCost.h,v 1.6 2005/08/29 20:14:16 rcbilson Exp $ * */ #ifndef RESOLVEXPR_CONVERSIONCOST_PROTECTED_H #define RESOLVEXPR_CONVERSIONCOST_PROTECTED_H #include "SynTree/Visitor.h" #include "SymTab/Indexer.h" #include "Cost.h" #include "TypeEnvironment.h" namespace ResolvExpr { class ConversionCost : public Visitor { public: ConversionCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ); Cost get_cost() const { return cost; } virtual void visit(VoidType *voidType); virtual void visit(BasicType *basicType); virtual void visit(PointerType *pointerType); virtual void visit(ArrayType *arrayType); virtual void visit(FunctionType *functionType); virtual void visit(StructInstType *aggregateUseType); virtual void visit(UnionInstType *aggregateUseType); virtual void visit(EnumInstType *aggregateUseType); virtual void visit(ContextInstType *aggregateUseType); virtual void visit(TypeInstType *aggregateUseType); virtual void visit(TupleType *tupleType); protected: Type *dest; const SymTab::Indexer &indexer; Cost cost; const TypeEnvironment &env; }; } // namespace ResolvExpr #endif /* #ifndef RESOLVEXPR_CONVERSIONCOST_PROTECTED_H */