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

SendStatement Class Reference

#include <sendstatement.h>

Inheritance diagram for SendStatement:

Inheritance graph
[legend]
Collaboration diagram for SendStatement:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SendStatement (SrcPosition *position, Identifier *msgId, Identifier *addrId, bool tcp)
 SendStatement (const SendStatement &sendStatement)
virtual ~SendStatement ()
IdentifiergetMsgId ()
IdentifiergetAddrId ()
bool isTcp () const
virtual Astoperator= (const Ast &ast)
virtual bool operator== (const Ast &ast) const
virtual VisitorReturnvisit (Visitor &visitor)
virtual Astclone () const

Private Attributes

IdentifiermsgId
IdentifieraddrId
bool tcp

Constructor & Destructor Documentation

SendStatement::SendStatement SrcPosition position,
Identifier msgId,
Identifier addrId,
bool  tcp
[inline]
 

Definition at line 14 of file sendstatement.h.

Referenced by clone().

00015                                 : SimpleStatement(position), msgId(msgId), addrId(addrId), tcp(tcp) {}

SendStatement::SendStatement const SendStatement &  sendStatement  )  [inline]
 

Definition at line 17 of file sendstatement.h.

References Ast::position.

00017                                                                   : SimpleStatement(sendStatement.position){
00018                         (*this) = sendStatement;
00019                 }

virtual SendStatement::~SendStatement  )  [inline, virtual]
 

Definition at line 21 of file sendstatement.h.

00021                                          {
00022                         delete this->msgId;
00023                         delete this->addrId;
00024                 }


Member Function Documentation

virtual Ast& SendStatement::clone  )  const [inline, virtual]
 

Implements Ast.

Definition at line 46 of file sendstatement.h.

References Identifier::clone(), and SendStatement().

00046                                            {
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                 }

Identifier* SendStatement::getAddrId  )  [inline]
 

Definition at line 30 of file sendstatement.h.

Referenced by TypeCheckerVisitor::visitSendStatement().

00030                                         {
00031                         return this->addrId;
00032                 }

Identifier* SendStatement::getMsgId  )  [inline]
 

Definition at line 26 of file sendstatement.h.

Referenced by TypeCheckerVisitor::visitSendStatement().

00026                                        {
00027                         return this->msgId;
00028                 }

bool SendStatement::isTcp  )  const [inline]
 

Definition at line 34 of file sendstatement.h.

00034                                    {
00035                         return this->tcp;
00036                 }

Ast & SendStatement::operator= const Ast ast  )  [virtual]
 

Reimplemented from SimpleStatement.

Definition at line 3 of file sendstatement.cpp.

References addrId, Identifier::clone(), msgId, Statement::operator=(), and tcp.

00003                                               {
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 }

bool SendStatement::operator== const Ast ast  )  const [virtual]
 

Reimplemented from SimpleStatement.

Definition at line 15 of file sendstatement.cpp.

References addrId, msgId, Statement::operator==(), and tcp.

00015                                                      {
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 }

virtual VisitorReturn* SendStatement::visit Visitor visitor  )  [inline, virtual]
 

Implements Ast.

Definition at line 42 of file sendstatement.h.

References Visitor::visitSendStatement().

00042                                                                {
00043                         return visitor.visitSendStatement(this);
00044                 }


Member Data Documentation

Identifier* SendStatement::addrId [private]
 

Definition at line 10 of file sendstatement.h.

Referenced by operator=(), and operator==().

Identifier* SendStatement::msgId [private]
 

Definition at line 9 of file sendstatement.h.

Referenced by operator=(), and operator==().

bool SendStatement::tcp [private]
 

Definition at line 11 of file sendstatement.h.

Referenced by operator=(), and operator==().


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 17:39:13 2003 for Protomake by doxygen1.3