MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Msg Class Referenceabstract

#include <Msg.h>

+ Inheritance diagram for Msg:
+ Collaboration diagram for Msg:

Public Member Functions

virtual Msgcopy (Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const =0
 
Elemente1 () const
 
Elemente2 () const
 
virtual ObjId findOtherEnd (ObjId) const =0
 
virtual Eref firstTgt (const Eref &src) const =0
 
ObjId getAdjacent (ObjId) const
 
vector< string > getDestFieldsOnE1 () const
 
vector< string > getDestFieldsOnE2 () const
 
Id getE1 () const
 
Id getE2 () const
 
vector< string > getSrcFieldsOnE1 () const
 
vector< string > getSrcFieldsOnE2 () const
 
bool isForward (const Element *src) const
 
ObjId mid () const
 
 Msg (ObjId mid, Element *e1, Element *e2)
 Constructor. More...
 
virtual void sources (vector< vector< Eref > > &v) const =0
 
virtual void targets (vector< vector< Eref > > &v) const =0
 
virtual ~Msg ()
 Destructor. More...
 

Static Public Member Functions

static void clearAllMsgs ()
 
static void deleteMsg (ObjId mid)
 
static const MsggetMsg (ObjId m)
 
static const CinfoinitCinfo ()
 
static unsigned int initMsgManagers ()
 
static bool isLastTrump ()
 True when MOOSE has been terminated and is being cleaned up. More...
 
static const MsglastMsg ()
 

Protected Attributes

Elemente1_
 Index of this Msg on the msg_ vector. More...
 
Elemente2_
 Element 1 attached to Msg. More...
 
ObjId mid_
 

Static Protected Attributes

static bool lastTrump_ = false
 Flag to indicate termination of program. More...
 
static Id msgManagerId_
 Element 2 attached to Msg. More...
 

Static Private Attributes

static const MsglastMsg_ = 0
 

Detailed Description

Manages data flow between two elements. Is always many-to-many, with assorted variants.

Definition at line 18 of file Msg.h.

Constructor & Destructor Documentation

Msg::Msg ( ObjId  mid,
Element e1,
Element e2 
)

Constructor.

Definition at line 30 of file Msg.cpp.

References Element::addMsg(), lastMsg_, and mid_.

31  : mid_( mid), e1_( e1 ), e2_( e2 )
32 {
33  e1->addMsg( mid_ );
34  e2->addMsg( mid_ );
35  lastMsg_ = this;
36 }
void addMsg(ObjId mid)
Definition: Element.cpp:79
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180
ObjId mid_
Definition: Msg.h:178
Element * e2_
Element 1 attached to Msg.
Definition: Msg.h:181
static const Msg * lastMsg_
Definition: Msg.h:192

+ Here is the call graph for this function:

Msg::~Msg ( )
virtual

Destructor.

Definition at line 38 of file Msg.cpp.

References Element::dropMsg(), e1_, e2_, lastTrump_, and mid_.

39 {
40  if ( !lastTrump_ ) {
41  e1_->dropMsg( mid_ );
42  e2_->dropMsg( mid_ );
43  }
44 
45  /*
46  if ( mid_ > 1 )
47  garbageMsg_.push_back( mid_ );
48  */
49 }
void dropMsg(ObjId mid)
Definition: Element.cpp:113
static bool lastTrump_
Flag to indicate termination of program.
Definition: Msg.h:189
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180
ObjId mid_
Definition: Msg.h:178
Element * e2_
Element 1 attached to Msg.
Definition: Msg.h:181

+ Here is the call graph for this function:

Member Function Documentation

void Msg::clearAllMsgs ( )
static

Clears out the Msg data stored in each Msg subtype.

Definition at line 286 of file Msg.cpp.

References lastTrump_, OneToOneMsg::lookupMsg(), OneToAllMsg::lookupMsg(), SingleMsg::lookupMsg(), DiagonalMsg::lookupMsg(), SparseMsg::lookupMsg(), OneToOneMsg::numMsg(), OneToAllMsg::numMsg(), SingleMsg::numMsg(), DiagonalMsg::numMsg(), and SparseMsg::numMsg().

Referenced by finalize(), and main().

287 {
288  lastTrump_ = true;
289  for ( unsigned int i = 0; i < SingleMsg::numMsg(); ++i ) {
290  Msg* m = reinterpret_cast< Msg* >( SingleMsg::lookupMsg( i ) );
291  if ( m ) delete m;
292  }
293  for ( unsigned int i = 0; i < OneToOneMsg::numMsg(); ++i ) {
294  Msg* m = reinterpret_cast< Msg* >( OneToOneMsg::lookupMsg( i ) );
295  if ( m ) delete m;
296  }
297  for ( unsigned int i = 0; i < OneToAllMsg::numMsg(); ++i ) {
298  Msg* m = reinterpret_cast< Msg* >( OneToAllMsg::lookupMsg( i ) );
299  if ( m ) delete m;
300  }
301  for ( unsigned int i = 0; i < DiagonalMsg::numMsg(); ++i ) {
302  Msg* m = reinterpret_cast< Msg* >( DiagonalMsg::lookupMsg( i ) );
303  if ( m ) delete m;
304  }
305  for ( unsigned int i = 0; i < SparseMsg::numMsg(); ++i ) {
306  Msg* m = reinterpret_cast< Msg* >( SparseMsg::lookupMsg( i ) );
307  if ( m ) delete m;
308  }
309 }
static char * lookupMsg(unsigned int index)
Static function for Msg access.
static char * lookupMsg(unsigned int index)
Static function for Msg access.
static unsigned int numMsg()
Msg lookup functions.
static char * lookupMsg(unsigned int index)
Static function for Msg access.
static bool lastTrump_
Flag to indicate termination of program.
Definition: Msg.h:189
static unsigned int numMsg()
Msg lookup functions.
static char * lookupMsg(unsigned int index)
Static function for Msg access.
Definition: SparseMsg.cpp:643
static unsigned int numMsg()
Msg lookup functions.
Definition: SparseMsg.cpp:637
Definition: Msg.h:18
static unsigned int numMsg()
Msg lookup functions.
Definition: SingleMsg.cpp:223
static char * lookupMsg(unsigned int index)
Static function for Msg access.
Definition: SingleMsg.cpp:229
static unsigned int numMsg()
Assign the first DataId.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual Msg* Msg::copy ( Id  origSrc,
Id  newSrc,
Id  newTgt,
FuncId  fid,
unsigned int  b,
unsigned int  n 
) const
pure virtual

Make a copy of this Msg. The original msg was on origSrc. The new Msg should go from newSrc to newTgt, and have the function fid, on bindIndex b. The copy may have to be a higher-order Msg type to handle arrays if n > 1. Note that n is not the number of msgs, but the multiplier by which numData will be scaled.

Implemented in SparseMsg, DiagonalMsg, SingleMsg, OneToOneDataIndexMsg, OneToOneMsg, and OneToAllMsg.

Referenced by innerCopyMsgs().

+ Here is the caller graph for this function:

void Msg::deleteMsg ( ObjId  mid)
static

Deletes a message identified by its mid.

Definition at line 52 of file Msg.cpp.

References getMsg().

Referenced by Element::clearBinding(), HSolve::deleteIncomingMessages(), Neutral::destroy(), Element::dropAllMsgsFromSrc(), Shell::dropClockMsgs(), Shell::innerMove(), HSolveActive::readSynapses(), and Element::~Element().

53 {
54  const Msg* msg = getMsg( mid );
55  delete( msg );
56 }
Definition: Msg.h:18
static const Msg * getMsg(ObjId m)
Definition: Msg.cpp:59

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual ObjId Msg::findOtherEnd ( ObjId  ) const
pure virtual

Find the other end of this Msg. In most cases this is a straightforward return of e1 or e2, plus perhaps a DataId. But in some complex msgs we need to figure out DataIds that match with the target. In many-to-one cases we just return the first entry. If no Element match, return ObjId( Id(), DataId::bad() ) If Element e matches but not DataId, return ObjId( e.id(), DataId::bad() )

Implemented in SparseMsg, DiagonalMsg, SingleMsg, OneToOneDataIndexMsg, OneToOneMsg, and OneToAllMsg.

Referenced by Neutral::child(), HSolve::deleteIncomingMessages(), getAdjacent(), Neutral::isDescendant(), Neutral::parent(), Neutral::path(), and testAssortedMsg().

+ Here is the caller graph for this function:

virtual Eref Msg::firstTgt ( const Eref src) const
pure virtual

Obtain the first target Eref for the specified Src Eref It is really meant only to work with messages with a single target ObjId for each given src, typically OneToOne.

Implemented in SparseMsg, DiagonalMsg, OneToOneDataIndexMsg, OneToOneMsg, SingleMsg, and OneToAllMsg.

Referenced by Element::getInputsWithTgtIndex().

+ Here is the caller graph for this function:

ObjId Msg::getAdjacent ( ObjId  obj) const

Wrapper for findOtherEnd - to expose it as a LookupFinfo.

Definition at line 156 of file Msg.cpp.

References findOtherEnd().

Referenced by initCinfo().

157 {
158  return findOtherEnd(obj);
159 }
virtual ObjId findOtherEnd(ObjId) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vector< string > Msg::getDestFieldsOnE1 ( ) const

Return names of DestFinfos for messages going from e2 to e1.

Definition at line 137 of file Msg.cpp.

References Element::cinfo(), Cinfo::destFinfoName(), e1_, e2_, Element::getFieldsOfOutgoingMsg(), Element::getName(), mid_, and name.

Referenced by initCinfo(), and testMsgSrcDestFields().

138 {
139  vector< pair< BindIndex, FuncId > > ids;
140  vector< string > ret;
141 
143 
144  for ( unsigned int i = 0; i < ids.size(); ++i ) {
145  string name = e1_->cinfo()->destFinfoName( ids[i].second );
146  if ( name == "" ) {
147  cout << "Error: Msg::getDestFieldsOnE1: Failed to find field on msg " <<
148  e1_->getName() << "-->" << e2_->getName() << endl;
149  } else {
150  ret.push_back( name );
151  }
152  }
153  return ret;
154 }
unsigned int getFieldsOfOutgoingMsg(ObjId mid, vector< pair< BindIndex, FuncId > > &ret) const
Definition: Element.cpp:1009
const string & destFinfoName(FuncId fid) const
Definition: Cinfo.cpp:569
const Cinfo * cinfo() const
Definition: Element.cpp:66
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180
ObjId mid_
Definition: Msg.h:178
static char name[]
Definition: mfield.cpp:401
Element * e2_
Element 1 attached to Msg.
Definition: Msg.h:181
const string & getName() const
Definition: Element.cpp:56

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vector< string > Msg::getDestFieldsOnE2 ( ) const

Return names of DestFinfos for messages going from e1 to e2.

Definition at line 99 of file Msg.cpp.

References Element::cinfo(), Cinfo::destFinfoName(), e1_, e2_, Element::getFieldsOfOutgoingMsg(), Element::getName(), mid_, and name.

Referenced by initCinfo(), and testMsgSrcDestFields().

100 {
101  vector< pair< BindIndex, FuncId > > ids;
102  vector< string > ret;
103 
105 
106  for ( unsigned int i = 0; i < ids.size(); ++i ) {
107  string name = e2_->cinfo()->destFinfoName( ids[i].second );
108  if ( name == "" ) {
109  cout << "Error: Msg::getDestFieldsOnE2: Failed to find field on msg " <<
110  e1_->getName() << "-->" << e2_->getName() << endl;
111  } else {
112  ret.push_back( name );
113  }
114  }
115  return ret;
116 }
unsigned int getFieldsOfOutgoingMsg(ObjId mid, vector< pair< BindIndex, FuncId > > &ret) const
Definition: Element.cpp:1009
const string & destFinfoName(FuncId fid) const
Definition: Cinfo.cpp:569
const Cinfo * cinfo() const
Definition: Element.cpp:66
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180
ObjId mid_
Definition: Msg.h:178
static char name[]
Definition: mfield.cpp:401
Element * e2_
Element 1 attached to Msg.
Definition: Msg.h:181
const string & getName() const
Definition: Element.cpp:56

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Id Msg::getE1 ( ) const

Return the first element id

Definition at line 67 of file Msg.cpp.

References e1_, and Element::id().

Referenced by initCinfo().

68 {
69  return e1_->id();
70 }
Id id() const
Definition: Element.cpp:71
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Id Msg::getE2 ( ) const

Return the second element id

Definition at line 75 of file Msg.cpp.

References e2_, and Element::id().

Referenced by Neutral::child(), and initCinfo().

76 {
77  return e2_->id();
78 }
Id id() const
Definition: Element.cpp:71
Element * e2_
Element 1 attached to Msg.
Definition: Msg.h:181

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Msg * Msg::getMsg ( ObjId  m)
static

Looks up the message .

Definition at line 59 of file Msg.cpp.

References ObjId::data().

Referenced by SharedFinfo::addMsg(), Neutral::child(), Neutral::children(), HSolve::deleteIncomingMessages(), deleteMsg(), Element::dropAllMsgsFromSrc(), Element::findCaller(), Neutral::getIncomingMsgs(), Element::getInputMsgs(), Element::getInputs(), Element::getInputsWithTgtIndex(), Element::getMsgSourceAndSender(), Element::getMsgTargetAndFunctions(), Element::getOutputs(), getReactantVols(), innerCopyMsgs(), Neutral::isDescendant(), Neutral::parent(), Neutral::path(), putFuncsInOrder(), Element::putOffNodeTargetsInDigest(), Element::putTargetsInDigest(), Element::showMsg(), and testAssortedMsg().

60 {
61  return reinterpret_cast< const Msg* >( m.data() );
62 }
char * data() const
Definition: ObjId.cpp:113
Definition: Msg.h:18

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vector< string > Msg::getSrcFieldsOnE1 ( ) const

Return names of SrcFinfos for messages going from e1 to e2.

Definition at line 80 of file Msg.cpp.

References Element::cinfo(), e1_, e2_, Element::getFieldsOfOutgoingMsg(), Element::getName(), mid_, name, and Cinfo::srcFinfoName().

Referenced by initCinfo(), and testMsgSrcDestFields().

81 {
82  vector< pair< BindIndex, FuncId > > ids;
83  vector< string > ret;
84 
86 
87  for ( unsigned int i = 0; i < ids.size(); ++i ) {
88  string name = e1_->cinfo()->srcFinfoName( ids[i].first );
89  if ( name == "" ) {
90  cout << "Error: Msg::getSrcFieldsOnE1: Failed to find field on msg " <<
91  e1_->getName() << "-->" << e2_->getName() << endl;
92  } else {
93  ret.push_back( name );
94  }
95  }
96  return ret;
97 }
unsigned int getFieldsOfOutgoingMsg(ObjId mid, vector< pair< BindIndex, FuncId > > &ret) const
Definition: Element.cpp:1009
const Cinfo * cinfo() const
Definition: Element.cpp:66
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180
ObjId mid_
Definition: Msg.h:178
static char name[]
Definition: mfield.cpp:401
const string & srcFinfoName(BindIndex bid) const
Definition: Cinfo.cpp:552
Element * e2_
Element 1 attached to Msg.
Definition: Msg.h:181
const string & getName() const
Definition: Element.cpp:56

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vector< string > Msg::getSrcFieldsOnE2 ( ) const

Return names of SrcFinfos for messages going from e2 to e1.

Definition at line 118 of file Msg.cpp.

References Element::cinfo(), e1_, e2_, Element::getFieldsOfOutgoingMsg(), Element::getName(), mid_, name, and Cinfo::srcFinfoName().

Referenced by initCinfo(), and testMsgSrcDestFields().

119 {
120  vector< pair< BindIndex, FuncId > > ids;
121  vector< string > ret;
122 
124 
125  for ( unsigned int i = 0; i < ids.size(); ++i ) {
126  string name = e2_->cinfo()->srcFinfoName( ids[i].first );
127  if ( name == "" ) {
128  cout << "Error: Msg::getSrcFieldsOnE2: Failed to find field on msg " <<
129  e1_->getName() << "-->" << e2_->getName() << endl;
130  } else {
131  ret.push_back( name );
132  }
133  }
134  return ret;
135 }
unsigned int getFieldsOfOutgoingMsg(ObjId mid, vector< pair< BindIndex, FuncId > > &ret) const
Definition: Element.cpp:1009
const Cinfo * cinfo() const
Definition: Element.cpp:66
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180
ObjId mid_
Definition: Msg.h:178
static char name[]
Definition: mfield.cpp:401
const string & srcFinfoName(BindIndex bid) const
Definition: Cinfo.cpp:552
Element * e2_
Element 1 attached to Msg.
Definition: Msg.h:181
const string & getName() const
Definition: Element.cpp:56

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Cinfo * Msg::initCinfo ( )
static

Set up the Msg to be accessed like an Element Although the bare Msg class is never seen, we will use it as a base class and set up some common fields here.

Definition at line 165 of file Msg.cpp.

References e1(), e2(), getAdjacent(), getDestFieldsOnE1(), getDestFieldsOnE2(), getE1(), getE2(), getSrcFieldsOnE1(), getSrcFieldsOnE2(), Neutral::initCinfo(), and msgCinfo.

Referenced by OneToOneDataIndexMsg::initCinfo(), OneToOneMsg::initCinfo(), OneToAllMsg::initCinfo(), SingleMsg::initCinfo(), DiagonalMsg::initCinfo(), and SparseMsg::initCinfo().

166 {
168  // Field definitions.
171  "e1",
172  "Id of source Element.",
173  &Msg::getE1
174  );
176  "e2",
177  "Id of source Element.",
178  &Msg::getE2
179  );
180 
181  static ReadOnlyValueFinfo< Msg, vector< string > > srcFieldsOnE1(
182  "srcFieldsOnE1",
183  "Names of SrcFinfos for messages going from e1 to e2. There are"
184  "matching entries in the destFieldsOnE2 vector",
186  );
187  static ReadOnlyValueFinfo< Msg, vector< string > > destFieldsOnE2(
188  "destFieldsOnE2",
189  "Names of DestFinfos for messages going from e1 to e2. There are"
190  "matching entries in the srcFieldsOnE1 vector",
192  );
193  static ReadOnlyValueFinfo< Msg, vector< string > > srcFieldsOnE2(
194  "srcFieldsOnE2",
195  "Names of SrcFinfos for messages going from e2 to e1. There are"
196  "matching entries in the destFieldsOnE1 vector",
198  );
199  static ReadOnlyValueFinfo< Msg, vector< string > > destFieldsOnE1(
200  "destFieldsOnE1",
201  "Names of destFinfos for messages going from e2 to e1. There are"
202  "matching entries in the srcFieldsOnE2 vector",
204  );
205 
207  "adjacent",
208  "The element adjacent to the specified element",
210 
211  static Finfo* msgFinfos[] = {
212  &e1, // readonly value
213  &e2, // readonly value
214  &srcFieldsOnE1, // readonly value
215  &destFieldsOnE2, // readonly value
216  &srcFieldsOnE2, // readonly value
217  &destFieldsOnE1, // readonly value
218  &adjacent, // readonly lookup value
219  };
220 
221  static Cinfo msgCinfo (
222  "Msg", // name
223  Neutral::initCinfo(), // base class
224  msgFinfos,
225  sizeof( msgFinfos ) / sizeof( Finfo* ), // num Fields
226  0
227  // new Dinfo< Msg >()
228  );
229 
230  return &msgCinfo;
231 }
Element * e2() const
Definition: Msg.h:68
ObjId getAdjacent(ObjId) const
Definition: Msg.cpp:156
Id getE1() const
Definition: Msg.cpp:67
vector< string > getDestFieldsOnE2() const
Definition: Msg.cpp:99
Id getE2() const
Definition: Msg.cpp:75
static const Cinfo * msgCinfo
Definition: Msg.cpp:233
Element * e1() const
Definition: Msg.h:61
vector< string > getSrcFieldsOnE1() const
Definition: Msg.cpp:80
vector< string > getSrcFieldsOnE2() const
Definition: Msg.cpp:118
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
vector< string > getDestFieldsOnE1() const
Definition: Msg.cpp:137
Definition: Cinfo.h:18
Definition: Finfo.h:12

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int Msg::initMsgManagers ( )
static

