MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OneToAllMsg.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2003-2010 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #ifndef _ONE_TO_ALL_MSG_H
11 #define _ONE_TO_ALL_MSG_H
12 
18 class OneToAllMsg: public Msg
19 {
20  friend unsigned int Msg::initMsgManagers(); // for initializing Id.
21  friend void testGetMsgs(); // test func
22  public:
23  OneToAllMsg( Eref e1, Element* e2, unsigned int msgIndex );
24  ~OneToAllMsg();
25 
26  Eref firstTgt( const Eref& src ) const;
27 
28  void sources( vector< vector< Eref > >& v ) const;
29  void targets( vector< vector< Eref > >& v ) const;
30 
31  Id managerId() const;
32 
33  ObjId findOtherEnd( ObjId end ) const;
34 
35  Msg* copy( Id origSrc, Id newSrc, Id newTgt,
36  FuncId fid, unsigned int b, unsigned int n ) const;
37 
39  DataId getI1() const;
40  void setI1( DataId i1 );
41 
43  static unsigned int numMsg();
44  static char* lookupMsg( unsigned int index );
45 
47  static const Cinfo* initCinfo();
48  private:
50  static Id managerId_;
51  static vector< OneToAllMsg* > msg_;
52 };
53 
54 
55 #endif // _ONE_TO_ALL_MSG_H
static char * lookupMsg(unsigned int index)
Static function for Msg access.
Element * e2() const
Definition: Msg.h:68
Id managerId() const
Definition: OneToAllMsg.cpp:64
DataId getI1() const
Return the first DataId.
Eref firstTgt(const Eref &src) const
Definition: OneToAllMsg.cpp:40
void setI1(DataId i1)
Definition: ObjId.h:20
DataId i1_
Definition: OneToAllMsg.h:49
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
Msg * copy(Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const
Definition: OneToAllMsg.cpp:81
static Id managerId_
Definition: OneToAllMsg.h:50
OneToAllMsg(Eref e1, Element *e2, unsigned int msgIndex)
Definition: OneToAllMsg.cpp:17
Definition: Eref.h:26
static vector< OneToAllMsg * > msg_
Definition: OneToAllMsg.h:51
Definition: Msg.h:18
Element * e1() const
Definition: Msg.h:61
static unsigned int initMsgManagers()
Definition: Msg.cpp:236
ObjId findOtherEnd(ObjId end) const
Definition: OneToAllMsg.cpp:69
Definition: Id.h:17
void sources(vector< vector< Eref > > &v) const
Definition: OneToAllMsg.cpp:49
unsigned int FuncId
Definition: header.h:42
unsigned int DataId
Definition: header.h:47
Definition: Cinfo.h:18
void targets(vector< vector< Eref > > &v) const
Definition: OneToAllMsg.cpp:57
static unsigned int numMsg()
Assign the first DataId.
friend void testGetMsgs()
Definition: testShell.cpp:1518