00001 // Author: Markus Schordan 00002 // $Id: AstTextAttributesHandling.h,v 1.2 2006/04/24 00:21:32 dquinlan Exp $ 00003 00004 #ifndef ASTTEXTATTRIBUTEHANDLING_H 00005 #define ASTTEXTATTRIBUTEHANDLING_H 00006 00007 #include <string> 00008 #include <sstream> 00009 #include <iomanip> 00010 00011 #include "Cxx_Grammar.h" 00012 #include "AstProcessing.h" 00013 00014 class AstTextAttribute : public AstAttribute { 00015 public: 00016 AstTextAttribute(std::string s) : source(s) {} 00017 virtual std::string toString() { return source; } 00018 protected: 00019 std::string source; 00020 }; 00021 00022 class AstTextAttributesHandling : public SgSimpleProcessing { 00023 public: 00024 AstTextAttributesHandling(SgProject* p); 00025 ~AstTextAttributesHandling(); 00026 void setAll(); 00027 void removeAll(); 00028 protected: 00029 enum {M_set, M_remove} mode; 00030 virtual void visit(SgNode* node); 00031 SgProject* projectnode; 00032 }; 00033 00034 #endif
1.4.7