Sets up the Element managers for each of the Msg classes

Definition at line 236 of file Msg.cpp.

References Shell::adopt(), OneToOneMsg::initCinfo(), OneToOneDataIndexMsg::initCinfo(), OneToAllMsg::initCinfo(), SingleMsg::initCinfo(), DiagonalMsg::initCinfo(), SparseMsg::initCinfo(), Neutral::initCinfo(), OneToOneMsg::lookupMsg(), OneToOneDataIndexMsg::lookupMsg(), OneToAllMsg::lookupMsg(), SingleMsg::lookupMsg(), DiagonalMsg::lookupMsg(), SparseMsg::lookupMsg(), OneToOneDataIndexMsg::managerId_, OneToOneMsg::managerId_, OneToAllMsg::managerId_, SingleMsg::managerId_, DiagonalMsg::managerId_, SparseMsg::managerId_, msgManagerId_, Id::nextId(), OneToOneDataIndexMsg::numMsg(), OneToOneMsg::numMsg(), OneToAllMsg::numMsg(), SingleMsg::numMsg(), DiagonalMsg::numMsg(), and SparseMsg::numMsg().

Referenced by init().

237 {
238  Dinfo< short > dummyDinfo;
239 
240  // This is to be the parent of all the msg managers.
242  new GlobalDataElement(
243  msgManagerId_, Neutral::initCinfo(), "Msgs", 1 );
244 
247  "singleMsg", &SingleMsg::numMsg, &SingleMsg::lookupMsg );
248 
251  "oneToOneMsg", &OneToOneMsg::numMsg, &OneToOneMsg::lookupMsg );
252 
255  "oneToAllMsg", &OneToAllMsg::numMsg, &OneToAllMsg::lookupMsg );
256 
259  "diagonalMsg", &DiagonalMsg::numMsg, &DiagonalMsg::lookupMsg );
260 
263  "sparseMsg", &SparseMsg::numMsg, &SparseMsg::lookupMsg );
264 
268  "oneToOneDataIndexMsg",
271 
272  // Do the 'adopt' only after all the message managers exist - we need
273  // the OneToAll manager for the adoption messages themselves.
274  assert( OneToAllMsg::numMsg() == 0 );
275  unsigned int n = 1;
276  Shell::adopt( Id(), msgManagerId_, n++ );
282 
283  return n;
284 }
static char * lookupMsg(unsigned int index)
Static function for Msg access.
static Id managerId_
Definition: OneToOneMsg.h:50
static char * lookupMsg(unsigned int index)
Static function for Msg access.
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
Definition: Dinfo.h:60
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
static Id managerId_
Definition: OneToAllMsg.h:50
static Id nextId()
Definition: Id.cpp:132
static unsigned int numMsg()
Msg lookup functions.
static char * lookupMsg(unsigned int index)
Static function for Msg access.
static unsigned int numMsg()
Msg lookup functions.
static char * lookupMsg(unsigned int index)
Static function for Msg access.
Definition: SparseMsg.cpp:643
static Id msgManagerId_
Element 2 attached to Msg.
Definition: Msg.h:186
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
static Id managerId_
Definition: SparseMsg.h:148
static unsigned int numMsg()
Msg lookup functions.
Definition: SparseMsg.cpp:637
static unsigned int numMsg()
Msg lookup functions.
static const Cinfo * initCinfo()
Definition: SparseMsg.cpp:24
static const Cinfo * initCinfo()
Definition: SingleMsg.cpp:148
static bool adopt(ObjId parent, Id child, unsigned int msgIndex)
Definition: Shell.cpp:654
Definition: Id.h:17
static char * lookupMsg(unsigned int index)
Static function for Msg access.
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
static unsigned int numMsg()
Msg lookup functions.
Definition: SingleMsg.cpp:223
static Id managerId_
Definition: DiagonalMsg.h:71
static char * lookupMsg(unsigned int index)
Static function for Msg access.
Definition: SingleMsg.cpp:229
static Id managerId_
Definition: SingleMsg.h:61
static unsigned int numMsg()
Assign the first DataId.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Msg::isForward ( const Element src) const
inline

