00001 //========================================================================= 00002 // CPROXYGATE.H - part of 00003 // 00004 // OMNeT++/OMNEST 00005 // Discrete System Simulation in C++ 00006 // 00007 // Author: Andras Varga, 2003 00008 // Dept. of Electrical and Computer Systems Engineering, 00009 // Monash University, Melbourne, Australia 00010 // 00011 //========================================================================= 00012 00013 /*--------------------------------------------------------------* 00014 Copyright (C) 2003-2008 Andras Varga 00015 Copyright (C) 2006-2008 OpenSim Ltd. 00016 00017 This file is distributed WITHOUT ANY WARRANTY. See the file 00018 `license' for details on this and other legal matters. 00019 *--------------------------------------------------------------*/ 00020 00021 #ifndef __CPROXYGATE_H 00022 #define __CPROXYGATE_H 00023 00024 #include "cgate.h" 00025 00026 NAMESPACE_BEGIN 00027 00028 // forward declaration 00029 class cParsimPartition; 00030 00052 class SIM_API cProxyGate : public cGate // noncopyable 00053 { 00054 friend class cPlaceholderModule; 00055 private: 00056 cParsimPartition *partition; 00057 short remoteProcId; 00058 int remoteModuleId; 00059 int remoteGateId; 00060 void *data; 00061 00062 protected: 00063 // internal: constructor is protected because only cPlaceholderModule 00064 // is allowed to create instances 00065 explicit cProxyGate(); 00066 00067 public: 00073 virtual std::string info() const; 00075 00085 virtual bool deliver(cMessage *msg, simtime_t at); 00087 00090 00094 void setRemoteGate(short procId, int moduleId, int gateId); 00095 00099 short getRemoteProcId() {return remoteProcId;} 00100 00104 int getRemoteModuleId() {return remoteModuleId;} 00105 00109 int getRemoteGateId() {return remoteGateId;} 00111 00117 void setPartition(cParsimPartition *seg) {partition=seg;} 00121 cParsimPartition *getPartition() {return partition;} 00123 00131 void setSynchData(void *data) {this->data = data;} 00135 void *getSynchData() {return data;} 00137 }; 00138 00139 NAMESPACE_END 00140 00141 00142 #endif 00143