Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

stringliteral.h

Go to the documentation of this file.
00001 #ifndef STRING_LITERAL_H
00002 #define STRING_LITERAL_H
00003 #include "expression.h"
00004 #include <string>
00005 
00006 using namespace std;
00007 
00008 class StringLiteral : public Expression {
00009         private:
00010                 string str;
00011         public:
00012                 StringLiteral(SrcPosition *position, string str) : Expression(position), Ast(position), str(str) {}
00013                 StringLiteral(const StringLiteral& stringLiteral) : Expression(position), Ast(position), str(stringLiteral.str) {}
00014                 virtual ~StringLiteral() {}
00015 
00016                 string getStr() const {
00017                         return this->str;
00018                 }
00019 
00020                 virtual Ast& operator = (const Ast& ast);
00021 
00022                 virtual bool operator == (const Ast& ast) const;
00023                 
00024                 virtual VisitorReturn *visit(Visitor& visitor) {
00025                         return visitor.visitStringLiteral(this);
00026                 }
00027 
00028                 virtual Ast& clone() const {
00029                         return *(new StringLiteral(new SrcPosition(*this->position), this->str));
00030                 }
00031 };
00032 
00033 #endif

Generated on Mon Dec 1 17:36:38 2003 for Protomake by doxygen1.3