MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GetEpFunc1< T, L, A > Class Template Reference

#include <EpFunc.h>

+ Inheritance diagram for GetEpFunc1< T, L, A >:
+ Collaboration diagram for GetEpFunc1< T, L, A >:

Public Member Functions

 GetEpFunc1 (A(T::*func)(const Eref &e, L) const )
 
void op (const Eref &e, L index, ObjId recipient, FuncId fid) const
 
returnOp (const Eref &e, const L &index) const
 
- Public Member Functions inherited from LookupGetOpFuncBase< L, A >
bool checkFinfo (const Finfo *s) const
 
const OpFuncmakeHopFunc (HopIndex hopIndex) const
 
const OpFuncmakeHopFunc (HopIndex hopIndex, const L &index) const
 
void opBuffer (const Eref &e, double *buf) const
 Executes the OpFunc by converting args. More...
 
string rttiType () const
 
- Public Member Functions inherited from OpFunc
 OpFunc ()
 
unsigned int opIndex () const
 
virtual void opVecBuffer (const Eref &e, double *buf) const
 Executes the OpFunc for all data by converting a vector of args. More...
 
bool setIndex (unsigned int i)
 Used when rebuilding the Fid->OpFunc mapping. More...
 
virtual ~OpFunc ()
 

Private Attributes

A(T::* func_ )(const Eref &e, L) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OpFunc
static const OpFunclookop (unsigned int opIndex)
 
static unsigned int rebuildOpIndex ()
 cleans out the entire Ops vector. Returns size of orig vector. More...
 

Detailed Description

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

This specialized EpFunc is for returning a single field value, but the field lookup requires an index argument as well. Unlike the regular GetOpFunc, this variant takes the Eref and Qinfo. It generates an opFunc that takes a single argument: FuncId of the function on the object that requested the value. The EpFunc then sends back a message with the info.

Definition at line 212 of file EpFunc.h.

Constructor & Destructor Documentation

template<class T , class L , class A >
GetEpFunc1< T, L, A >::GetEpFunc1 ( A(T::*)(const Eref &e, L) const  func)
inline

Definition at line 216 of file EpFunc.h.

217  : func_( func )
218  {;}
A(T::* func_)(const Eref &e, L) const
Definition: EpFunc.h:236

Member Function Documentation

template<class T , class L , class A >
void GetEpFunc1< T, L, A >::op ( const Eref e,
index,
ObjId  recipient,
FuncId  fid 
) const
inlinevirtual

Implements LookupGetOpFuncBase< L, A >.

Definition at line 221 of file EpFunc.h.

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

222  {
223  const OpFunc *f = recipient.element()->cinfo()->getOpFunc( fid);
224  const OpFunc1Base< A >* recvOpFunc =
225  dynamic_cast< const OpFunc1Base< A >* >( f );
226  assert( recvOpFunc );
227  recvOpFunc->op( recipient.eref(), returnOp( e, index ) );
228  }
const OpFunc * getOpFunc(FuncId fid) const
Definition: Cinfo.cpp:240
virtual void op(const Eref &e, A arg) const =0
A returnOp(const Eref &e, const L &index) const
Definition: EpFunc.h:230
const Cinfo * cinfo() const
Definition: Element.cpp:66
Element * element() const
Definition: ObjId.cpp:124
Eref eref() const
Definition: ObjId.cpp:66

+ Here is the call graph for this function:

template<class T , class L , class A >
A GetEpFunc1< T, L, A >::returnOp ( const Eref e,
const L &  index 
) const
inlinevirtual

Implements LookupGetOpFuncBase< L, A >.

Definition at line 230 of file EpFunc.h.

References Eref::data(), and GetEpFunc1< T, L, A >::func_.

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

230  {
231  return ( reinterpret_cast< T* >( e.data() )->*func_)(
232  e, index );
233  }
char * data() const
Definition: Eref.cpp:41
A(T::* func_)(const Eref &e, L) const
Definition: EpFunc.h:236

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

template<class T , class L , class A >
A( T::* GetEpFunc1< T, L, A >::func_)(const Eref &e, L) const
private

Definition at line 236 of file EpFunc.h.

Referenced by GetEpFunc1< T, L, A >::returnOp().


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