SingleMsg Class Reference

#include <SingleMsg.h>

Inheritance diagram for SingleMsg:
Inheritance graph
[legend]
Collaboration diagram for SingleMsg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SingleMsg (const Eref &e1, const Eref &e2, unsigned int msgIndex)
 ~SingleMsg ()
Eref firstTgt (const Eref &src) const
void sources (vector< vector< Eref > > &v) const
void targets (vector< vector< Eref > > &v) const
DataId i1 () const
DataId i2 () const
Id managerId () const
ObjId findOtherEnd (ObjId end) const
Msgcopy (Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const
void setI1 (DataId di)
DataId getI1 () const
void setI2 (DataId di)
DataId getI2 () const
void setTargetField (unsigned int f)
unsigned int getTargetField () const

Static Public Member Functions

static unsigned int numMsg ()
 Msg lookup functions.
static char * lookupMsg (unsigned int index)
 Static function for Msg access.
static const CinfoinitCinfo ()

Friends

unsigned int Msg::initMsgManagers ()

Detailed Description

This is a message from a single source object to a single target object. The source object must be a DataEntry. The target object may be on a FieldElement, and the target specification includes the index of the field object.


Constructor & Destructor Documentation

SingleMsg::SingleMsg ( const Eref e1,
const Eref e2,
unsigned int  msgIndex 
)

Referenced by copy().

SingleMsg::~SingleMsg (  ) 

References ObjId::dataIndex, and Msg::mid_.


Member Function Documentation

Msg * SingleMsg::copy ( Id  origSrc,
Id  newSrc,
Id  newTgt,
FuncId  fid,
unsigned int  b,
unsigned int  n 
) const [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.

Implements Msg.

References Element::addMsgAndFunc(), Msg::e1(), Msg::e2(), Id::element(), Msg::mid(), and SingleMsg().

Here is the call graph for this function:

ObjId SingleMsg::findOtherEnd ( ObjId   )  const [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() )

Implements Msg.

References BADINDEX, ObjId::dataIndex, Msg::e1(), Msg::e2(), and ObjId::element().

Here is the call graph for this function:

Eref SingleMsg::firstTgt ( const Eref src  )  const [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.

Implements Msg.

References Msg::e1_, Msg::e2_, and Eref::element().

Here is the call graph for this function:

DataId SingleMsg::getI1 (  )  const

Referenced by initCinfo().

DataId SingleMsg::getI2 (  )  const

Referenced by initCinfo().

unsigned int SingleMsg::getTargetField (  )  const
DataId SingleMsg::i1 (  )  const
DataId SingleMsg::i2 (  )  const
const Cinfo * SingleMsg::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.

Reimplemented from Msg.

References getI1(), getI2(), Msg::initCinfo(), setI1(), and setI2().

Referenced by Msg::initMsgManagers().

Here is the call graph for this function:

char * SingleMsg::lookupMsg ( unsigned int  index  )  [static]

Static function for Msg access.

Referenced by Msg::clearAllMsgs(), and Msg::initMsgManagers().

Id SingleMsg::managerId (  )  const
unsigned int SingleMsg::numMsg (  )  [static]

Msg lookup functions.

Static function for Msg access.

Referenced by Msg::clearAllMsgs(), and Msg::initMsgManagers().

void SingleMsg::setI1 ( DataId  di  ) 

References Msg::e1(), Msg::e2(), and Element::markRewired().

Referenced by initCinfo().

Here is the call graph for this function:

void SingleMsg::setI2 ( DataId  di  ) 

References Msg::e1(), Msg::e2(), and Element::markRewired().

Referenced by initCinfo().

Here is the call graph for this function:

void SingleMsg::setTargetField ( unsigned int  f  ) 

References Msg::e1(), and Element::markRewired().

Here is the call graph for this function:

void SingleMsg::sources ( vector< vector< Eref > > &  v  )  const [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]

Implements Msg.

void SingleMsg::targets ( vector< vector< Eref > > &  v  )  const [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]

Implements Msg.


Friends And Related Function Documentation

unsigned int Msg::initMsgManagers (  )  [friend]

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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1