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

IntegerLiteral Class Reference

#include <integerliteral.h>

Inheritance diagram for IntegerLiteral:

Inheritance graph
[legend]
Collaboration diagram for IntegerLiteral:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IntegerLiteral (SrcPosition *position, int value)
 IntegerLiteral (const IntegerLiteral &integerLiteral)
virtual ~IntegerLiteral ()
int getValue () const
virtual Astoperator= (const Ast &ast)
virtual bool operator== (const Ast &ast) const
virtual VisitorReturnvisit (Visitor &visitor)
virtual Astclone () const

Private Attributes

int value

Constructor & Destructor Documentation

IntegerLiteral::IntegerLiteral SrcPosition position,
int  value
[inline]
 

Definition at line 10 of file integerliteral.h.

Referenced by clone().

00010 : Expression(position), Ast(position), value(value) {}

IntegerLiteral::IntegerLiteral const IntegerLiteral &  integerLiteral  )  [inline]
 

Definition at line 11 of file integerliteral.h.

References Ast::position.

00011 : Expression(position), Ast(position), value(integerLiteral.value) {}

virtual IntegerLiteral::~IntegerLiteral  )  [inline, virtual]
 

Definition at line 12 of file integerliteral.h.

00012 {}


Member Function Documentation

virtual Ast& IntegerLiteral::clone  )  const [inline, virtual]
 

Implements Ast.

Definition at line 26 of file integerliteral.h.

References IntegerLiteral().

00026                                            {
00027                         return *(new IntegerLiteral(new SrcPosition(*this->position), this->value));
00028                 }

int IntegerLiteral::getValue  )  const [inline]
 

Definition at line 14 of file integerliteral.h.

Referenced by TypeCheckerVisitor::visitFieldType().

00014                                      {
00015                         return this->value;
00016                 }

Ast & IntegerLiteral::operator= const Ast ast  )  [virtual]
 

Reimplemented from Expression.

Definition at line 3 of file integerliteral.cpp.

References Expression::operator=(), and value.

00003                                                {
00004         const IntegerLiteral& integerLiteral = dynamic_cast<const IntegerLiteral&>(ast);
00005 
00006         Expression::operator=(ast);
00007         this->value = integerLiteral.value;
00008 
00009         return (*this);
00010 }

bool IntegerLiteral::operator== const Ast ast  )  const [virtual]
 

Reimplemented from Expression.

Definition at line 13 of file integerliteral.cpp.

References Expression::operator==(), and value.

00013                                                       {
00014         const IntegerLiteral& integerLiteral = dynamic_cast<const IntegerLiteral&>(ast);
00015         return this->value == integerLiteral.value && Expression::operator==(ast);
00016 }

virtual VisitorReturn* IntegerLiteral::visit Visitor visitor  )  [inline, virtual]
 

Implements Ast.

Definition at line 22 of file integerliteral.h.

References Visitor::visitIntegerLiteral().

00022                                                                {
00023                         return visitor.visitIntegerLiteral(this);
00024                 }


Member Data Documentation

int IntegerLiteral::value [private]
 

Definition at line 8 of file integerliteral.h.

Referenced by operator=(), and operator==().


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 17:39:07 2003 for Protomake by doxygen1.3