MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SetGet3< A1, A2, A3 > Class Template Reference

#include <SetGet.h>

+ Inheritance diagram for SetGet3< A1, A2, A3 >:
+ Collaboration diagram for SetGet3< A1, A2, A3 >:

Public Member Functions

 SetGet3 ()
 
- Public Member Functions inherited from SetGet
virtual bool checkOpClass (const OpFunc *op) const =0
 
 SetGet ()
 
virtual ~SetGet ()
 

Static Public Member Functions

static bool innerStrSet (const ObjId &dest, const string &field, const string &val)
 
static bool set (const ObjId &dest, const string &field, A1 arg1, A2 arg2, A3 arg3)
 
- Static Public Member Functions inherited from SetGet
static const OpFunccheckSet (const string &field, ObjId &tgt, FuncId &fid)
 
static const vector< double * > * dispatchGet (const ObjId &tgt, FuncId tgtFid, const double *arg, unsigned int size)
 Sends out request for data, and awaits its return. More...
 
static bool strGet (const ObjId &tgt, const string &field, string &ret)
 
static bool strSet (const ObjId &dest, const string &field, const string &val)
 

Detailed Description

template<class A1, class A2, class A3>
class SetGet3< A1, A2, A3 >

SetGet3 handles 3-argument Sets. It does not deal with Gets.

Definition at line 617 of file SetGet.h.

Constructor & Destructor Documentation

template<class A1 , class A2 , class A3 >
SetGet3< A1, A2, A3 >::SetGet3 ( )
inline

Definition at line 620 of file SetGet.h.

621  {;}

Member Function Documentation

template<class A1 , class A2 , class A3 >
static bool SetGet3< A1, A2, A3 >::innerStrSet ( const ObjId dest,
const string &  field,
const string &  val 
)
inlinestatic

Blocking call using string conversion. As yet we don't have 2 arg conversion from a single string. So this is a dummy

Definition at line 659 of file SetGet.h.

References SetGet3< A1, A2, A3 >::set(), and Conv< T >::str2val().

661  {
662  A1 arg1;
663  A2 arg2;
664  A3 arg3;
665  string::size_type pos = val.find_first_of( "," );
666  Conv< A1 >::str2val( arg1, val.substr( 0, pos ) );
667  string temp = val.substr( pos + 1 );
668  pos = temp.find_first_of( "," );
669  Conv< A2 >::str2val( arg2, temp.substr( 0,pos ) );
670  Conv< A3 >::str2val( arg3, temp.substr( pos + 1 ) );
671  return set( dest, field, arg1, arg2, arg3 );
672  }
static void str2val(T &val, const string &s)
Definition: Conv.h:65
static bool set(const ObjId &dest, const string &field, A1 arg1, A2 arg2, A3 arg3)
Definition: SetGet.h:626

+ Here is the call graph for this function:

template<class A1 , class A2 , class A3 >
static bool SetGet3< A1, A2, A3 >::set ( const ObjId dest,
const string &  field,
A1  arg1,
A2  arg2,
A3  arg3 
)
inlinestatic

Blocking, typed 'Set' call

Definition at line 626 of file SetGet.h.

References SetGet::checkSet(), ObjId::eref(), ObjId::isGlobal(), ObjId::isOffNode(), OpFunc3Base< A1, A2, A3 >::makeHopFunc(), MooseSetHop, OpFunc3Base< A1, A2, A3 >::op(), op(), and OpFunc::opIndex().

Referenced by SetGet3< A1, A2, A3 >::innerStrSet(), Spine::setShaftLength(), testAssortedMsg(), testCopyMsgOps(), and testShellAddMsg().

628  {
629  FuncId fid;
630  ObjId tgt( dest );
631  const OpFunc* func = checkSet( field, tgt, fid );
633  dynamic_cast< const OpFunc3Base< A1, A2, A3 >* >( func);
634  if ( op ) {
635  if ( tgt.isOffNode() ) {
636  const OpFunc* op2 = op->makeHopFunc(
637  HopIndex( op->opIndex(), MooseSetHop ) );
638  const OpFunc3Base< A1, A2, A3 >* hop =
639  dynamic_cast< const OpFunc3Base< A1, A2, A3 >* >(
640  op2 );
641  hop->op( tgt.eref(), arg1, arg2, arg3 );
642  delete op2;
643  if ( tgt.isGlobal() )
644  op->op( tgt.eref(), arg1, arg2, arg3 );
645  return true;
646  } else {
647  op->op( tgt.eref(), arg1, arg2, arg3 );
648  return true;
649  }
650  }
651  return 0;
652  }
static const OpFunc * checkSet(const string &field, ObjId &tgt, FuncId &fid)
Definition: SetGet.cpp:15
static double op(double x)
const OpFunc * makeHopFunc(HopIndex hopIndex) const
Definition: HopFunc.h:299
Definition: ObjId.h:20
const unsigned char MooseSetHop
Definition: OpFuncBase.cpp:13
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3) const =0
unsigned int FuncId
Definition: header.h:42
unsigned int opIndex() const
Definition: OpFuncBase.h:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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