Ignore:
Timestamp:
Jul 26, 2017, 12:19:41 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
b947fb2
Parents:
e0a653d (diff), ea91c42 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    re0a653d r33218c6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Tus Jun 27 15:31:00 2017
    13 // Update Count     : 122
    14 //
    15 
    16 #ifndef DECLARATION_H
    17 #define DECLARATION_H
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:52:59 2017
     13// Update Count     : 124
     14//
     15
     16#pragma once
    1817
    1918#include <string>
     
    266265        typedef AggregateDecl Parent;
    267266  public:
    268         StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ) {}
     267        StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ), tagged( false ), parent_name( "" ) {}
     268        StructDecl( const std::string &name, const std::string *parent, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( DeclarationNode::Struct ), tagged( true ), parent_name( parent ? *parent : "" ) {}
    269269        StructDecl( const StructDecl &other ) : Parent( other ) {}
    270270
     
    273273        bool is_thread() { return kind == DeclarationNode::Thread; }
    274274
     275        // Tagged/Tree Structure Excetion
     276        bool get_tagged() { return tagged; }
     277        void set_tagged( bool newValue ) { tagged = newValue; }
     278        bool has_parent() { return parent_name != ""; }
     279        std::string get_parentName() { return parent_name; }
     280
    275281        virtual StructDecl *clone() const { return new StructDecl( *this ); }
    276282        virtual void accept( Visitor &v ) { v.visit( this ); }
     
    279285        DeclarationNode::Aggregate kind;
    280286        virtual std::string typeString() const;
     287
     288        bool tagged;
     289        std::string parent_name;
    281290};
    282291
     
    342351std::ostream & operator<<( std::ostream & out, const Declaration * decl );
    343352std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data );
    344 
    345 #endif // DECLARATION_H
    346353
    347354// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.