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

SimpleImport Class Reference

#include <simpleimport.h>

Inheritance diagram for SimpleImport:

Inheritance graph
[legend]
Collaboration diagram for SimpleImport:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SimpleImport (SrcPosition *position, StringLiteral *stringLiteral)
 SimpleImport (const SimpleImport &simpleImport)
virtual ~SimpleImport ()
StringLiteralgetStringLiteral ()
virtual Astoperator= (const Ast &ast)
virtual bool operator== (const Ast &ast) const
virtual VisitorReturnvisit (Visitor &visitor)
virtual Astclone () const

Private Attributes

StringLiteralstringLiteral

Constructor & Destructor Documentation

SimpleImport::SimpleImport SrcPosition position,
StringLiteral stringLiteral
[inline]
 

Definition at line 12 of file simpleimport.h.

Referenced by clone().

00013                         : Import(position), stringLiteral(stringLiteral) {}

SimpleImport::SimpleImport const SimpleImport &  simpleImport  )  [inline]
 

Definition at line 15 of file simpleimport.h.

References Ast::position.

00015                                                                : Import(simpleImport.position) {
00016                         *(this) = simpleImport;
00017                 }

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

Definition at line 19 of file simpleimport.h.

00019                                         {
00020                         delete this->stringLiteral;
00021                 }


Member Function Documentation

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

Implements Ast.

Definition at line 34 of file simpleimport.h.

References SimpleImport().

Referenced by SequentialImport::clone(), and SequentialImport::operator=().

00034                                            {
00035                         return *(new SimpleImport(new SrcPosition(*(this->position)),
00036                                          this->stringLiteral ? dynamic_cast<StringLiteral*>(&(this->stringLiteral->clone())) : 0));
00037                 }

StringLiteral* SimpleImport::getStringLiteral  )  [inline]
 

Definition at line 23 of file simpleimport.h.

00023                                                   {
00024                         return this->stringLiteral;
00025                 }

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

Reimplemented from Import.

Definition at line 5 of file simpleimport.cpp.

References StringLiteral::clone(), Import::operator=(), and stringLiteral.

00005                                              {
00006         const SimpleImport& simpleImport = dynamic_cast<const SimpleImport&>(ast);
00007 
00008         Import::operator=(ast);
00009         this->stringLiteral = simpleImport.stringLiteral ? dynamic_cast<StringLiteral*>(&(simpleImport.stringLiteral->clone())) : 0;
00010 
00011         return *(this);
00012 }

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

Reimplemented from Import.

Definition at line 14 of file simpleimport.cpp.

References Import::operator==(), and stringLiteral.

00014                                                     {
00015         bool result = false;
00016         const SimpleImport& simpleImport = dynamic_cast<const SimpleImport&>(ast);
00017 
00018         if (typeid(ast) != typeid(SimpleImport))
00019                 return false;
00020 
00021         if (this->stringLiteral)
00022                 result = (*(this->stringLiteral) == *(simpleImport.stringLiteral));
00023 
00024         return result && Import::operator==(ast);
00025 }

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

Implements Ast.

Definition at line 30 of file simpleimport.h.

References Visitor::visitSimpleImport().

Referenced by TypeCheckerVisitor::visitSequentialImport().

00030                                                                {
00031                         return visitor.visitSimpleImport(this);
00032                 }


Member Data Documentation

StringLiteral* SimpleImport::stringLiteral [private]
 

Definition at line 9 of file simpleimport.h.

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


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