00001 /********************************************************************** 00002 ** This program is part of 'MOOSE', the 00003 ** Messaging Object Oriented Simulation Environment. 00004 ** Copyright (C) 2003-2010 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_ALL_MSG_H 00011 #define _ONE_TO_ALL_MSG_H 00012 00018 class OneToAllMsg: public Msg 00019 { 00020 friend unsigned int Msg::initMsgManagers(); // for initializing Id. 00021 friend void testGetMsgs(); // test func 00022 public: 00023 OneToAllMsg( Eref e1, Element* e2, unsigned int msgIndex ); 00024 ~OneToAllMsg(); 00025 00026 Eref firstTgt( const Eref& src ) const; 00027 00028 void sources( vector< vector< Eref > >& v ) const; 00029 void targets( vector< vector< Eref > >& v ) const; 00030 00031 Id managerId() const; 00032 00033 ObjId findOtherEnd( ObjId end ) const; 00034 00035 Msg* copy( Id origSrc, Id newSrc, Id newTgt, 00036 FuncId fid, unsigned int b, unsigned int n ) const; 00037 00039 DataId getI1() const; 00040 void setI1( DataId i1 ); 00041 00043 static unsigned int numMsg(); 00044 static char* lookupMsg( unsigned int index ); 00045 00047 static const Cinfo* initCinfo(); 00048 private: 00049 DataId i1_; 00050 static Id managerId_; 00051 static vector< OneToAllMsg* > msg_; 00052 }; 00053 00054 00055 #endif // _ONE_TO_ALL_MSG_H