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

#include <LookupValueFinfo.h>

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

Public Member Functions

 ReadOnlyLookupValueFinfo (const string &name, const string &doc, F(T::*getFunc)(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
 
 ~ReadOnlyLookupValueFinfo ()
 
- 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 ReadOnlyLookupValueFinfo< T, L, F >

Definition at line 94 of file LookupValueFinfo.h.

Constructor & Destructor Documentation

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

Definition at line 97 of file LookupValueFinfo.h.

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

97  {
98  delete get_;
99  }
template<class T, class L, class F>
ReadOnlyLookupValueFinfo< T, L, F >::ReadOnlyLookupValueFinfo ( const string &  name,
const string &  doc,
F(T::*)(L) const  getFunc 
)
inline

Definition at line 101 of file LookupValueFinfo.h.

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

103  : LookupValueFinfoBase( name, doc )
104  {
105  string getname = "get" + name;
106  getname[3] = std::toupper( getname[3] );
107  get_ = new DestFinfo(
108  getname,
109  "Requests field value. The requesting Element must "
110  "provide a handler for the returned value.",
111  new GetOpFunc1< T, L, F >( getFunc ) );
112  }
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 ReadOnlyLookupValueFinfo< 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 115 of file LookupValueFinfo.h.

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

115  {
116  c->registerFinfo( get_ );
117  }
void registerFinfo(Finfo *f)
Definition: Cinfo.cpp:114

+ Here is the call graph for this function:

template<class T, class L, class F>
string ReadOnlyLookupValueFinfo< 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 132 of file LookupValueFinfo.h.

References Conv< T >::rttiType().

132  {
133  return Conv<L>::rttiType() + "," + Conv<F>::rttiType();
134  }
static string rttiType()
Definition: Conv.h:82

+ Here is the call graph for this function:

template<class T, class L, class F>
bool ReadOnlyLookupValueFinfo< 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 124 of file LookupValueFinfo.h.

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

125  {
126  string fieldPart = field.substr( 0, field.find( "[" ) );
127  string indexPart = field.substr( field.find( "[" ) + 1, field.find( "]" ) );
129  fieldPart, indexPart, returnValue );
130  }
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 ReadOnlyLookupValueFinfo< 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 119 of file LookupValueFinfo.h.

120  {
121  return 0;
122  }

Member Data Documentation


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