/* * This file is part of the Cforall project * * $Id: Type.cc,v 1.6 2005/08/29 20:59:26 rcbilson Exp $ * */ #include "SynTree.h" #include "Visitor.h" #include "Type.h" #include "Declaration.h" #include "utility.h" Type::Type( const Qualifiers &tq ) : tq( tq ) { } Type::Type( const Type &other ) : tq( other.tq ) { cloneAll( other.forall, forall ); } Type::~Type() { deleteAll( forall ); } void Type::print( std::ostream &os, int indent ) const { if( !forall.empty() ) { os << "forall" << std::endl; printAll( forall, os, indent + 4 ); os << std::string( indent+2, ' ' ); } if( tq.isConst ) { os << "const "; } if( tq.isVolatile ) { os << "volatile "; } if( tq.isRestrict ) { os << "restrict "; } if( tq.isLvalue ) { os << "lvalue "; } }