Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    rf196351 r65cdc1e  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug 11 10:20:00 2017
    13 // Update Count     : 127
     12// Last Modified On : Wed Aug  9 14:45:00 2017
     13// Update Count     : 126
    1414//
    1515
     
    269269        typedef AggregateDecl Parent;
    270270  public:
    271         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 ) {}
    272         StructDecl( const StructDecl &other ) : Parent( other ), kind( other.kind ) {}
     271        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( "" ) {}
     272        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 : "" ) {}
     273        StructDecl( const StructDecl &other ) : Parent( other ) {}
    273274
    274275        bool is_coroutine() { return kind == DeclarationNode::Coroutine; }
     
    276277        bool is_thread() { return kind == DeclarationNode::Thread; }
    277278
     279        // Tagged/Tree Structure Excetion
     280        bool get_tagged() { return tagged; }
     281        void set_tagged( bool newValue ) { tagged = newValue; }
     282        bool has_parent() { return parent_name != ""; }
     283        std::string get_parentName() { return parent_name; }
     284
    278285        virtual StructDecl *clone() const { return new StructDecl( *this ); }
    279286        virtual void accept( Visitor &v ) { v.visit( this ); }
     
    282289        DeclarationNode::Aggregate kind;
    283290        virtual std::string typeString() const;
     291
     292        bool tagged;
     293        std::string parent_name;
    284294};
    285295
Note: See TracChangeset for help on using the changeset viewer.