Changeset 44a81853 for src/SynTree
- Timestamp:
- Jan 18, 2017, 4:57:52 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:
- 5ded739
- Parents:
- 1267fb1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/SynTree/Attribute.h ¶
r1267fb1 r44a81853 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 06 16:26:12 201613 // Update Count : 3 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jan 18 16:27:11 2017 13 // Update Count : 38 14 14 // 15 15 … … 23 23 class Attribute { 24 24 public: 25 26 27 25 Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {} 26 Attribute( const Attribute &other ); 27 virtual ~Attribute(); 28 28 29 30 31 32 29 std::string get_name() const { return name; } 30 void set_name( const std::string & newValue ) { name = newValue; } 31 std::list< Expression * > & get_parameters() { return parameters; } 32 bool empty() const { return name == ""; } 33 33 34 Attribute * clone() const { return new Attribute( *this ); } 35 void print( std:: ostream &os, int indent = 0 ) const; 36 34 Attribute * clone() const { return new Attribute( *this ); } 35 void print( std:: ostream &os, int indent = 0 ) const; 37 36 private: 38 39 40 37 std::string name; 38 // to keep things nice and tight, use NameExpr for special identifier parameters 39 std::list< Expression * > parameters; 41 40 }; 42 41 43 42 #endif 43 44 // Local Variables: // 45 // tab-width: 4 // 46 // mode: c++ // 47 // compile-command: "make install" // 48 // End: //
Note: See TracChangeset
for help on using the changeset viewer.