@@ -77,8 +77,10 @@ py::object getValueFinfo(const ObjId& oid, const string& fname, const Finfo* f)
7777 r = pybind11::float_ (getProp<double >(oid, fname));
7878 else if (rttType == " float" )
7979 r = pybind11::float_ (getProp<double >(oid, fname));
80- else if (rttType == " vector<double>" )
81- r = py::cast (getProp<vector<double >>(oid, fname));
80+ else if (rttType == " vector<double>" ) {
81+ // r = py::cast(getProp<vector<double>>(oid, fname));
82+ r = getFieldNumpy<double >(oid, fname);
83+ }
8284 else if (rttType == " string" )
8385 r = pybind11::str (getProp<string>(oid, fname));
8486 else if (rttType == " char" )
@@ -114,7 +116,8 @@ inline ObjId getElementFinfoItem(const ObjId& oid, const size_t& i)
114116 return ObjId (oid.path (), oid.dataIndex , i);
115117}
116118
117- py::list getElementFinfo (const ObjId& objid, const string& fname, const Finfo* f)
119+ py::list getElementFinfo (const ObjId& objid, const string& fname,
120+ const Finfo* f)
118121{
119122 auto rttType = f->rttiType ();
120123 auto oid = ObjId (objid.path () + ' /' + fname);
@@ -176,13 +179,19 @@ py::object getLookupValueFinfo(const ObjId& oid, const string& fname,
176179 return py::cast (__Finfo__ (oid, fname, f));
177180}
178181
179- py::object getDestFinfo (const ObjId& obj, const string& fname, const Finfo* f)
182+ py::function getDestFinfo (const ObjId& obj, const string& fname, const Finfo* f)
180183{
181184 auto rttType = f->rttiType ();
182- cout << " Setting " << fname << " with rttType " << rttType << " on object "
183- << obj.path () << endl;
184-
185- return py::none ();
185+ if (rttType == " Id" ) {
186+ std::function<bool (const ObjId& tgt)> f = [obj, fname](const ObjId& tgt) {
187+ return SetGet1<ObjId>::set (obj, fname, tgt);
188+ };
189+ return py::cast (f);
190+ }
191+ else
192+ cout << " NotImplented: Setting " << fname << " with rttType '"
193+ << rttType << " ' on object " << obj.path () << endl;
194+ return py::function ();
186195}
187196
188197py::object getProperty (const ObjId& oid, const string& fname)
@@ -212,7 +221,7 @@ py::object getProperty(const ObjId& oid, const string& fname)
212221 }
213222
214223 cerr << " NotImplemented: getProperty for " << fname << " with rttType "
215- << finfo->rttiType () << " and type: " << finfoType << endl;
224+ << finfo->rttiType () << " and type: ' " << finfoType << " ' " << endl;
216225 return pybind11::none ();
217226}
218227
0 commit comments