Changes in src/SynTree/Declaration.h [6b0b624:fa4805f]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r6b0b624 rfa4805f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 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 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 17 18 18 19 #include <string> … … 265 266 typedef AggregateDecl Parent; 266 267 public: 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 : "" ) {} 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 ) {} 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 Excetion276 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 281 275 virtual StructDecl *clone() const { return new StructDecl( *this ); } 282 276 virtual void accept( Visitor &v ) { v.visit( this ); } … … 285 279 DeclarationNode::Aggregate kind; 286 280 virtual std::string typeString() const; 287 288 bool tagged;289 std::string parent_name;290 281 }; 291 282 … … 351 342 std::ostream & operator<<( std::ostream & out, const Declaration * decl ); 352 343 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ); 344 345 #endif // DECLARATION_H 353 346 354 347 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.