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

sendstatement.h

Go to the documentation of this file.
00001 #ifndef SEND_STATEMENT_H
00002 #define SEND_STATEMENT_H
00003 
00004 #include "simplestatement.h"
00005 #include "identifier.h"
00006 
00007 class SendStatement : public SimpleStatement {
00008         private:
00009                 Identifier *msgId;
00010                 Identifier *addrId;
00011                 bool tcp;
00012 
00013         public:
00014                 SendStatement(SrcPosition *position, Identifier *msgId, Identifier *addrId, bool tcp)
00015                                 : SimpleStatement(position), msgId(msgId), addrId(addrId), tcp(tcp) {}
00016 
00017                 SendStatement(const SendStatement& sendStatement) : SimpleStatement(sendStatement.position){
00018                         (*this) = sendStatement;
00019                 }
00020 
00021                 virtual ~SendStatement() {
00022                         delete this->msgId;
00023                         delete this->addrId;
00024                 }
00025 
00026                 Identifier *getMsgId() {
00027                         return this->msgId;
00028                 }
00029 
00030                 Identifier *getAddrId() {
00031                         return this->addrId;
00032                 }
00033 
00034                 bool isTcp() const {
00035                         return this->tcp;
00036                 }
00037 
00038                 virtual Ast& operator = (const Ast& ast);
00039 
00040                 virtual bool operator == (const Ast& ast) const;
00041 
00042                 virtual VisitorReturn *visit(Visitor& visitor) {
00043                         return visitor.visitSendStatement(this);
00044                 }
00045 
00046                 virtual Ast& clone() const {
00047                         return *(new SendStatement(new SrcPosition(*this->position),
00048                                                         this->msgId ? dynamic_cast<Identifier*>(&(this->msgId->clone())): 0,
00049                                                         this->addrId ? dynamic_cast<Identifier*>(&(this->addrId->clone())): 0,
00050                                                         this->tcp));
00051                 }
00052 };
00053 
00054 #endif

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