#include <simpleaction.h>
Inheritance diagram for SimpleAction:
Public Member Functions | |
SimpleAction (SrcPosition *position, Guard *guard, Statement *statement) | |
SimpleAction (const SimpleAction &simpleAction) | |
virtual | ~SimpleAction () |
Guard * | getGuard () |
Statement * | getStatement () |
virtual Ast & | operator= (const Ast &ast) |
virtual bool | operator== (const Ast &ast) const |
virtual VisitorReturn * | visit (Visitor &visitor) |
virtual Ast & | clone () const |
Private Attributes | |
Guard * | guard |
Statement * | statement |
|
Definition at line 14 of file simpleaction.h. Referenced by clone().
|
|
Definition at line 17 of file simpleaction.h. References Ast::position.
|
|
Definition at line 21 of file simpleaction.h.
|
|
Implements Ast. Definition at line 41 of file simpleaction.h. References Ast::clone(), and SimpleAction(). Referenced by SequentialAction::clone(), and SequentialAction::operator=().
00041 { 00042 return *(new SimpleAction(new SrcPosition(*(this->position)), 00043 this->guard ? dynamic_cast<Guard*>(&(this->guard->clone())) : 0, 00044 this->statement ? dynamic_cast<Statement*>(&(this->statement->clone())) : 0)); 00045 } |
|
Definition at line 26 of file simpleaction.h. Referenced by TypeCheckerVisitor::visitSimpleAction().
00026 { 00027 return this->guard; 00028 } |
|
Definition at line 30 of file simpleaction.h. Referenced by TypeCheckerVisitor::visitSimpleAction().
00030 { 00031 return this->statement; 00032 } |
|
Reimplemented from Action. Definition at line 5 of file simpleaction.cpp. References Ast::clone(), guard, Action::operator=(), and statement.
00005 { 00006 const SimpleAction& simpleAction = dynamic_cast<const SimpleAction&>(ast); 00007 00008 Action::operator=(ast); 00009 this->guard = simpleAction.guard ? dynamic_cast<Guard*>(&(simpleAction.guard->clone())) : 0; 00010 this->statement = simpleAction.statement ? dynamic_cast<Statement*>(&(simpleAction.statement->clone())) : 0; 00011 00012 return *(this); 00013 } |
|
Reimplemented from Action. Definition at line 15 of file simpleaction.cpp. References guard, Action::operator==(), and statement.
00015 { 00016 bool result = false; 00017 const SimpleAction& simpleAction = dynamic_cast<const SimpleAction&>(ast); 00018 00019 if (typeid(ast) != typeid(SimpleAction)) 00020 return false; 00021 00022 if (this->guard && this->statement) 00023 result = (*(this->guard) == *(simpleAction.guard) && 00024 *(this->statement) == *(simpleAction.statement)); 00025 00026 return result && Action::operator==(ast); 00027 } |
|
Implements Ast. Definition at line 37 of file simpleaction.h. References Visitor::visitSimpleAction(). Referenced by TypeCheckerVisitor::visitSequentialAction().
00037 { 00038 return visitor.visitSimpleAction(this); 00039 } |
|
Definition at line 10 of file simpleaction.h. Referenced by operator=(), and operator==(). |
|
Definition at line 11 of file simpleaction.h. Referenced by operator=(), and operator==(). |