MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OneToOneMsg.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-2009 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_ONE_MSG_H
11 #define _ONE_TO_ONE_MSG_H
12 
22 class OneToOneMsg: public Msg
23 {
24  friend unsigned int Msg::initMsgManagers(); // for initializing Id.
25  public:
26  OneToOneMsg( const Eref& e1, const Eref& e2, unsigned int msgIndex);
27  ~OneToOneMsg();
28 
29  Eref firstTgt( const Eref& src ) const;
30 
31  void sources( vector< vector< Eref > >& v ) const;
32  void targets( vector< vector< Eref > >& v ) const;
33 
34  Id managerId() const;
35 
36  ObjId findOtherEnd( ObjId end ) const;
37 
38  Msg* copy( Id origSrc, Id newSrc, Id newTgt,
39  FuncId fid, unsigned int b, unsigned int n ) const;
40 
42  static unsigned int numMsg();
43  static char* lookupMsg( unsigned int index );
44 
46  static const Cinfo* initCinfo();
47  private:
50  static Id managerId_;
51  static vector< OneToOneMsg* > msg_;
52 };
53 
54 #endif // _ONE_TO_ONE_MSG_H
Element * e2() const
Definition: Msg.h:68
static Id managerId_
Definition: OneToOneMsg.h:50
Id managerId() const
Msg * copy(Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const
void sources(vector< vector< Eref > > &v) const
Definition: OneToOneMsg.cpp:60
ObjId findOtherEnd(ObjId end) const
Definition: ObjId.h:20
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
static vector< OneToOneMsg * > msg_
Definition: OneToOneMsg.h:51
static unsigned int numMsg()
Msg lookup functions.
DataId i2_
Definition: OneToOneMsg.h:49
static char * lookupMsg(unsigned int index)
Static function for Msg access.
Definition: Eref.h:26
OneToOneMsg(const Eref &e1, const Eref &e2, unsigned int msgIndex)
Definition: OneToOneMsg.cpp:17
Definition: Msg.h:18
Element * e1() const
Definition: Msg.h:61
static unsigned int initMsgManagers()
Definition: Msg.cpp:236
Definition: Id.h:17
Eref firstTgt(const Eref &src) const
Definition: OneToOneMsg.cpp:46
void targets(vector< vector< Eref > > &v) const
Definition: OneToOneMsg.cpp:85
unsigned int FuncId
Definition: header.h:42
unsigned int DataId
Definition: header.h:47
Definition: Cinfo.h:18
DataId i1_
Definition: OneToOneMsg.h:48