Checks if the message is going forward. Now merged into Msg::addToQ for most cases.

Definition at line 144 of file Msg.h.

References e1_.

144  {
145  return ( e1_ == src );
146  }
Element * e1_
Index of this Msg on the msg_ vector.
Definition: Msg.h:180
bool Msg::isLastTrump ( )
static

True when MOOSE has been terminated and is being cleaned up.

Definition at line 320 of file Msg.cpp.

References lastTrump_.

Referenced by Clock::~Clock().

321 {
322  return lastTrump_;
323 }
static bool lastTrump_
Flag to indicate termination of program.
Definition: Msg.h:189

+ Here is the caller graph for this function:

const Msg * Msg::lastMsg ( )
static

Returns the most recently constructed msg.

Static utility function, provided so that the shell function doing message creation can retrieve the most recent message made.

Definition at line 315 of file Msg.cpp.

References lastMsg_.

316 {
317  return lastMsg_;
318 }
static const Msg * lastMsg_
Definition: Msg.h:192
ObjId Msg::mid ( ) const
inline

return the Msg Id.

Definition at line 106 of file Msg.h.

References mid_.

Referenced by addClockMsg(), Shell::adopt(), OneToAllMsg::copy(), OneToOneDataIndexMsg::copy(), OneToOneMsg::copy(), SingleMsg::copy(), DiagonalMsg::copy(), SparseMsg::copy(), Shell::doAddMsg(), Neutral::getIncomingMsgs(), Shell::innerMove(), FieldElementFinfoBase::postCreationFunc(), testCreateMsg(), testFibonacci(), testMsgField(), testMsgSrcDestFields(), testSendMsg(), testSendSpike(), testSharedMsg(), and testSparseMsg().

