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

StringLiteral Class Reference

#include <stringliteral.h>

Inheritance diagram for StringLiteral:

Inheritance graph
[legend]
Collaboration diagram for StringLiteral:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 StringLiteral (SrcPosition *position, string str)
 StringLiteral (const StringLiteral &stringLiteral)
virtual ~StringLiteral ()
string getStr () const
virtual Astoperator= (const Ast &ast)
virtual bool operator== (const Ast &ast) const
virtual VisitorReturnvisit (Visitor &visitor)
virtual Astclone () const

Private Attributes

string str

Constructor & Destructor Documentation

StringLiteral::StringLiteral SrcPosition position,
string  str
[inline]
 

Definition at line 12 of file stringliteral.h.

Referenced by clone().

00012 : Expression(position), Ast(position), str(str) {}

StringLiteral::StringLiteral const StringLiteral &  stringLiteral  )  [inline]
 

Definition at line 13 of file stringliteral.h.

References Ast::position.

00013 : Expression(position), Ast(position), str(stringLiteral.str) {}

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

Definition at line 14 of file stringliteral.h.

00014 {}


Member Function Documentation

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

Implements Ast.

Definition at line 28 of file stringliteral.h.

References StringLiteral().

Referenced by SimpleFieldDeclaration::clone(), SimpleImport::operator=(), and SimpleFieldDeclaration::operator=().

00028                                            {
00029                         return *(new StringLiteral(new SrcPosition(*this->position), this->str));
00030                 }

string StringLiteral::getStr  )  const [inline]
 

Definition at line 16 of file stringliteral.h.

00016                                       {
00017                         return this->str;
00018                 }

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

Reimplemented from Expression.

Definition at line 3 of file stringliteral.cpp.

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

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

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

Reimplemented from Expression.

Definition at line 13 of file stringliteral.cpp.

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

00013                                                      {
00014         const StringLiteral& stringLiteral = dynamic_cast<const StringLiteral&>(ast);
00015         return this->str == stringLiteral.str && Expression::operator==(ast);
00016 }

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

Implements Ast.

Definition at line 24 of file stringliteral.h.

References Visitor::visitStringLiteral().

00024                                                                {
00025                         return visitor.visitStringLiteral(this);
00026                 }


Member Data Documentation

string StringLiteral::str [private]
 

Definition at line 10 of file stringliteral.h.

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


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