#include <simplebehavior.h>
Inheritance diagram for SimpleBehavior:
Public Member Functions | |
SimpleBehavior (SrcPosition *position, IdentifierList *identifierList) | |
SimpleBehavior (const SimpleBehavior &simpleBehavior) | |
virtual | ~SimpleBehavior () |
IdentifierList * | getIdentifierList () |
virtual Ast & | operator= (const Ast &ast) |
virtual bool | operator== (const Ast &ast) const |
virtual VisitorReturn * | visit (Visitor &visitor) |
virtual Ast & | clone () const |
Private Attributes | |
IdentifierList * | identifierList |
|
Definition at line 12 of file simplebehavior.h. Referenced by clone().
00013 : Behavior(position), identifierList(identifierList) {} |
|
Definition at line 15 of file simplebehavior.h. References Ast::position.
|
|
Definition at line 19 of file simplebehavior.h.
00019 { 00020 delete this->identifierList; 00021 } |
|
Implements Ast. Definition at line 34 of file simplebehavior.h. References SimpleBehavior(). Referenced by SequentialBehavior::clone(), and SequentialBehavior::operator=().
00034 { 00035 return *(new SimpleBehavior(new SrcPosition(*(this->position)), 00036 this->identifierList ? dynamic_cast<IdentifierList*>(&(this->identifierList->clone())) : 0)); 00037 } |
|
Definition at line 23 of file simplebehavior.h. Referenced by TypeCheckerVisitor::visitSimpleBehavior().
00023 { 00024 return this->identifierList; 00025 } |
|
Reimplemented from Behavior. Definition at line 5 of file simplebehavior.cpp. References Ast::clone(), identifierList, and Behavior::operator=().
00005 { 00006 const SimpleBehavior& simpleBehavior = dynamic_cast<const SimpleBehavior&>(ast); 00007 00008 Behavior::operator=(ast); 00009 this->identifierList = simpleBehavior.identifierList ? dynamic_cast<IdentifierList*>(&(simpleBehavior.identifierList->clone())) : 0; 00010 00011 return *(this); 00012 } |
|
Reimplemented from Behavior. Definition at line 14 of file simplebehavior.cpp. References identifierList, and Behavior::operator==().
00014 { 00015 bool result = false; 00016 const SimpleBehavior& simpleBehavior = dynamic_cast<const SimpleBehavior&>(ast); 00017 00018 if (typeid(ast) != typeid(SimpleBehavior)) 00019 return false; 00020 00021 if (this->identifierList) 00022 result = (*(this->identifierList) == *(simpleBehavior.identifierList)); 00023 00024 return result && Behavior::operator==(ast); 00025 } |
|
Implements Ast. Definition at line 30 of file simplebehavior.h. References Visitor::visitSimpleBehavior(). Referenced by TypeCheckerVisitor::visitSequentialBehavior().
00030 { 00031 return visitor.visitSimpleBehavior(this); 00032 } |
|
Definition at line 9 of file simplebehavior.h. Referenced by operator=(), and operator==(). |