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

#include <LookupElementValueFinfo.h>

+ Inheritance diagram for ReadOnlyLookupElementValueFinfo< T, L, F >:
+ Collaboration diagram for ReadOnlyLookupElementValueFinfo< T, L, F >:

Public Member Functions

 ReadOnlyLookupElementValueFinfo (const string &name, const string &doc, F(T::*getFunc)(const Eref &e, L) const )
 
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
 
 ~ReadOnlyLookupElementValueFinfo ()
 
- Public Member Functions inherited from LookupValueFinfoBase
 LookupValueFinfoBase (const string &name, const string &doc)
 
 ~LookupValueFinfoBase ()
 
- 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 > innerDest () const
 
virtual vector< string > innerSrc () const
 
const string & name () const
 
virtual void postCreationFunc (Id newId, Element *newElm) const
 
virtual ~Finfo ()
 

Private Attributes

DestFinfoget_
 

Additional Inherited Members

- Static Public Member Functions inherited from Finfo
static const CinfoinitCinfo ()
 

Detailed Description

template<class T, class L, class F>
class ReadOnlyLookupElementValueFinfo< T, L, F >

Definition at line 80 of file LookupElementValueFinfo.h.

Constructor & Destructor Documentation

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

Definition at line 83 of file LookupElementValueFinfo.h.

References ReadOnlyLookupElementValueFinfo< T, L, F >::get_.

83  {
84  delete get_;
85  }
template<class T, class L, class F>
ReadOnlyLookupElementValueFinfo< T, L, F >::ReadOnlyLookupElementValueFinfo ( const string &  name,
const string &  doc,
F(T::*)(const Eref &e, L) const  getFunc 
)
inline

Definition at line 87 of file LookupElementValueFinfo.h.

References ReadOnlyLookupElementValueFinfo< T, L, F >::get_, and Finfo::name().

90  : LookupValueFinfoBase( name, doc )
91  {
92  string getname = "get" + name;
93  getname[3] = std::toupper( getname[3] );
94  get_ = new DestFinfo(
95  getname,
96  "Requests field value. The requesting Element must "
97  "provide a handler for the returned value.",
98  new GetEpFunc1< T, L, F >( getFunc ) );
99  }
const string & name() const
Definition: Finfo.cpp:80
LookupValueFinfoBase(const string &name, const string &doc)

+ Here is the call graph for this function:

Member Function Documentation

template<class T, class L, class F>
void ReadOnlyLookupElementValueFinfo< T, L, 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 102 of file LookupElementValueFinfo.h.

References ReadOnlyLookupElementValueFinfo< T, L, F >::get_, and Cinfo::registerFinfo().

102  {
103  c->registerFinfo( get_ );
104  }
void registerFinfo(Finfo *f)
Definition: Cinfo.cpp:114

+ Here is the call graph for this function:

template<class T, class L, class F>
string ReadOnlyLookupElementValueFinfo< T, L, 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 119 of file LookupElementValueFinfo.h.

References Conv< T >::rttiType().

119  {
120  return Conv<L>::rttiType() + "," + Conv<F>::rttiType();
121  }
static string rttiType()
Definition: Conv.h:82

+ Here is the call graph for this function:

template<class T, class L, class F>
bool ReadOnlyLookupElementValueFinfo< T, L, 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 111 of file LookupElementValueFinfo.h.

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

112  {
113  string fieldPart = field.substr( 0, field.find( "[" ) );
114  string indexPart = field.substr( field.find( "[" ) + 1, field.find( "]" ) );
116  tgt.objId(), fieldPart, indexPart, returnValue );
117  }
ObjId objId() const
Definition: Eref.cpp:57
static bool innerStrGet(const ObjId &dest, const string &field, const string &indexStr, string &str)
Definition: SetGet.h:602

+ Here is the call graph for this function:

template<class T, class L, class F>
bool ReadOnlyLookupElementValueFinfo< T, L, 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 106 of file LookupElementValueFinfo.h.

107  {
108  return 0;
109  }

Member Data Documentation


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