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