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

#include <SetGet.h>

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

Public Member Functions

 SetGet4 ()
 
- 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)
 
- 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 SetGet4< A1, A2, A3, A4 >

SetGet4 handles 4-argument Sets. It does not deal with Gets.

Definition at line 678 of file SetGet.h.

Constructor & Destructor Documentation

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

Definition at line 681 of file SetGet.h.

682  {;}

Member Function Documentation

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

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

721  {
722  A1 arg1;
723  A2 arg2;
724  A3 arg3;
725  A4 arg4;
726  string::size_type pos = val.find_first_of( "," );
727  Conv< A1 >::str2val( arg1, val.substr( 0, pos ) );
728  string temp = val.substr( pos + 1 );
729  pos = temp.find_first_of( "," );
730  Conv< A2 >::str2val( arg2, temp.substr( 0, pos ) );
731  temp = temp.substr( pos + 1 );
732  pos = temp.find_first_of( "," );
733  Conv< A3 >::str2val( arg3, temp.substr( 0, pos ) );
734  Conv< A4 >::str2val( arg4, temp.substr( pos + 1 ) );
735  return set( dest, field, arg1, arg2, arg3, arg4 );
736  }
static bool set(const ObjId &dest, const string &field, A1 arg1, A2 arg2, A3 arg3, A4 arg4)
Definition: SetGet.h:687
static void str2val(T &val, const string &s)
Definition: Conv.h:65

+ Here is the call graph for this function:

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

Blocking, typed 'Set' call

Definition at line 687 of file SetGet.h.

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

Referenced by Shell::doUseClock(), and SetGet4< A1, A2, A3, A4 >::innerStrSet().

689  {
690  FuncId fid;
691  ObjId tgt( dest );
692  const OpFunc* func = checkSet( field, tgt, fid );
694  dynamic_cast< const OpFunc4Base< A1, A2, A3, A4 >* >( func);
695  if ( op ) {
696  if ( tgt.isOffNode() ) {
697  const OpFunc* op2 = op->makeHopFunc(
698  HopIndex( op->opIndex(), MooseSetHop ) );
699  const OpFunc4Base< A1, A2, A3, A4 >* hop =
700  dynamic_cast< const OpFunc4Base< A1, A2, A3, A4 >* >( op2 );
701  hop->op( tgt.eref(), arg1, arg2, arg3, arg4 );
702  delete op2;
703  if ( tgt.isGlobal() )
704  op->op( tgt.eref(), arg1, arg2, arg3, arg4 );
705  return true;
706  } else {
707  op->op( tgt.eref(), arg1, arg2, arg3, arg4 );
708  return true;
709  }
710  }
711  return 0;
712  }
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4) const =0
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:330
Definition: ObjId.h:20
const unsigned char MooseSetHop
Definition: OpFuncBase.cpp:13
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: