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

guardtimeout.cpp

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

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