00001 /********************************************************************** 00002 ** This program is part of 'MOOSE', the 00003 ** Messaging Object Oriented Simulation Environment. 00004 ** Copyright (C) 2003-2009 Upinder S. Bhalla. and NCBS 00005 ** It is made available under the terms of the 00006 ** GNU Lesser General Public License version 2.1 00007 ** See the file COPYING.LIB for the full notice. 00008 **********************************************************************/ 00009 00010 #ifndef _ONE_TO_ONE_DATA_INDEX_MSG_H 00011 #define _ONE_TO_ONE_DATA_INDEX_MSG_H 00012 00022 class OneToOneDataIndexMsg: public Msg 00023 { 00024 friend unsigned int Msg::initMsgManagers(); // for initializing Id. 00025 public: 00026 OneToOneDataIndexMsg( const Eref& e1, const Eref& e2, unsigned int msgIndex); 00027 ~OneToOneDataIndexMsg(); 00028 00029 Eref firstTgt( const Eref& src ) const; 00030 00031 void sources( vector< vector< Eref > >& v ) const; 00032 void targets( vector< vector< Eref > >& v ) const; 00033 00034 Id managerId() const; 00035 00036 ObjId findOtherEnd( ObjId end ) const; 00037 00038 Msg* copy( Id origSrc, Id newSrc, Id newTgt, 00039 FuncId fid, unsigned int b, unsigned int n ) const; 00040 00042 static unsigned int numMsg(); 00043 static char* lookupMsg( unsigned int index ); 00044 00046 static const Cinfo* initCinfo(); 00047 private: 00048 static Id managerId_; 00049 static vector< OneToOneDataIndexMsg* > msg_; 00050 }; 00051 00052 #endif // _ONE_TO_ONE_DATA_INDEX_MSG_H