GetOpFunc1< T, L, A > Class Template Reference

#include <OpFunc.h>

Inheritance diagram for GetOpFunc1< T, L, A >:
Inheritance graph
[legend]
Collaboration diagram for GetOpFunc1< T, L, A >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GetOpFunc1 (A(T::*func)(L) const )
void op (const Eref &e, L index, ObjId recipient, FuncId fid) const
returnOp (const Eref &e, const L &index) const
 Distinct reduceOp with the index.

Detailed Description

template<class T, class L, class A>
class GetOpFunc1< T, L, A >

This specialized OpFunc is for looking up a single field value using a single argument. It generates an opFunc that takes two arguments: 1. FuncId of the function on the object that requested the value. 2. Index or other identifier to do the look up. The OpFunc then sends back a message with the info. Here T is the class that owns the function. A is the return type L is the lookup index.


Constructor & Destructor Documentation

template<class T , class L , class A >
GetOpFunc1< T, L, A >::GetOpFunc1 ( A(T::*)(L) const   func  )  [inline]

Member Function Documentation

template<class T , class L , class A >
void GetOpFunc1< T, L, A >::op ( const Eref e,
index,
ObjId  recipient,
FuncId  fid 
) const [inline, virtual]

The buf just contains the funcid on the src element that is ready to receive the returned data. Also we are returning the data along the Msg that brought in the request, so we don't need to scan through all Msgs in the Element to find the right one. So we bypass the usual SrcFinfo::sendTo, and instead go right to the Qinfo::addToQ to send off data. Finally, the data is copied back-and-forth about 3 times. Wasteful, but the 'get' function is not to be heavily used.

Implements LookupGetOpFuncBase< L, A >.

References Element::cinfo(), ObjId::element(), ObjId::eref(), Cinfo::getOpFunc(), OpFunc1Base< A >::op(), and GetOpFunc1< T, L, A >::returnOp().

Here is the call graph for this function:

template<class T , class L , class A >
A GetOpFunc1< T, L, A >::returnOp ( const Eref e,
const L &  index 
) const [inline, virtual]

Distinct reduceOp with the index.

Implements LookupGetOpFuncBase< L, A >.

References Eref::data().

Referenced by GetOpFunc1< T, L, A >::op().

Here is the call graph for this function:


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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1