Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
		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;
		}