Changes in src/SynTree/Declaration.h [6ea87486:67cf18c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r6ea87486 r67cf18c 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri Jul 14 16:59:00201713 // Update Count : 12 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 17 16:05:08 2017 13 // Update Count : 121 14 14 // 15 15 … … 238 238 typedef Declaration Parent; 239 239 public: 240 AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() , LinkageSpec::Spec linkage = LinkageSpec::Cforall);240 AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ); 241 241 AggregateDecl( const AggregateDecl &other ); 242 242 virtual ~AggregateDecl(); … … 266 266 typedef AggregateDecl Parent; 267 267 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 ), tagged( false ), parent_name( "" ) {} 269 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 * >() ) : Parent( name, attributes ), kind( kind ) {} 270 269 StructDecl( const StructDecl &other ) : Parent( other ) {} 271 270 … … 274 273 bool is_thread() { return kind == DeclarationNode::Thread; } 275 274 276 // Tagged/Tree Structure Excetion277 bool get_tagged() { return tagged; }278 void set_tagged( bool newValue ) { tagged = newValue; }279 bool has_parent() { return parent_name != ""; }280 std::string get_parentName() { return parent_name; }281 282 275 virtual StructDecl *clone() const { return new StructDecl( *this ); } 283 276 virtual void accept( Visitor &v ) { v.visit( this ); } … … 286 279 DeclarationNode::Aggregate kind; 287 280 virtual std::string typeString() const; 288 289 bool tagged;290 std::string parent_name;291 281 }; 292 282 … … 294 284 typedef AggregateDecl Parent; 295 285 public: 296 UnionDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() , LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage) {}286 UnionDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {} 297 287 UnionDecl( const UnionDecl &other ) : Parent( other ) {} 298 288 … … 307 297 typedef AggregateDecl Parent; 308 298 public: 309 EnumDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() , LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage) {}299 EnumDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {} 310 300 EnumDecl( const EnumDecl &other ) : Parent( other ) {} 311 301
Note:
See TracChangeset
for help on using the changeset viewer.