106  {
107  return mid_;
108  }
ObjId mid_
Definition: Msg.h:178

+ Here is the caller graph for this function:

virtual void Msg::sources ( vector< vector< Eref > > &  v) const
pure virtual

Return all the sources of e2 from e1, that is, all the msgs coming into specified entries on e2 from e1.

ALLDATA used when the sources include all data entries on a source. Indexing is v[dataId in range e2.numData][src list]

Implemented in DiagonalMsg, OneToOneDataIndexMsg, OneToOneMsg, SingleMsg, and OneToAllMsg.

Referenced by Element::getMsgTargetAndFunctions(), and Element::putTargetsInDigest().

+ Here is the caller graph for this function:

virtual void Msg::targets ( vector< vector< Eref > > &  v) const
pure virtual

Return all the targets of e1 on e2, that is, all the msgs going from specified entries on e1 to e2. ALLDATA used when the targets include all data entries on a target. Indexing is v[dataId in range e1.numData][tgt list]

Implemented in DiagonalMsg, OneToOneDataIndexMsg, OneToOneMsg, SingleMsg, and OneToAllMsg.

Referenced by Neutral::children(), Element::getMsgTargetAndFunctions(), Element::putTargetsInDigest(), and testSendMsg().

+ Here is the caller graph for this function:

Member Data Documentation

const Msg * Msg::lastMsg_ = 0
staticprivate

Definition at line 192 of file Msg.h.

Referenced by lastMsg(), and Msg().

bool Msg::lastTrump_ = false
staticprotected

Flag to indicate termination of program.

Definition at line 189 of file Msg.h.

Referenced by clearAllMsgs(), isLastTrump(), and ~Msg().

Id Msg::msgManagerId_
staticprotected

Element 2 attached to Msg.

Keeps track of the Id of the parent of all the MsgManager Elms.

Definition at line 186 of file Msg.h.

Referenced by initMsgManagers().


The documentation for this class was generated from the following files: