Changeset 33218c6 for src/SynTree/Declaration.h
- Timestamp:
- Jul 26, 2017, 12:19:41 PM (8 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
re0a653d r33218c6 9 9 // Author : Richard C. Bilson 10 10 // 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 18 17 19 18 #include <string> … … 266 265 typedef AggregateDecl Parent; 267 266 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 : "" ) {} 269 269 StructDecl( const StructDecl &other ) : Parent( other ) {} 270 270 … … 273 273 bool is_thread() { return kind == DeclarationNode::Thread; } 274 274 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 275 281 virtual StructDecl *clone() const { return new StructDecl( *this ); } 276 282 virtual void accept( Visitor &v ) { v.visit( this ); } … … 279 285 DeclarationNode::Aggregate kind; 280 286 virtual std::string typeString() const; 287 288 bool tagged; 289 std::string parent_name; 281 290 }; 282 291 … … 342 351 std::ostream & operator<<( std::ostream & out, const Declaration * decl ); 343 352 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ); 344 345 #endif // DECLARATION_H346 353 347 354 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.