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

#include <ValueFinfo.h>

+ Inheritance diagram for ValueFinfo< T, F >:
+ Collaboration diagram for ValueFinfo< T, F >:

Public Member Functions

void registerFinfo (Cinfo *c)
 
string rttiType () const
 
bool strGet (const Eref &tgt, const string &field, string &returnValue) const
 
bool strSet (const Eref &tgt, const string &field, const string &arg) const
 
 ValueFinfo (const string &name, const string &doc, void(T::*setFunc)(F), F(T::*getFunc)() const )
 
 ~ValueFinfo ()
 
- Public Member Functions inherited from ValueFinfoBase
DestFinfogetFinfo () const
 
vector< string > innerDest () const
 
 ValueFinfoBase (const string &name, const string &doc)
 
 ~ValueFinfoBase ()
 
- Public Member Functions inherited from Finfo
virtual bool addMsg (const Finfo *target, ObjId mid, Element *src) const
 
virtual bool checkTarget (const Finfo *target) const
 
const string & docs () const
 Returns documentation string. More...
 
 Finfo (const string &name, const string &doc)
 
virtual vector< string > innerSrc () const
 
const string & name () const
 
virtual void postCreationFunc (Id newId, Element *newElm) const
 
virtual ~Finfo ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Finfo
static const CinfoinitCinfo ()
 
- Protected Attributes inherited from ValueFinfoBase
DestFinfoget_
 
DestFinfoset_
 

Detailed Description

template<class T, class F>
class ValueFinfo< T, F >

Definition at line 36 of file ValueFinfo.h.

Constructor & Destructor Documentation

template<class T, class F>
ValueFinfo< T, F >::~ValueFinfo ( )
inline

Definition at line 39 of file ValueFinfo.h.

References ValueFinfoBase::get_, and ValueFinfoBase::set_.

39  {
40  delete set_;
41  delete get_;
42  }
DestFinfo * get_
Definition: ValueFinfo.h:33
DestFinfo * set_
Definition: ValueFinfo.h:32
template<class T, class F>
ValueFinfo< T, F >::ValueFinfo ( const string &  name,
const string &  doc,
void(T::*)(F)  setFunc,
F(T::*)() const  getFunc 
)
inline

Definition at line 44 of file ValueFinfo.h.

References ValueFinfoBase::get_, Finfo::name(), and ValueFinfoBase::set_.

47  : ValueFinfoBase( name, doc )
48  {
49  string setname = "set" + name;
50  setname[3] = std::toupper( setname[3] );
51  set_ = new DestFinfo(
52  setname,
53  "Assigns field value.",
54  new OpFunc1< T, F >( setFunc ) );
55 
56  string getname = "get" + name;
57  getname[3] = std::toupper( getname[3] );
58  get_ = new DestFinfo(
59  getname,
60  "Requests field value. The requesting Element must "
61  "provide a handler for the returned value.",
62  new GetOpFunc< T, F >( getFunc ) );
63  }
DestFinfo * get_
Definition: ValueFinfo.h:33
ValueFinfoBase(const string &name, const string &doc)
Definition: ValueFinfo.cpp:12
const string & name() const
Definition: Finfo.cpp:80
DestFinfo * set_
Definition: ValueFinfo.h:32
Definition: OpFunc.h:27

+ Here is the call graph for this function:

Member Function Documentation

template<class T, class F>
void ValueFinfo< T, F >::registerFinfo ( Cinfo c)
inlinevirtual

Returns string-ified form to handle template expectations for name field string getName() const; Assign function Ids, bindIndex and so on.

Implements Finfo.

Definition at line 66 of file ValueFinfo.h.

References ValueFinfoBase::get_, Cinfo::registerFinfo(), and ValueFinfoBase::set_.

66  {
67  c->registerFinfo( set_ );
68  c->registerFinfo( get_ );
69  }
DestFinfo * get_
Definition: ValueFinfo.h:33
void registerFinfo(Finfo *f)
Definition: Cinfo.cpp:114
DestFinfo * set_
Definition: ValueFinfo.h:32

+ Here is the call graph for this function:

template<class T, class F>
string ValueFinfo< T, F >::rttiType ( ) const
inlinevirtual

Returns the documentation string for the Finfo string docs() const; Returns the RTTI type string for the finfo by referring to an internal virtual function. string type() const; Returns the list of subsidiary SrcFinfos. Used in Shared Finfos, empty otherwise. Goes via internal virtual function. vector< string > src() const; Returns the list of subsidiary destFinfos. Used in SharedFinfos and ValueFinfos, empty otherwise. Goes via internal virtual function. vector< string > dest() const; Returns an RTTI type string for this Finfo.

Reimplemented from Finfo.

Definition at line 81 of file ValueFinfo.h.

References Conv< T >::rttiType().

81  {
82  return Conv<F>::rttiType();
83  }
static string rttiType()
Definition: Conv.h:82

+ Here is the call graph for this function:

template<class T, class F>
bool ValueFinfo< T, F >::strGet ( const Eref tgt,
const string &  field,
string &  returnValue 
) const
inlinevirtual

Function to return value of field into a string argument. Returns true on success. Normally called only from SetGet::strGet.

Implements Finfo.

Definition at line 76 of file ValueFinfo.h.

References Field< A >::innerStrGet(), and Eref::objId().

77  {
78  return Field< F >::innerStrGet( tgt.objId(), field, returnValue );
79  }
static bool innerStrGet(const ObjId &dest, const string &field, string &str)
Definition: SetGet.h:345
ObjId objId() const
Definition: Eref.cpp:57

+ Here is the call graph for this function:

template<class T, class F>
bool ValueFinfo< T, F >::strSet ( const Eref tgt,
const string &  field,
const string &  arg 
) const
inlinevirtual

Function to set this field using a string argument. Returns true on success. Normally called only from SetGet::strSet.

Implements Finfo.

Definition at line 71 of file ValueFinfo.h.

References Field< A >::innerStrSet(), and Eref::objId().

72  {
73  return Field< F >::innerStrSet( tgt.objId(), field, arg );
74  }
static bool innerStrSet(const ObjId &dest, const string &field, const string &arg)
Definition: SetGet.h:271
ObjId objId() const
Definition: Eref.cpp:57

+ Here is the call graph for this function:


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