cproxygate.h

00001 //=========================================================================
00002 //  CPROXYGATE.H - part of
00003 //
00004 //                  OMNeT++/OMNEST
00005 //           Discrete System Simulation in C++
00006 //
00007 //   Written by:  Andras Varga
00008 //
00009 //=========================================================================
00010 
00011 /*--------------------------------------------------------------*
00012   Copyright (C) 2003-2005 Andras Varga
00013   Monash University, Dept. of Electrical and Computer Systems Eng.
00014   Melbourne, Australia
00015 
00016   This file is distributed WITHOUT ANY WARRANTY. See the file
00017   `license' for details on this and other legal matters.
00018 *--------------------------------------------------------------*/
00019 
00020 #ifndef __CPROXYGATE_H
00021 #define __CPROXYGATE_H
00022 
00023 #include "cgate.h"
00024 
00025 // forward declaration
00026 class cParsimPartition;
00027 
00049 class cProxyGate : public cGate
00050 {
00051   private:
00052     cParsimPartition *partition;
00053     int remoteProcId;
00054     int remoteModuleId;
00055     int remoteGateId;
00056     void *data;
00057 
00058   public:
00064     cProxyGate(const char *name, char tp);
00065 
00069     cProxyGate(const cProxyGate& gate);
00070 
00074     virtual ~cProxyGate()  {}
00076 
00082     virtual cPolymorphic *dup() const   {return new cProxyGate(*this);}
00083 
00087     cProxyGate& operator=(const cProxyGate& gate);
00088 
00092     virtual std::string info() const;
00094 
00104     virtual bool deliver(cMessage *msg, simtime_t at);
00106 
00109 
00113     void setRemoteGate(int procId, int moduleId, int gateId);
00114 
00118     int getRemoteProcId()   {return remoteProcId;}
00119 
00123     int getRemoteModuleId() {return remoteModuleId;}
00124 
00128     int getRemoteGateId()   {return remoteGateId;}
00130 
00136     void setPartition(cParsimPartition *seg) {partition=seg;}
00140     cParsimPartition *getPartition()   {return partition;}
00142 
00150     void setSynchData(void *data) {this->data = data;}
00154     void *getSynchData()   {return data;}
00156 };
00157 
00158 #endif
00159 

Generated on Sat Oct 21 17:48:01 2006 for OMNeT++ Parallel Simulation Support by  doxygen 1.4.6