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

receivestatement.cpp

Go to the documentation of this file.
00001 #include "receivestatement.h"
00002 
00003 Ast& ReceiveStatement::operator = (const Ast& ast) {
00004         const ReceiveStatement& receiveStatement = dynamic_cast<const ReceiveStatement&>(ast);
00005 
00006         Statement::operator=(ast);
00007 
00008         this->msgId = receiveStatement.msgId ? dynamic_cast<Identifier*>(&(receiveStatement.msgId->clone())) : 0;
00009         this->addrId = receiveStatement.addrId ? dynamic_cast<Identifier*>(&(receiveStatement.addrId->clone())) : 0;
00010         this->tcp = receiveStatement.tcp;
00011 
00012         return (*this);
00013 }
00014 
00015 bool ReceiveStatement::operator == (const Ast& ast) const {
00016         const ReceiveStatement& receiveStatement = dynamic_cast<const ReceiveStatement&>(ast);
00017 
00018         bool result = false;
00019         if(this->msgId && this->addrId) {
00020                 result = (*(this->msgId) == *(receiveStatement.msgId) && 
00021                                          *(this->addrId) == *(receiveStatement.addrId) &&
00022                                          this->tcp == receiveStatement.tcp);
00023         }
00024         
00025         return result && Statement::operator==(ast);
00026 }

Generated on Mon Dec 1 17:36:37 2003 for Protomake by doxygen1.3