14 #include "../basecode/Finfo.h"
15 #include "../basecode/header.h"
36 const string& arg )
const {
41 string& returnValue )
const {
109 for ( vector< MsgDigest >::const_iterator
110 i = md.begin(); i != md.end(); ++i ) {
114 for ( vector< Eref >::const_iterator
115 j = i->targets.begin(); j != i->targets.end(); ++j ) {
116 if ( j->dataIndex() ==
ALLDATA ) {
120 for (
unsigned int k = start; k < end; ++k )
121 f->
op(
Eref( e, k ), arg );
137 for ( vector< MsgDigest >::const_iterator
138 i = md.begin(); i != md.end(); ++i ) {
142 for ( vector< Eref >::const_iterator
143 j = i->targets.begin(); j != i->targets.end(); ++j ) {
144 if ( j->element() != tgt.
element() )
146 if ( j->dataIndex() ==
ALLDATA ) {
150 for (
unsigned int k = start; k < end; ++k )
151 f->
op(
Eref( e, k ), arg );
171 if ( arg.size() == 0 )
174 unsigned int argPos = 0;
175 for ( vector< MsgDigest >::const_iterator
176 i = md.begin(); i != md.end(); ++i ) {
180 for ( vector< Eref >::const_iterator
181 j = i->targets.begin(); j != i->targets.end(); ++j ) {
182 if ( j->dataIndex() ==
ALLDATA ) {
186 for (
unsigned int k = start; k < end; ++k ) {
187 f->
op(
Eref( e, k ), arg[ argPos++ ] );
188 if ( argPos >= arg.size() )
192 f->
op( *j, arg[ argPos++ ] );
193 if ( argPos >= arg.size() )
228 void send(
const Eref& e,
const T1& arg1,
const T2& arg2 )
const
231 for ( vector< MsgDigest >::const_iterator
232 i = md.begin(); i != md.end(); ++i ) {
236 for ( vector< Eref >::const_iterator
237 j = i->targets.begin(); j != i->targets.end(); ++j ) {
238 if ( j->dataIndex() ==
ALLDATA ) {
241 unsigned int end = start + e->
numData();
242 for (
unsigned int k = start; k < end; ++k )
243 f->
op(
Eref( e, k ), arg1, arg2 );
245 f->
op( *j, arg1, arg2 );
252 const T1& arg1,
const T2& arg2 )
const
255 for ( vector< MsgDigest >::const_iterator
256 i = md.begin(); i != md.end(); ++i ) {
260 for ( vector< Eref >::const_iterator
261 j = i->targets.begin(); j != i->targets.end(); ++j ) {
262 if ( j->element() != tgt.
element() )
264 if ( j->dataIndex() ==
ALLDATA ) {
267 unsigned int end = start + e->
numData();
268 for (
unsigned int k = start; k < end; ++k )
269 f->
op(
Eref( e, k ), arg1, arg2 );
271 f->
op( *j, arg1, arg2 );
295 template<
class A1,
class A2,
class A3 >
class OpFunc3Base;
306 const T1& arg1,
const T2& arg2,
const T3& arg3 )
const
309 for ( vector< MsgDigest >::const_iterator
310 i = md.begin(); i != md.end(); ++i ) {
315 for ( vector< Eref >::const_iterator
316 j = i->targets.begin(); j != i->targets.end(); ++j ) {
317 if ( j->dataIndex() ==
ALLDATA ) {
320 unsigned int end = start + e->
numData();
321 for (
unsigned int k = start; k < end; ++k )
322 f->
op(
Eref( e, k ), arg1, arg2, arg3 );
324 f->
op( *j, arg1, arg2, arg3 );
345 template<
class A1,
class A2,
class A3,
class A4 >
class OpFunc4Base;
357 const T1& arg1,
const T2& arg2,
358 const T3& arg3,
const T4& arg4 )
const
361 for ( vector< MsgDigest >::const_iterator
362 i = md.begin(); i != md.end(); ++i ) {
367 for ( vector< Eref >::const_iterator
368 j = i->targets.begin(); j != i->targets.end(); ++j ) {
369 if ( j->dataIndex() ==
ALLDATA ) {
372 unsigned int end = start + e->
numData();
373 for (
unsigned int k = start; k < end; ++k )
374 f->
op(
Eref( e, k ), arg1, arg2, arg3, arg4 );
376 f->
op( *j, arg1, arg2, arg3, arg4 );
398 template<
class A1,
class A2,
class A3,
class A4,
class A5 >
411 const T1& arg1,
const T2& arg2,
const T3& arg3,
const T4& arg4,
412 const T5& arg5 )
const
415 for ( vector< MsgDigest >::const_iterator
416 i = md.begin(); i != md.end(); ++i ) {
421 for ( vector< Eref >::const_iterator
422 j = i->targets.begin(); j != i->targets.end(); ++j ) {
423 if ( j->dataIndex() ==
ALLDATA ) {
426 unsigned int end = start + e->
numData();
427 for (
unsigned int k = start; k < end; ++k )
429 arg1, arg2, arg3, arg4, arg5 );
431 f->
op( *j, arg1, arg2, arg3, arg4, arg5 );
456 template<
class A1,
class A2,
class A3,
class A4,
class A5,
class A6 >
458 template <
class T1,
class T2,
class T3,
class T4,
class T5,
class T6 >
class SrcFinfo6:
public SrcFinfo
468 const T1& arg1,
const T2& arg2,
const T3& arg3,
const T4& arg4,
469 const T5& arg5,
const T6& arg6 )
const
472 for ( vector< MsgDigest >::const_iterator
473 i = md.begin(); i != md.end(); ++i ) {
479 for ( vector< Eref >::const_iterator
480 j = i->targets.begin(); j != i->targets.end(); ++j ) {
481 if ( j->dataIndex() ==
ALLDATA ) {
484 unsigned int end = start + e->
numData();
485 for (
unsigned int k = start; k < end; ++k )
487 arg1, arg2, arg3, arg4, arg5, arg6 );
489 f->
op( *j, arg1, arg2, arg3, arg4, arg5, arg6 );
514 #endif // _SRC_FINFO_H
void sendBuffer(const Eref &e, double *buf) const
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6) const =0
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4) const =0
SrcFinfo(const string &name, const string &doc)
SrcFinfo5(const string &name, const string &doc)
SrcFinfo1(const string &name, const string &doc)
virtual void op(const Eref &e, A arg) const =0
void sendBuffer(const Eref &e, double *buf) const
Element * element() const
Synonym for Id::operator()()
BindIndex getBindIndex() const
bool addMsg(const Finfo *target, ObjId mid, Element *src) const
void sendTo(const Eref &er, Id tgt, T arg) const
virtual void sendBuffer(const Eref &e, double *buf) const =0
const string & name() const
Element * element() const
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) const =0
void send(const Eref &e, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5) const
void send(const Eref &er, T arg) const
SrcFinfo2(const string &name, const string &doc)
SrcFinfo4(const string &name, const string &doc)
const unsigned int ALLDATA
Used by ObjId and Eref.
const vector< MsgDigest > & msgDigest(unsigned int bindIndex) const
void send(const Eref &e, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4) const
void sendBuffer(const Eref &e, double *buf) const
unsigned short bindIndex_
void send(const Eref &e, const T1 &arg1, const T2 &arg2) const
void setBindIndex(BindIndex b)
bool checkTarget(const Finfo *target) const
virtual void op(const Eref &e, A1 arg1, A2 arg2) const =0
void sendVec(const Eref &er, const vector< T > &arg) const
void sendTo(const Eref &e, Id tgt, const T1 &arg1, const T2 &arg2) const
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3) const =0
virtual unsigned int numData() const =0
Returns number of data entries across all nodes.
bool strGet(const Eref &tgt, const string &field, string &returnValue) const
virtual unsigned int localDataStart() const =0
Returns index of first data entry on this node.
bool strSet(const Eref &tgt, const string &field, const string &arg) const
virtual unsigned int numLocalData() const =0
Returns number of local data entries on this node.
SrcFinfo3(const string &name, const string &doc)
void send(const Eref &e, const T1 &arg1, const T2 &arg2, const T3 &arg3) const
void send(const Eref &e, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6) const
static const T & buf2val(double **buf)
void send(const Eref &e) const
void sendBuffer(const Eref &e, double *buf) const
void sendBuffer(const Eref &e, double *buf) const
void sendBuffer(const Eref &e, double *buf) const
static const BindIndex BadBindIndex
SrcFinfo0(const string &name, const string &doc)
SrcFinfo6(const string &name, const string &doc)
void sendBuffer(const Eref &e, double *buf) const
void registerFinfo(Cinfo *c)