MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OpFunc Class Referenceabstract

#include <OpFuncBase.h>

+ Inheritance diagram for OpFunc:
+ Collaboration diagram for OpFunc:

Public Member Functions

virtual bool checkFinfo (const Finfo *s) const =0
 
virtual const OpFunc * makeHopFunc (HopIndex hopIndex) const =0
 
virtual void opBuffer (const Eref &e, double *buf) const =0
 Executes the OpFunc by converting args. More...
 
 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...
 
virtual string rttiType () const =0
 
bool setIndex (unsigned int i)
 Used when rebuilding the Fid->OpFunc mapping. More...
 
virtual ~OpFunc ()
 

Static Public Member Functions

static const OpFunc * lookop (unsigned int opIndex)
 
static unsigned int rebuildOpIndex ()
 cleans out the entire Ops vector. Returns size of orig vector. More...
 

Static Private Member Functions

static vector< OpFunc * > & ops ()
 

Private Attributes

unsigned int opIndex_
 

Detailed Description

Definition at line 44 of file OpFuncBase.h.

Constructor & Destructor Documentation

OpFunc::OpFunc ( )

Definition at line 26 of file OpFuncBase.cpp.

References opIndex_, and ops().

27 {
28  opIndex_ = ops().size();
29  ops().push_back( this );
30 }
unsigned int opIndex_
Definition: OpFuncBase.h:75
static vector< OpFunc * > & ops()
Definition: OpFuncBase.cpp:20

+ Here is the call graph for this function:

virtual OpFunc::~OpFunc ( )
inlinevirtual

Definition at line 49 of file OpFuncBase.h.

50  {;}

Member Function Documentation

virtual bool OpFunc::checkFinfo ( const Finfo *  s) const
pure virtual

Implemented in LookupGetOpFuncBase< L, A >, OpFunc6Base< A1, A2, A3, A4, A5, A6 >, OpFunc5Base< A1, A2, A3, A4, A5 >, OpFunc4Base< A1, A2, A3, A4 >, OpFunc3Base< A1, A2, A3 >, OpFunc2Base< A1, A2 >, OpFunc1Base< A >, OpFunc1Base< A * >, OpFunc1Base< vector< A > * >, OpFunc1Base< ProcPtr >, and OpFunc0Base.

Referenced by SrcFinfo::addMsg(), and SrcFinfo::checkTarget().

+ Here is the caller graph for this function:

const OpFunc * OpFunc::lookop ( unsigned int  opIndex)
static

Definition at line 42 of file OpFuncBase.cpp.

References opIndex(), and ops().

Referenced by PostMaster::clearPendingSetGet().

43 {
44  assert ( opIndex < ops().size() );
45  return ops()[ opIndex ];
46 }
static vector< OpFunc * > & ops()
Definition: OpFuncBase.cpp:20
unsigned int opIndex() const
Definition: OpFuncBase.h:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual const OpFunc* OpFunc::makeHopFunc ( HopIndex  hopIndex) const
pure virtual
virtual void OpFunc::opBuffer ( const Eref &  e,
double *  buf 
) const
pure virtual

Executes the OpFunc by converting args.

Implemented in LookupGetOpFuncBase< L, A >, GetOpFuncBase< A >, OpFunc6Base< A1, A2, A3, A4, A5, A6 >, OpFunc5Base< A1, A2, A3, A4, A5 >, OpFunc4Base< A1, A2, A3, A4 >, OpFunc3Base< A1, A2, A3 >, OpFunc2Base< A1, A2 >, OpFunc1Base< A >, OpFunc1Base< A * >, OpFunc1Base< vector< A > * >, OpFunc1Base< ProcPtr >, and OpFunc0Base.

Referenced by PostMaster::clearPendingSetGet(), PostMaster::handleRemoteGet(), and innerGetVec().

+ Here is the caller graph for this function:

unsigned int OpFunc::opIndex ( ) const
inline

Definition at line 66 of file OpFuncBase.h.

References opIndex_.

Referenced by Field< A >::get(), Field< A >::getVec(), lookop(), SetGet0::set(), SetGet1< A >::set(), SetGet2< L, A >::set(), SetGet3< A1, A2, A3 >::set(), SetGet4< A1, A2, A3, A4 >::set(), SetGet5< A1, A2, A3, A4, A5 >::set(), SetGet6< A1, A2, A3, A4, A5, A6 >::set(), SetGet1< A >::setVec(), and SetGet2< L, A >::setVec().

66  {
67  return opIndex_;
68  }
unsigned int opIndex_
Definition: OpFuncBase.h:75

+ Here is the caller graph for this function:

vector< OpFunc * > & OpFunc::ops ( )
staticprivate

Definition at line 20 of file OpFuncBase.cpp.

References op().

Referenced by lookop(), OpFunc(), rebuildOpIndex(), and setIndex().

21 {
22  static vector< OpFunc* > op;
23  return op;
24 }
static double op(double x)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void OpFunc::opVecBuffer ( const Eref &  e,
double *  buf 
) const
inlinevirtual

Executes the OpFunc for all data by converting a vector of args.

Reimplemented in OpFunc2Base< A1, A2 >, OpFunc1Base< A >, OpFunc1Base< A * >, OpFunc1Base< vector< A > * >, and OpFunc1Base< ProcPtr >.

Definition at line 61 of file OpFuncBase.h.

Referenced by PostMaster::clearPendingSetGet().

62  {;}

+ Here is the caller graph for this function:

unsigned int OpFunc::rebuildOpIndex ( )
static

cleans out the entire Ops vector. Returns size of orig vector.

Definition at line 49 of file OpFuncBase.cpp.

References ops().

Referenced by Cinfo::rebuildOpIndex().

50 {
51  for( vector< OpFunc* >::iterator
52  i = ops().begin(); i != ops().end(); ++i ) {
53  (*i)->opIndex_ = ~0U;
54  }
55  return ops().size();
56 }
static vector< OpFunc * > & ops()
Definition: OpFuncBase.cpp:20

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual string OpFunc::rttiType ( ) const
pure virtual

Implemented in LookupGetOpFuncBase< L, A >, OpFunc6Base< A1, A2, A3, A4, A5, A6 >, OpFunc5Base< A1, A2, A3, A4, A5 >, OpFunc4Base< A1, A2, A3, A4 >, OpFunc3Base< A1, A2, A3 >, OpFunc2Base< A1, A2 >, OpFunc1Base< A >, OpFunc1Base< A * >, OpFunc1Base< vector< A > * >, OpFunc1Base< ProcPtr >, OpFunc0Base, and ProcOpFunc< T >.

Referenced by DestFinfo::rttiType().

+ Here is the caller graph for this function:

bool OpFunc::setIndex ( unsigned int  i)

Used when rebuilding the Fid->OpFunc mapping.

Definition at line 58 of file OpFuncBase.cpp.

References opIndex_, and ops().

Referenced by Cinfo::rebuildOpIndex().

59 {
60  if( opIndex_ == ~0U ) {
61  opIndex_ = i;
62  ops()[i] = this;
63  return true;
64  }
65  /*
66  cout << " OpFunc " << rttiType() <<
67  " already setup. (old,new) index = (" <<
68  opIndex_ << ", " << i << " )\n";
69  */
70  return false;
71 }
unsigned int opIndex_
Definition: OpFuncBase.h:75
static vector< OpFunc * > & ops()
Definition: OpFuncBase.cpp:20

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

unsigned int OpFunc::opIndex_
private

Definition at line 75 of file OpFuncBase.h.

Referenced by OpFunc(), opIndex(), and setIndex().


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