Changes in src/SynTree/Declaration.h [fa4805f:6b0b624]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
rfa4805f r6b0b624 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.