std::vector<std::string> MxArray::fieldnames() const { if (!isStruct()) mexErrMsgIdAndTxt("mexopencv:error", "MxArray is not a struct array"); int n = nfields(); std::vector<std::string> v; v.reserve(n); for (int i = 0; i < n; ++i) v.push_back(fieldname(i)); return v; }
std::string value(size_t tuple, size_t field) const { std::string v; if (tuple < ntuples() && field < nfields()) { const char *p=PQgetvalue(res, tuple, field); if (p) v=p; } return v; }