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

dostatement.cpp

Go to the documentation of this file.
00001 #include <typeinfo>
00002 #include "dostatement.h"
00003 using namespace std;
00004 
00005 Ast& DoStatement::operator = (const Ast& ast) {
00006         const DoStatement& doStatement = dynamic_cast<const DoStatement&>(ast);
00007 
00008         Ast::operator=(ast);
00009         this->guardedStatement = doStatement.guardedStatement ? dynamic_cast<GuardedStatement*>(&(doStatement.guardedStatement->clone())) : 0;
00010 
00011         return *(this);
00012 }
00013 
00014 bool DoStatement::operator == (const Ast& ast) const {
00015         bool result = false;
00016         const DoStatement& doStatement = dynamic_cast<const DoStatement&>(ast);
00017 
00018         if (typeid(ast) != typeid(DoStatement))
00019                 return false;
00020 
00021         if (this->guardedStatement)
00022                 result = (*(this->guardedStatement) == *(doStatement.guardedStatement));
00023 
00024         return result;
00025 }
00026 

Generated on Mon Dec 1 17:00:22 2003 for Protomake by doxygen1.3