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

#include <SetGet.h>

+ Inheritance diagram for SetGet5< A1, A2, A3, A4, A5 >:
+ Collaboration diagram for SetGet5< A1, A2, A3, A4, A5 >:

Public Member Functions

 SetGet5 ()
 
- 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, A4 arg4, A5 arg5)
 
- 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 A4, class A5>
class SetGet5< A1, A2, A3, A4, A5 >

SetGet5 handles 5-argument Sets. It does not deal with Gets.

Definition at line 742 of file SetGet.h.

Constructor & Destructor Documentation

template<class A1, class A2, class A3, class A4, class A5>
SetGet5< A1, A2, A3, A4, A5 >::SetGet5 ( )
inline

Definition at line 746 of file SetGet.h.

747  {;}

Member Function Documentation

template<class A1, class A2, class A3, class A4, class A5>
static bool SetGet5< A1, A2, A3, A4, A5 >::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 781 of file SetGet.h.

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

783  {
784  A1 arg1;
785  A2 arg2;
786  A3 arg3;
787  A4 arg4;
788  A5 arg5;
789  string::size_type pos = val.find_first_of( "," );
790  Conv< A1 >::str2val( arg1, val.substr( 0, pos ) );
791  string temp = val.substr( pos + 1 );
792  pos = temp.find_first_of( "," );
793  Conv< A2 >::str2val( arg2, temp.substr( 0, pos ) );
794  temp = temp.substr( pos + 1 );
795  pos = temp.find_first_of( "," );
796  Conv< A3 >::str2val( arg3, temp.substr( 0, pos ) );
797  temp = temp.substr( pos + 1 );
798  pos = temp.find_first_of( "," );
799  Conv< A4 >::str2val( arg4, temp.substr( 0, pos ) );
800  Conv< A5 >::str2val( arg5, temp.substr( pos + 1 ) );
801  return set( dest, field, arg1, arg2, arg3, arg4, arg5 );
802  }
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, A4 arg4, A5 arg5)
Definition: SetGet.h:749

+ Here is the call graph for this function:

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

Definition at line 749 of file SetGet.h.

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

Referenced by SetGet5< A1, A2, A3, A4, A5 >::innerStrSet().

751  {
752  FuncId fid;
753  ObjId tgt( dest );
754  const OpFunc* func = checkSet( field, tgt, fid );
756  dynamic_cast< const OpFunc5Base< A1, A2, A3, A4, A5 >* >( func);
757  if ( op ) {
758  if ( tgt.isOffNode() ) {
759  const OpFunc* op2 = op->makeHopFunc(
760  HopIndex( op->opIndex(), MooseSetHop ) );
762  dynamic_cast< const OpFunc5Base< A1, A2, A3, A4, A5 >* >( op2 );
763  hop->op( tgt.eref(), arg1, arg2, arg3, arg4, arg5 );
764  delete op2;
765  if ( tgt.isGlobal() )
766  op->op( tgt.eref(), arg1, arg2, arg3, arg4, arg5 );
767  return true;
768  } else {
769  op->op( tgt.eref(), arg1, arg2, arg3, arg4, arg5 );
770  return true;
771  }
772  }
773  return 0;
774  }
static const OpFunc * checkSet(const string &field, ObjId &tgt, FuncId &fid)
Definition: SetGet.cpp:15
static double op(double x)
Definition: ObjId.h:20
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) const =0
const unsigned char MooseSetHop
Definition: OpFuncBase.cpp:13
const OpFunc * makeHopFunc(HopIndex hopIndex) const
Definition: HopFunc.h:364
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: