#include <SharedFinfo.h>
Public Member Functions | |
SharedFinfo (const string &name, const string &doc, Finfo **entries, unsigned int numEntries) | |
~SharedFinfo () | |
void | registerFinfo (Cinfo *c) |
bool | strSet (const Eref &tgt, const string &field, const string &arg) const |
bool | strGet (const Eref &tgt, const string &field, string &returnValue) const |
bool | checkTarget (const Finfo *target) const |
bool | addMsg (const Finfo *target, ObjId mid, Element *src) const |
const vector< SrcFinfo * > & | src () const |
const vector< Finfo * > & | dest () const |
vector< string > | innerSrc () const |
vector< string > | innerDest () const |
string | rttiType () const |
This always returns void. We need to check the subsidiary Finfos. |
This is a SharedFinfo, which wraps an arbitrary set of regular Src and Dest Messages. Its main job is to do typechecking for setting up multiple data streams to go across the same Msg.
SharedFinfo::SharedFinfo | ( | const string & | name, | |
const string & | doc, | |||
Finfo ** | entries, | |||
unsigned int | numEntries | |||
) |
SharedFinfo::~SharedFinfo | ( | ) | [inline] |
First calls checkTarget on all targets, then sets up message. Returns true on success.
References checkTarget(), Msg::e1(), Msg::e2(), Msg::getMsg(), Element::getName(), and Element::id().
bool SharedFinfo::checkTarget | ( | const Finfo * | target | ) | const |
Checks that the type of target Finfo matches self, and is safe to exchange messages with.
It is possible that we have DestFinfos in this SharedFinfo, that have not been registered. So we need to scan through. Note that the register operation overwrites values if they already exist. Best not to have conflicts!.
Referenced by addMsg().
const vector< Finfo * > & SharedFinfo::dest | ( | ) | const |
Referenced by insertSharedMsgs().
vector< string > SharedFinfo::innerDest | ( | ) | const [virtual] |
Returns subsidiary DestFinfos
Reimplemented from Finfo.
vector< string > SharedFinfo::innerSrc | ( | ) | const [virtual] |
Returns subsidiary SrcFinfos
Reimplemented from Finfo.
void SharedFinfo::registerFinfo | ( | Cinfo * | c | ) | [virtual] |
Returns string-ified form to handle template expectations for name field string getName() const; Assign function Ids, bindIndex and so on.
Implements Finfo.
References Cinfo::registerFinfo().
string SharedFinfo::rttiType | ( | ) | const [virtual] |
This always returns void. We need to check the subsidiary Finfos.
Reimplemented from Finfo.
const vector< SrcFinfo * > & SharedFinfo::src | ( | ) | const |
bool SharedFinfo::strGet | ( | const Eref & | tgt, | |
const string & | field, | |||
string & | returnValue | |||
) | const [virtual] |
Function to return value of field into a string argument. Returns true on success. Normally called only from SetGet::strGet.
Implements Finfo.
bool SharedFinfo::strSet | ( | const Eref & | tgt, | |
const string & | field, | |||
const string & | arg | |||
) | const [virtual] |
Function to set this field using a string argument. Returns true on success. Normally called only from SetGet::strSet.
Implements Finfo.