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

integerliteral.h

Go to the documentation of this file.
00001 #ifndef INTEGER_LITERAL_H
00002 #define INTEGER_LITERAL_H
00003 #include "expression.h"
00004 
00005 
00006 class IntegerLiteral : public Expression {
00007         private:
00008                 int value;
00009         public:
00010                 IntegerLiteral(SrcPosition *position, int value) : Expression(position), Ast(position), value(value) {}
00011                 IntegerLiteral(const IntegerLiteral& integerLiteral) : Expression(position), Ast(position), value(integerLiteral.value) {}
00012                 virtual ~IntegerLiteral() {}
00013 
00014                 int getValue() const {
00015                         return this->value;
00016                 }
00017 
00018                 virtual Ast& operator = (const Ast& ast);
00019 
00020                 virtual bool operator == (const Ast& ast) const;
00021                 
00022                 virtual VisitorReturn *visit(Visitor& visitor) {
00023                         return visitor.visitIntegerLiteral(this);
00024                 }
00025 
00026                 virtual Ast& clone() const {
00027                         return *(new IntegerLiteral(new SrcPosition(*this->position), this->value));
00028                 }
00029 };
00030 
00031 #endif

Generated on Mon Dec 1 17:00:22 2003 for Protomake by doxygen1.3