ObjectValue CreateObjectValue (string name, ResultData data)
{
string vname = data.GetValueString("name");
string typeName = data.GetValueString ("type");
string value = data.GetValueString ("value");
int nchild = data.GetInt ("numchild");
ObjectValue val;
ObjectValueFlags flags = ObjectValueFlags.Variable;
// There can be 'public' et al children for C++ structures
if (typeName == null)
typeName = "none";
Console.WriteLine (name + " : "+typeName);
if (typeName.EndsWith ("]")) {
val = ObjectValue.CreateArray (this, new ObjectPath (vname), typeName, nchild, flags, null);
} else if (value == "{...}" || typeName.EndsWith ("*") || nchild > 0) {
val = ObjectValue.CreateObject (this, new ObjectPath (vname), typeName, value, flags, null);
} else {
val = ObjectValue.CreatePrimitive (this, new ObjectPath (vname), typeName, new EvaluationResult (value), flags);
}
val.Name = name;
return val;
}