Go to the source code of this file.
Element* innerCopyElements |
( |
Id |
orig, |
|
|
ObjId |
newParent, |
|
|
Id |
newId, |
|
|
unsigned int |
n, |
|
|
bool |
toGlobal, |
|
|
map< Id, Id > & |
tree |
|
) |
| |
Runs in parallel on all nodes. Note that 'n' is the number of complete duplicates. If there were 10 dataEntries in the original, there will now be 10 x n.
Definition at line 62 of file ShellCopy.cpp.
References Shell::adopt(), Neutral::children(), Element::cinfo(), Element::copyElement(), ObjId::dataIndex, Id::element(), Id::eref(), Element::id(), Clock::lookupDefaultTick(), Cinfo::name(), Id::nextId(), Element::numData(), Neutral::parent(), and Element::setTick().
Referenced by Shell::innerCopy().
68 newParent, newId, newNumData, toGlobal );
74 tree[ orig ] = e->
id();
80 for ( vector< Id >::iterator i = kids.begin(); i != kids.end(); ++i ) {
static ObjId parent(const Eref &e)
Element * element() const
Synonym for Id::operator()()
static void children(const Eref &e, vector< Id > &ret)
virtual Element * copyElement(Id newParent, Id newId, unsigned int n, bool toGlobal) const =0
const std::string & name() const
Element * innerCopyElements(Id orig, ObjId newParent, Id newId, unsigned int n, bool toGlobal, map< Id, Id > &tree)
static unsigned int lookupDefaultTick(const string &className)
const Cinfo * cinfo() const
virtual unsigned int numData() const =0
Returns number of data entries across all nodes.
static bool adopt(ObjId parent, Id child, unsigned int msgIndex)
void innerCopyMsgs |
( |
map< Id, Id > & |
tree, |
|
|
unsigned int |
n, |
|
|
bool |
copyExtMsgs |
|
) |
| |
Definition at line 89 of file ShellCopy.cpp.
References Msg::copy(), Msg::e1(), Msg::e2(), Cinfo::findFinfo(), SrcFinfo::getBindIndex(), Msg::getMsg(), Element::getMsgAndFunc(), Element::id(), and Neutral::initCinfo().
Referenced by Shell::innerCopy().
105 for ( map< Id, Id >::const_iterator i = tree.begin();
106 i != tree.end(); ++i ) {
107 Element *e = i->first.element();
112 for ( vector< MsgFuncBinding >::const_iterator k =
114 k != b->end(); ++k ) {
125 map< Id, Id >::const_iterator tgt;
126 if ( m->
e1() == e ) {
127 tgt = tree.find( m->
e2()->
id() );
128 }
else if ( m->
e2() == e ) {
129 tgt = tree.find( m->
e1()->
id() );
133 if ( tgt != tree.end() )
134 m->
copy( e->
id(), i->second, tgt->second,
BindIndex getBindIndex() const
const vector< MsgFuncBinding > * getMsgAndFunc(BindIndex b) const
static const Msg * getMsg(ObjId m)
virtual Msg * copy(Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const =0
static const Cinfo * initCinfo()
const Finfo * findFinfo(const string &name) const