Ignore:
Timestamp:
May 19, 2015, 4:58:14 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:
843054c2
Parents:
01aeade
Message:

licencing: sixth groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SynTree/ReferenceToType.cc

    r01aeade ra08ba92  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 10:49:00 2015
    13 // Update Count     : 2
     12// Last Modified On : Tue May 19 16:52:40 2015
     13// Update Count     : 3
    1414//
    1515
     
    2727
    2828ReferenceToType::ReferenceToType( const ReferenceToType &other ) : Type( other ), name( other.name ) {
    29     cloneAll( other.parameters, parameters );
     29        cloneAll( other.parameters, parameters );
    3030}
    3131
    3232ReferenceToType::~ReferenceToType() {
    33     deleteAll( parameters );
     33        deleteAll( parameters );
    3434}
    3535
    3636void ReferenceToType::print( std::ostream &os, int indent ) const {
    37     using std::endl;
    38    
    39     Type::print( os, indent );
    40     os << "instance of " << typeString() << " " << name << " ";
    41     if ( ! parameters.empty() ) {
     37        using std::endl;
     38       
     39        Type::print( os, indent );
     40        os << "instance of " << typeString() << " " << name << " ";
     41        if ( ! parameters.empty() ) {
    4242                os << endl << std::string( indent, ' ' ) << "with parameters" << endl;
    4343                printAll( parameters, os, indent+2 );
    44     } // if
     44        } // if
    4545}
    4646
     
    6060
    6161void StructInstType::lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const {
    62     assert( baseStruct );
    63     doLookup( baseStruct->get_members(), baseStruct->get_parameters(), parameters, name, foundDecls );
     62        assert( baseStruct );
     63        doLookup( baseStruct->get_members(), baseStruct->get_parameters(), parameters, name, foundDecls );
    6464}
    6565
     
    6767
    6868void UnionInstType::lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const {
    69     assert( baseUnion );
    70     doLookup( baseUnion->get_members(), baseUnion->get_parameters(), parameters, name, foundDecls );
     69        assert( baseUnion );
     70        doLookup( baseUnion->get_members(), baseUnion->get_parameters(), parameters, name, foundDecls );
    7171}
    7272
     
    7676
    7777ContextInstType::ContextInstType( const ContextInstType &other ) : Parent( other ) {
    78     cloneAll( other.members, members );
     78        cloneAll( other.members, members );
    7979}
    8080
    8181ContextInstType::~ContextInstType() {
    82     deleteAll( members );
     82        deleteAll( members );
    8383}
    8484
    8585TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, TypeDecl *baseType ) : Parent( tq, name ) {
    86     set_baseType( baseType );
     86        set_baseType( baseType );
    8787}
    8888
     
    9191
    9292void TypeInstType::set_baseType( TypeDecl *newValue ) {
    93     baseType = newValue;
    94     isFtype = newValue->get_kind() == TypeDecl::Ftype;
     93        baseType = newValue;
     94        isFtype = newValue->get_kind() == TypeDecl::Ftype;
    9595}
    9696
     
    9898
    9999void TypeInstType::print( std::ostream &os, int indent ) const {
    100     using std::endl;
    101    
    102     Type::print( os, indent );
    103     os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " a function type) ";
    104     if ( ! parameters.empty() ) {
     100        using std::endl;
     101       
     102        Type::print( os, indent );
     103        os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " a function type) ";
     104        if ( ! parameters.empty() ) {
    105105                os << endl << std::string( indent, ' ' ) << "with parameters" << endl;
    106106                printAll( parameters, os, indent+2 );
    107     } // if
     107        } // if
    108108}
    109109
Note: See TracChangeset for help on using the changeset viewer.