Ignore:
Timestamp:
May 18, 2015, 11:20:23 AM (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:
51587aa
Parents:
a32b204
Message:

licencing: third groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SynTree/AggregateDecl.cc

    ra32b204 r0dd3a2f  
    1 /*
    2  * This file is part of the Cforall project
    3  *
    4  * $Id: AggregateDecl.cc,v 1.7 2005/08/29 20:59:25 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// AggregateDecl.cc --
     8//
     9// Author           : Richard C. Bilson
     10// Created On       : Sun May 17 23:56:39 2015
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon May 18 07:48:23 2015
     13// Update Count     : 4
     14//
    715
    816#include "Declaration.h"
     
    1119
    1220
    13 AggregateDecl::AggregateDecl( const std::string &name )
    14     : Parent( name, Declaration::NoStorageClass, LinkageSpec::Cforall )
    15 {
     21AggregateDecl::AggregateDecl( const std::string &name ) : Parent( name, Declaration::NoStorageClass, LinkageSpec::Cforall ) {
    1622}
    1723
    18 AggregateDecl::AggregateDecl( const AggregateDecl &other )
    19     : Parent( other )
    20 {
     24AggregateDecl::AggregateDecl( const AggregateDecl &other ) : Parent( other ) {
    2125    cloneAll( other.members, members );
    2226    cloneAll( other.parameters, parameters );
    2327}
    2428
    25 AggregateDecl::~AggregateDecl()
    26 {
     29AggregateDecl::~AggregateDecl() {
    2730    deleteAll( members );
    2831    deleteAll( parameters );
    2932}
    3033
    31 void
    32 AggregateDecl::print( std::ostream &os, int indent ) const
    33 {
     34void AggregateDecl::print( std::ostream &os, int indent ) const {
    3435    using std::string;
    3536    using std::endl;
     
    3738    os << typeString() << " " << get_name();
    3839    if ( ! parameters.empty() ) {
    39         os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
    40         printAll( parameters, os, indent+4 );
    41     }
     40                os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
     41                printAll( parameters, os, indent+4 );
     42    } // if
    4243    if ( ! members.empty() ) {
    43         os << endl << string( indent+2, ' ' ) << "with members" << endl;
    44         printAll( members, os, indent+4 );
    45     }
     44                os << endl << string( indent+2, ' ' ) << "with members" << endl;
     45                printAll( members, os, indent+4 );
     46    } // if
    4647}
    4748
    48 void
    49 AggregateDecl::printShort( std::ostream &os, int indent ) const
    50 {
     49void AggregateDecl::printShort( std::ostream &os, int indent ) const {
    5150    using std::string;
    5251    using std::endl;
     
    5453    os << typeString() << " " << get_name();
    5554    if ( ! parameters.empty() ) {
    56         os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
    57         printAll( parameters, os, indent+4 );
    58     }
     55                os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
     56                printAll( parameters, os, indent+4 );
     57    } // if
    5958}
    6059
     
    6766std::string ContextDecl::typeString() const { return "context"; }
    6867
     68// Local Variables: //
     69// tab-width: 4 //
     70// mode: c++ //
     71// compile-command: "make install" //
     72// End: //
Note: See TracChangeset for help on using the changeset viewer.