#include <simpleimport.h>
Inheritance diagram for SimpleImport:
Public Member Functions | |
SimpleImport (SrcPosition *position, StringLiteral *stringLiteral) | |
SimpleImport (const SimpleImport &simpleImport) | |
virtual | ~SimpleImport () |
StringLiteral * | getStringLiteral () |
virtual Ast & | operator= (const Ast &ast) |
virtual bool | operator== (const Ast &ast) const |
virtual VisitorReturn * | visit (Visitor &visitor) |
virtual Ast & | clone () const |
Private Attributes | |
StringLiteral * | stringLiteral |
|
Definition at line 12 of file simpleimport.h. Referenced by clone().
00013 : Import(position), stringLiteral(stringLiteral) {} |
|
Definition at line 15 of file simpleimport.h. References Ast::position.
|
|
Definition at line 19 of file simpleimport.h.
00019 { 00020 delete this->stringLiteral; 00021 } |
|
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 } |
|
Definition at line 23 of file simpleimport.h.
00023 { 00024 return this->stringLiteral; 00025 } |
|
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 } |
|
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 } |
|
Implements Ast. Definition at line 30 of file simpleimport.h. References Visitor::visitSimpleImport(). Referenced by TypeCheckerVisitor::visitSequentialImport().
00030 { 00031 return visitor.visitSimpleImport(this); 00032 } |
|
Definition at line 9 of file simpleimport.h. Referenced by operator=(), and operator==(). |