9 #ifndef _LOOKUP_VALUE_FINFO_H
10 #define _LOOKUP_VALUE_FINFO_H
43 void ( T::*setFunc )( L, F ),
44 F ( T::*getFunc )( L )
const )
47 string setname =
"set" +
name;
48 setname[3] = std::toupper( setname[3] );
51 "Assigns field value.",
54 string getname =
"get" +
name;
55 getname[3] = std::toupper( getname[3] );
58 "Requests field value. The requesting Element must "
59 "provide a handler for the returned value.",
70 const string& arg )
const {
71 string fieldPart = field.substr( 0, field.find(
"[" ) );
72 string indexPart = field.substr( field.find(
"[" ) + 1, field.find(
"]" ) );
74 tgt.
objId(), fieldPart, indexPart, arg );
78 string& returnValue )
const {
79 string fieldPart = field.substr( 0, field.find(
"[" ) );
80 string indexPart = field.substr( field.find(
"[" ) + 1, field.find(
"]" ) );
82 fieldPart, indexPart, returnValue );
102 F ( T::*getFunc )( L )
const )
105 string getname =
"get" +
name;
106 getname[3] = std::toupper( getname[3] );
109 "Requests field value. The requesting Element must "
110 "provide a handler for the returned value.",
120 const string& arg )
const {
125 string& returnValue )
const {
126 string fieldPart = field.substr( 0, field.find(
"[" ) );
127 string indexPart = field.substr( field.find(
"[" ) + 1, field.find(
"]" ) );
129 fieldPart, indexPart, returnValue );
140 #endif // _LOOKUP_VALUE_FINFO_H
bool strGet(const Eref &tgt, const string &field, string &returnValue) const
ReadOnlyLookupValueFinfo(const string &name, const string &doc, F(T::*getFunc)(L) const )
void registerFinfo(Cinfo *c)
bool strGet(const Eref &tgt, const string &field, string &returnValue) const
void registerFinfo(Cinfo *c)
LookupValueFinfo(const string &name, const string &doc, void(T::*setFunc)(L, F), F(T::*getFunc)(L) const )
const string & name() const
~ReadOnlyLookupValueFinfo()
void registerFinfo(Finfo *f)
static bool innerStrSet(const ObjId &dest, const string &field, const string &indexStr, const string &val)
static bool innerStrGet(const ObjId &dest, const string &field, const string &indexStr, string &str)
LookupValueFinfoBase(const string &name, const string &doc)
bool strSet(const Eref &tgt, const string &field, const string &arg) const
bool strSet(const Eref &tgt, const string &field, const string &arg) const